jQuery(document).ready(function() {

    if ( jQuery(".carousel").length ) {
  	  jQuery(".carousel li").show();

      jQuery(".carousel").jCarouselLite({
      	    btnNext: ".next",
        	  btnPrev: ".prev",
            visible: 1
      });
    }
    if ( jQuery(".carouselProducts").length ) {
  	  jQuery(".carouselProducts li").show();

      jQuery(".carouselProducts").jCarouselLite({
      	    btnNext: ".next",
        	  btnPrev: ".prev",
            visible: 4
      });
    }

  if ( jQuery("#brandsList").length ) {
    jQuery("#brandsList").listnav({
      includeAll:false
    });
  }

  
  if ( jQuery('#last_products.home').length ) {
    
    // jQuery('#selection').before(jQuery('#last_products.home'));
    
  }

	jQuery('#s').one('focus', function(){
		jQuery(this).attr('value', '');
	});

	jQuery("#closeWindowContent").click(
		function() {
			jQuery("#windowContent").toggle("slow");
		}
	);
	jQuery("#itemNewsletter a").click(
		function() {
			jQuery("#newsLetterSubscribe").toggle("slow");
		}
	);
	jQuery("#closeNewsletterContent").click(
		function() {
			jQuery("#newsLetterSubscribe").toggle("slow");
		}
	);

  jQuery.fn.extend({
  	scrollTo : function(speed, easing) {
  		return this.each(function() {
  			var targetOffset = (jQuery(this).offset().top);
  			jQuery("html,body").animate({scrollTop: targetOffset}, speed, easing);
  		});
  	}
  });
  
  jQuery("#flash_logo").click(function(){
    document.location.href = 'http://filles-de-luxe.fr/';
  });

  if (jQuery(".carousel .selection p img").length) {
    jQuery(".carousel .selection p img").click(function(){
      document.location.href = jQuery(this).parent().parent().find("h3>a").attr("href");
    });    
    jQuery(".carousel .selection p img").css("cursor","pointer");
  }

});

