// JavaScript Document

$(document).ready(function() {
	
	var timer;
	
	$("#btnMundial").bind("mouseenter", function(){
		$('#submenu').animate({top:'95px', opacity:'1'},500);	
	});
	
	$("#btnMundial, #submenu").bind("mouseleave", function(){
		timer = window.setTimeout('quitarSubmenu()',500);
	});
	
	$("#btnMundial, #submenu").bind("mouseenter", function(){
		window.clearTimeout(timer);	
	});
	
	$(".seccion header").animate({top: '620px' }, {queue:false, duration:1000, easing:'easeOutQuad', complete:function section(){
		
		$("section").animate({top:'50px', opacity:'1'},1000);
		$("#bgSection").animate({opacity:'.89'},1000);

	}});
	
	$("#brasil header").animate({top: '670px' }, {queue:false, duration:1000, easing:'easeOutQuad', complete:function section(){
		
		$("section").animate({top:'50px', opacity:'1'},1000);
		$("#bgSection").animate({opacity:'.89'},1000);

	}});
	
	$("#facilidades header").animate({top: '690px' }, {queue:false, duration:1000, easing:'easeOutQuad', complete:function section(){
		
		$("section").animate({top:'50px', opacity:'1'},1000);
		$("#bgSection").animate({opacity:'.95'},1000);

	}});
	
	$("#paquetes header").animate({top: '690px' }, {queue:false, duration:1000, easing:'easeOutQuad', complete:function section(){
		
		$("section").animate({top:'50px', opacity:'1'},1000);
		$("#bgSection").animate({opacity:'.95'},1000);

	}});
	
	$("#vegas header").animate({top: '690px' }, {queue:false, duration:1000, easing:'easeOutQuad', complete:function section(){
		
		$("section").animate({top:'50px', opacity:'1'},1000);
		$("#bgSection").animate({opacity:'.89'},1000);

	}});
	
	$("#especiales header").animate({top: '670px' }, {queue:false, duration:1000, easing:'easeOutQuad', complete:function section(){
		
		$("section").animate({top:'50px', opacity:'1'},1000);
		$("#bgSection").animate({opacity:'.89'},1000);

	}});
	
	$("#futbol header").animate({top: '670px' }, {queue:false, duration:1000, easing:'easeOutQuad', complete:function section(){
		
		$("section").animate({top:'50px', opacity:'1'},1000);
		$("#bgSection").animate({opacity:'.95'},1000);

	}});
	
});


function quitarSubmenu(){
		$('#submenu').animate({top:'85px', opacity:'0'},500);
	}


<!--[if IE]>
var e = ("abbr,article,aside,audio,canvas,datalist,details,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video").split(',');
for (var i=0; i<e.length; i++) {
document.createElement(e[i]);
}
<!-- [endif]-->	


$(window).resize(function() {
      getBrowserWindowSize();
});

var myWidth = 0, myHeight = 0;
 			
function getBrowserWindowSize()
{
if( typeof( window.innerWidth ) == 'number' )
{
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
}
else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
{
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
}
else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
{
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
checar_ventana();
}

		function checar_ventana(){
					if(myHeight<=360){
						$("#home footer").css("position","relative");
						$("#home footer").css("margin-top","320px");
					}else{
						$("#home footer").css("position","absolute");
						$("#home footer").css("margin-top","0px");
					}
			}



