function cambiarPagina(url){
		if (url=="index-mujeres.html"){
			$(".logo-top-mujeres").show();
			$(".logo-top-ninos").hide();
		} 
		if (url=="index-ninos.html"){
			$(".logo-top-mujeres").hide();
			$(".logo-top-ninos").show();
		}
		$('#contenedor').fadeOut("slow", function() {
			$('#contenedor').load("iframe.php?url="+escape(url) + "&rnd=" + Math.random(),  function(){
				$('#contenedor').fadeIn("slow");
			});
		});
}
function cambiarDock(dock,url){
	cambiarPagina(url);
	$("#dock").animate({
		height: 0
	  }, 1000,"easeOutExpo", function() {
		  $(dock).siblings().css("display","none");
				$(dock).show(1, function() {
					$("#dock").animate({
						height: 140
						}, 1000,"easeOutExpo", function() {
						
						});
				});
	  });
}

function getHost() {
    var url = window.location.href;
    var nohttp = url.split('//')[1];
    var hostPort = nohttp.split('/')
    return hostPort[hostPort.length-1];
}


$(document).ready(function() {
	/* PRIMERA CARGA CUANDO INGRESO A LA PAGINA */
        var url = getHost();
        if(url != "ninos.html")
	   cambiarDock("#piemujeres","index-mujeres.html");
        else
	   cambiarDock("#pieninos","index-ninos.html");
	/* ROLLOVERS MENU */
	$('li.campana').hover(
		function() {
			$('ul', this).show();
		},
		function() {
			$('ul', this).hide();
		}
	);
	$('li.lookbook').hover(
		function() {
			$('ul', this).show();
		},
		function() {
			$('ul', this).hide();
		}
	);
	/* PROXIMAMENTE */
	$('a[rel=proximamente]').append('<span class="proximamente">proximamente</span>');
	
	$('a[rel=proximamente]').live('mouseover mouseout', function(event) {
		  if (event.type == 'mouseover') {
			$(this).children("span").css("display","block");
		  } else {
			$(this).children("span").css("display","none");
		  }
	});
	/* BTN CAMBIO DE DOCK */
	$('p.bt-ninos > a').hover(
		function() {
			$(this).animate({
			width:105
			}, 200);
		},
		function() {
			$(this).animate({
			width:39
			}, 200);
		}
	);
	$('p.bt-mujeres > a').hover(
		function() {
			$(this).animate({
			width:105
			}, 200);
		},
		function() {
			$(this).animate({
			width:39
			}, 200);
		}
	);
});
