$(function(){
	
	// EVENTO DISPONIBLE EN BLANCO CON HOVER
	$(".evento_disp").hover(function(){
		$(this).find(".evento_fecha a").css({color:"#fff",visibility: "visible !important"});
	},
	function(){
		$(this).find(".evento_fecha a").css({color:"#6A6E72",visibility: "visible !important"});
	});
	
	// CORNERz
	if ($(".t-naranja").length != 0){
		$(".t-naranja").corner("5px");
	}
	

	if ($(".msgPaypal").length != 0){
		$(".msgPaypal").corner("10px bottom");
		//setTimeout('hideMsg()',5000);
	}
	
	// FOLOWER
	$("body").append('<div id="follower"></div>');
	
	// FOLOWER PAGKAGE
	$("body").append('<div id="follower_package"></div>');
	
	// FOLLOWER HIDE
	$("#follower").hide();
	
	// FOLLOWER PAGKAGE HIDE
	$("#follower_package").hide();
	
	// LIVE POSITION OF MOUSE
	$().mousemove(function(e){
		  window.mouseXPos = e.pageX;
		  window.mouseYPos = e.pageY;
	}); 


	
	////////////////////////////////////////////////////////////////////
	
	//aca estaba todo del follower
	
	////////////////////////////////////////////////////////////////////
	

	
// CYCLE HOME
$(".slideData").hide();
	
$(".frame").hover(function(){
clearTimeout(t);
id = $(this).attr('id');
partes = id.split("_");
zi = $(this).css('z-index');
if(zi==3){
$(".slide"+partes[1]).show();
$(".slide"+partes[1]+" div").css("background","url(../img/rotador_over.png) no-repeat");
$(".slide"+partes[1]+" div").show();
}
});

$(".outFrame").mouseleave(function(){
t = setTimeout('nextSlide()',10000);
$(".slideData div").css("background","none");
$(".slideData").hide();
});
	
	// INPUT SEARCH
	$('#f-busca_head,#f-busca').focus(function(){
	if( $(this).val() == 'Escribe tu Evento' ) {
	$(this).val('');
	}	
	});
	$('#f-busca_head,#f-busca').blur(function(){
	if( $(this).val() == '' ) {
	$(this).val('Escribe tu Evento');
	}	
	});
	
	// INPUT NEWSLETTER
	$('#f-suscr').focus(function(){
	if( $(this).val() == 'Introduce tu Email' ) {
	$(this).val('');
	}	
	});
	$('#f-suscr').blur(function(){
	if( $(this).val() == '' ) {
	$(this).val('Introduce tu Email');
	}	
	});
	
});

function validateSuCompra() {
	var unidades = $("#f_unidades").val();
	if( unidades == 0 || unidades == '' ) {
		alert("Ingrese una cantidad valida de unidades");
		$("#f_unidades").focus();
	}else {
	window.location = "susDatos.php";
	}
	$("#f_unidades").keyup(function(){
	alert("cambiar valores");
	});
}

function hideMsg() {
$(".msgPaypal").slideUp();
}
