$(window).load(function() {
    $('#slider').nivoSlider({
		effect:'sliceDownLeft', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:600, //Slide transition speed
		pauseTime:6500,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:true, //Next & Prev
		directionNavHide:true, //Only show on hover
		controlNav:true, //1,2,3...
		keyboardNav:true, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
});

 $(document).ready(function() {
        $('ul#TopCats').superfish({
            delay:       0,                            // one second delay on mouseout
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation
            speed:       'normal',                          // faster animation speed
            autoArrows:  false,                           // disable generation of arrow mark-up
            dropShadows: false                            // disable drop shadows
			 
        });
	
    }); 


    

    $(document).ready(function() {
        $('ul#TopCats ul').superfish({
            delay:       0,                            // one second delay on mouseout
			onInit:        function(){},       // callback function fires once Superfish is initialised – 'this' is the containing ul 
			pathClass:     'ul#TopCats ul sf-vertical', // the class you have applied to list items that lead to the current page 
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation
            speed:       'fast',                          // faster animation speed
            autoArrows:  true,                           // disable generation of arrow mark-up
            dropShadows: false                            // disable drop shadows
			 
        });
	
    }); 


	$(function() {
	  $('#bestseller').cycle({ 
	    fx:     'scrollUp',
		
		   timeout: 6000, 
	    delay:  -6000
	  });	
	});

		


function equalHeight(group) {
   tallest = 0;
   group.each(function() {
      thisHeight = $(this).height();
      if(thisHeight > tallest) {
         tallest = thisHeight;
      }
   });
   group.height(tallest);
}
$(document).ready(function() {
   equalHeight($(".productPreview"));
});
$(document).ready(function() {
   equalHeight($(".productPreview-cat"));
});
$(document).ready(function() {
   equalHeight($(".productPreview-specials"));
});
$(document).ready(function() {
   equalHeight($(".productPreview-neu"));
});


$(document).ready(function(){

  
    // jQuery Hoverboxes
      $('#box_search').hover(
        function(){ $('#box_search .dropdown-search').fadeIn("fast"); }, 
        function() { $('#box_search .dropdown-search').fadeOut("fast"); } 
    );
    $('#box_cart').hover(
        function(){ $('#box_cart .dropdown').fadeIn("fast"); }, 
        function() { $('#box_cart .dropdown').fadeOut("fast"); } 
    );
	

});

$.fn.hoverClass = function(c) {
    return this.each(function(){
        $(this).hover( 
            function() { $(this).addClass(c);  },
            function() { $(this).removeClass(c); }
        );
    });
};


$(function(){
   var path = location.pathname.substring(1);
   if ( path )
     $('#home a[href$="' + path + '"]').attr('class', 'selected');
 });

$(document).ready(function(){
$(".productPreviewImage").fadeTo("fast", 1.0); 

$(".productPreviewImage").hover(function(){
$(this).fadeTo("fast", 0.6); 
},function(){
$(this).fadeTo("fast", 1.0); 
});
});


$(document).ready(function() {
      $(".productPreview").eq(3).css({"border-right":"0"});
	  $(".productPreview").eq(7).css({"border-right":"0"});
	  $(".productPreview").eq(11).css({"border-right":"0"});
	  $(".productPreview").eq(15).css({"border-right":"0"});
	  $(".productPreview").eq(19).css({"border-right":"0"});
	  $(".productPreview-cat").eq(2).css({"border-right":"0"});
	  $(".productPreview-cat").eq(5).css({"border-right":"0"});
	  $(".productPreview-cat").eq(8).css({"border-right":"0"});
	  $(".productPreview-cat").eq(11).css({"border-right":"0"});
	  $(".productPreview-cat").eq(14).css({"border-right":"0"});
	  $(".productPreview-cat").eq(17).css({"border-right":"0"});
	  $(".productPreview-tabs").eq(2).css({"border-right":"0"});
	  $(".productPreview-tabs").eq(5).css({"border-right":"0"});
	  $(".productPreview-tabs").eq(8).css({"border-right":"0"});
	  $(".productPreview-tabs").eq(11).css({"border-right":"0"});
	  $(".productPreview-tabs").eq(14).css({"border-right":"0"});
	  $(".productPreview-tabs").eq(17).css({"border-right":"0"});
	  $(".productPreview-neu").eq(2).css({"border-right":"0"});
	  $(".productPreview-neu").eq(5).css({"border-right":"0"});
	  $(".productPreview-neu").eq(8).css({"border-right":"0"});
	  $(".productPreview-neu").eq(11).css({"border-right":"0"});
	  $(".productPreview-neu").eq(14).css({"border-right":"0"});
	  $(".productPreview-neu").eq(17).css({"border-right":"0"});
	  $(".productPreview-neu").eq(20).css({"border-right":"0"});
	  $(".productPreview-specials").eq(2).css({"border-right":"0"});
	  $(".productPreview-specials").eq(5).css({"border-right":"0"});
	  $(".productPreview-specials").eq(8).css({"border-right":"0"});
	  $(".productPreview-specials").eq(11).css({"border-right":"0"});
	  $(".productPreview-specials").eq(14).css({"border-right":"0"});
	  $(".productPreview-specials").eq(17).css({"border-right":"0"});
	  $(".productPreview-specials").eq(20).css({"border-right":"0"});
   });
   
   

 onerror = stopError;
 function stopError()

{
 return true;
 }

 


