var ie=false;
var ie_n=false;

version=parseFloat(jQuery.browser.version.split(".")[0]);
if($.browser.msie){
	var ie_n=true;
	if(version<8){
		//var ie=true;
	}
}


$("#container").css("display","none");
if(op_seccion=="") op_seccion="00";

$("#container").addClass("container");
es_layout3=false;
$("#footer").css("border-top","1px solid #fff");
$("#div_submenu_noticias").css("border-top","1px solid #C6D8E5");
$("#clearfooter").css("height","1px");
$("#popup").css("visibility","hidden");

// Resize
var reposicionamiento=false;
var reposicionamiento_menu=false;
var op_seleccionado="00";
//document.title="i2O Intelligent Water Control | "+$(window).height();
$(window).resize(function () { 
	reposiciona_i2o();
});

function reposiciona_i2o(){
	if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
		$(".td-boton-menu-languages").css("width","10%");
		$(".boton-menu-principal-search").html("&nbsp;&nbsp;");
	}else{

		if($(window).height()<=765){
			/*$("#menu-logo").css("margin-top","9px");
			$("#menu-sublinea").css("margin-top","10px");*/
			//$("#tr_menu_inferior").css("height","2px");
			$("#footer").css("height","38px");
			$("#footer").css("margin","-41px auto 0");
			$("#footer").css("padding-top","2px");
			$("#div_submenu_about").css("top","20px");
			$("#div_submenu_languages").css("top","20px");
			$("#div_submenu_noticias").css("top","20px");
			$("#contenido_flash").css("height","330px");
			$("#CMS").css("height","330px");
		}else{
			/*$("#menu-logo").css("margin-top","25px");
			$("#menu-sublinea").css("margin-top","26px");*/
			//$("#tr_menu_inferior").css("height","30px");
			$("#footer").css("height","70px");
			$("#footer").css("margin","-73px auto 0");
			$("#footer").css("padding-top","2px");
			$("#div_submenu_about").css("top","45px");
			$("#div_submenu_languages").css("top","45px");
			$("#div_submenu_noticias").css("top","45px");
			$("#contenido_flash").css("height","406px");
			$("#CMS").css("height","406px");
		}
			
		if(op_seleccionado!="00"){
			if($(window).height()<=700){
				$("#centro-div").css("height", "0px");
				$("#colgando").css("height","1px");
				$("#centro").css("vertical-align", "top");
			}else{
				$("#centro-div").css("height", $(window).height()-300);
				$("#colgando").css("height","460px");
				$("#centro").css("vertical-align", "middle");
			}
		}else{
			$("#centro").css("vertical-align", "top");
		}
	}
}
