$(function() {
// OPACITY OF BUTTON SET TO 50%
$("a").css("opacity","1.0");
$(".textframe").hide();
$("a").animate({opacity: 1.0}, "normal");
$("a").stop().animate({width: 180,}, "normal");

// ON MOUSE OVER
$("#menu2 a").hover(function () {
// SET OPACITY TO 100%
$(this).stop().animate({opacity: 1.0}, "normal");
$(this).stop().animate({width: 170,}, "fast");
},
// ON MOUSE OUT

function () {

// SET OPACITY BACK TO 50%

$(this).animate({opacity: 1.0,}, "normal");
$(this).stop().animate({width: 180,}, "normal");

});

$("#menuvideo a").hover(function () {
// SET OPACITY TO 100%
$(this).stop().animate({opacity: 1.0}, "normal");
$(this).stop().animate({width: 170,}, "fast");
},
// ON MOUSE OUT

function () {

// SET OPACITY BACK TO 50%

$(this).animate({opacity: 1.0,}, "normal");
$(this).stop().animate({width: 180,}, "normal");

});




$(".header").hover(function () {
// SET OPACITY TO 100%
$(this).stop().animate({opacity: 1.0}, "normal");
$(this).stop().animate({width: 170,}, "fast");
},
// ON MOUSE OUT

function () {

// SET OPACITY BACK TO 50%

$(this).animate({opacity: 1.0,}, "normal");
$(this).stop().animate({width: 180,}, "normal");

});
$(".header2").hover(function () {
// SET OPACITY TO 100%
$(this).stop().animate({opacity: 1.0}, "normal");
$(this).stop().animate({width: 170,}, "fast");
},
// ON MOUSE OUT

function () {

// SET OPACITY BACK TO 50%

$(this).animate({opacity: 1.0,}, "normal");
$(this).stop().animate({width: 180,}, "normal");

});


$("#menu a").hover(function () {
// SET OPACITY TO 100%
$(this).stop().animate({opacity: 1.0}, "normal");
$(this).stop().animate({width: 170,}, "fast");
},
// ON MOUSE OUT

function () {

// SET OPACITY BACK TO 50%

$(this).animate({opacity: 1.0,}, "normal");
$(this).stop().animate({width: 180,}, "normal");

});


$("a").click(function () {
	$(".textframe").hide("slow");
});

$("#info1").click(function () {
	$("#uno").show("normal");
});
$("#info2").click(function () {
	$("#dos").show("normal");
});
$("#info3").click(function () {
	$("#tres").show("normal");
});
$("#info4").click(function () {
	$("#cuatro").show("normal");
});
$("#info5").click(function () {
	$("#cinco").show("normal");
});
$("#info6").click(function () {
	$("#seis").show("normal");
});
$("#info7").click(function () {
	$("#siete").show("normal");
});
$("#info8").click(function () {
	$("#ocho").show("normal");
});
$("#info9").click(function () {
	$("#nueve").show("normal");
});
$("#info10").click(function () {
	$("#diez").show("normal");
});

$('#menu2 a').click(function () {

	$(this).next().hide('slow');
	
							
	var checkElement = $(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        return false;
        }
		
		if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('#menu2 ul:visible').slideUp('normal');
        checkElement.slideDown('normal');
        return false;
        }
		 }
    );
});





function initMenu() {
  $('#menu ul').hide();
 
  $('#menu li a').click(
    function() {
		{
        $(this).next().hide('slow');
		
      }
      var checkElement = $(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        return false;
        }
		
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('#menu ul:visible').slideUp('normal');
        checkElement.slideDown('normal');
        return false;
        }
		
      }
    );
  
  
  $("#btn1").click(function () {
	$("#mask").scrollTo(450,"slow",{axis:'y'} );
	
});
  
$("#btn2").click(function () {
	$("#mask").scrollTo(900,"slow", {axis:'y'} );

});
$("#btn3").click(function () {
	$("#mask").scrollTo(1350,"slow", {axis:'y'} );

});
$("#btn4").click(function () {
	$("#mask").scrollTo(1805,"slow", {axis:'y'} );

});
$("#btn5").click(function () {
	$("#mask").scrollTo(2245,"slow", {axis:'y'} );

});
$("#btn6").click(function () {
	$("#mask").scrollTo(2685,"slow", {axis:'y'} );

});
$("#btn7").click(function () {
	$("#mask").scrollTo(3140,"slow", {axis:'y'} );

});
$("#btn8").click(function () {
	$("#mask").scrollTo(3590,"slow", {axis:'y'} );

});
$("#btn9").click(function () {
	$("#mask").scrollTo(4030,"slow", {axis:'y'} );

});
$("#btn10").click(function () {
	$("#mask").scrollTo(4565,"slow", {axis:'y'} );

});
$(".cerrar").click(function () {
	$("#textoframe").hide("scroll");

});
 $("#btncero").click(function () {
	$("#mask").scrollTo(0,"slow",{axis:'y'} );
	
});
  
   $('#menu2 ul').hide();
 
  $('#menu2 li a').click(
    function() {
		{
        $(this).next().hide('slow');
		
      }
      var checkElement = $(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        return false;
        }
		
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('#menu2 ul:visible').slideUp('normal');
        checkElement.slideDown('normal');
        return false;
        }
		
      }
    );
  
  
  
  }
$(document).ready(function() {initMenu();});
