// JavaScript Document

// Funcion MOSTRAR OCULTAR
function mostrar(nombreCapa){
document.getElementById(nombreCapa).style.visibility="visible";
}
function ocultar(nombreCapa){
document.getElementById(nombreCapa).style.visibility="hidden";
} 

function mostrarSMenu(nombreCapa){
document.getElementById(nombreCapa).style.display="block";
}
function ocultarSMenu(nombreCapa){
document.getElementById(nombreCapa).style.display="none";
} 


function abrirPop (URL){
window.open(URL,"ventana1","width=700, height=500, scrollbars=yes, menubar=no, location=no, resizable=no")
}
function irA(url)
{
window.location = url;
}

var winName="skienchapelco";
function AbrirVentana (theURL,w,h) { 

var windowprops ="toolbar=no, location=no, status=no, menubar=no, scrollbars=yes, resizable=no, width=" + w + ", height=" + h;

window.open(theURL,winName,windowprops); 
} 

// Desplegable login
$(document).ready(function(){
	$("div.login").click(function() { //Al hacer click se ejecuta...

		//Con este codigo aplicamos el movimiento de arriva y abajo para el submenu
		$(this).find("div.formu").slideDown('fast').show(); //Menu desplegable al hacer click

		})
	$("div.login").hover(function() { //Al hacer click se ejecuta...

		//Con este codigo aplicamos el movimiento de arriva y abajo para el submenu
		$(this).find("div.formu").slideUp('slow'); //Menu desplegable al hacer click

		})
		
		
	$("div.menu div ul li").hover(function() { //Al hacer click se ejecuta...

		//Con este codigo aplicamos el movimiento de arriva y abajo para el submenu
		$(this).find("ul:first").fadeIn('fast').show(); //Menu desplegable al hacer click

		}, function(){
    	$(this).find("ul:first").fadeOut('fast').hide();
    	}
  );

});

// slider
$(window).load(function() {
	$('#slider').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:500,
		pauseTime:3000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:true, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
    controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:false, //Use left & right arrows
		pauseOnHover:false, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
	
});
