$('document').ready(function(){
	
	$('#ajaxSearch_input').val('Search here...');
	$('#ajaxSearch_input').focus(
		function(){
			$(this).val('');
		}
		).blur(function(){
			if($(this).val()=='')
			$(this).val('Search here...');
		});
		
		$('#ajaxSearch_input2').val('Buscar aquí...');
		$('#ajaxSearch_input2').focus(
			function(){
				$(this).val('');
			}
			).blur(function(){
				if($(this).val()=='')
				$(this).val('Buscar aquí...');
			});
			
			$("#products li a").hover(
			    function(){
			       $(this).animate({"paddingLeft": "+10px"}, "fast");
			       $(this).animate({"paddingLeft": "0px"}, "fast");

			    },function(){
			       
			    }
			       );
	
var $mask = $('#contentParkesDisponibles').css({'overflow': 'hidden', 'width': '660px'});
var $siguiente = $('.bindNext');
var $anterior = $('.bindPrev');
var $paneles = $('.wrapperParaSeis');
var scrollOptions = {
		target: $mask,
        items: $paneles,
		next: $siguiente,
        prev: $anterior,
		axis: 'xy',
		duration: 600,
		easing: 'swing',
        onBefore:function( e, elem, $pane, $items, pos ){
			$anterior.add($siguiente).show();
			if( pos == 0 )
				$anterior.hide();
			else if( pos == $items.length-1 )
				$siguiente.hide();
		},
		cycle:true
	};

	$('#contenido').serialScroll(scrollOptions);
    $anterior.hide();
    if(($paneles).length<2){
        $siguiente.hide();
    }

	$('#ParksMenuInterior').hide("slow");
	
	$('#selectorMenuInterior').hover(
		function(){
	    $('#selectorMenuInterior p').animate({"opacity": "0"}, "fast");
		$('#ParksMenuInterior').animate({"opacity": "0.7"}, "fast").show();
		},
		function(){
		$('#selectorMenuInterior p').animate({"opacity": "1"}, "fast");
		$('#ParksMenuInterior').animate({"opacity": "0"}, "fast");	
		}
	);
	
	
	
	var $mask2 = $('#scrollerInterior').css({'overflow': 'hidden', 'width': '900px'});
	var $siguiente2 = $('#nextInterior');
	var $anterior2 = $('#prevInterior');
	var $paneles2 = $('#scrollerInterior ul li');
	var $cuantos = $paneles.length;
	var $tamanioFinalUl = 0;
	$tamanioFinalUl = ($cuantos<8)? 930 : ($cuantos+1) * 120;
	$('#scrollerInterior ul').css({'width': $tamanioFinalUl});
	var scrollOptions2 = {
			target: $mask2,
	        items: $paneles2,
			next: $siguiente2,
	        prev: $anterior2,
			axis: 'xy',
			duration: 200,
			easing: 'swing',
	        onBefore:function( e, elem, $pane, $items, pos ){
				$anterior2.add($siguiente).show();
				if( pos == 0 )
					$anterior2.hide();
				else if( pos == $items.length-1 )
					$siguiente2.hide();
			},
			cycle:false
		};


		$('#ParksMenuInterior').serialScroll(scrollOptions2);
	    	$anterior2.hide();
	    if(($paneles2).length<8){
	        $siguiente2.hide();
	    }
	
});