$(document).ready(function(){

	//Search box
	
	$("#q").focus(function(){
		if ($("#q").val() == "Buscar"){
			$("#q").val("");
			$("#q").addClass("qfocus");
		}
	});
	
	$("#q").blur(function(){
		if ($("#q").val() == ""){
			$("#q").removeClass("qfocus");
			$("#q").val("Buscar");
		}
	});
	
	//---
	
	$('.dropdown').hide();
	$('.dropdown').each(function(){
		$(this).parent().eq(0).hover(function(){
			$('.dropdown:eq(0)', this).show()
			},function(){
				$('.dropdown:eq(0)', this).hide();
		});
	});
   
   $(".innerfeatured").jCarouselLite({
		visible: 1,
		auto: 7000,
		vertical: true
    });
   
   $(".datacontent").jCarouselLite({
		visible: 5,
		btnNext: ".next",
		btnPrev: ".prev"
    });
   
   // $("a[rel^='prettyPhoto']").prettyPhoto({
   // 		theme: 'light_square'									   
   // 	});
   
   $(".epflicker").jCarouselLite({
		visible: 5,
		btnNext: ".btnext",
		btnPrev: ".btprev"
    });

	//colorbox
	$("a[rel^=lightbox]").colorbox({
			maxWidth:1000,
			maxHeight:800,
			title:true
		});
		
	// Home Banner
	if ( $('#tpmbanner').length ){
		$('#tpmbanner').hover(function(){
			$('#tpmbanner .hidding').slideDown();
		}, function() {
			$('#tpmbanner .hidding').slideUp();
		});
	}
      
});
