
$(document).ready(function(){


var flexsliderFeatured = jQuery('.ui-tabs-panel .holder').flexslider({
	    animation: "slide",  
		easing: "easeInQuart",  
	    itemWidth: getGridSize(),
    	itemMargin: 0,
	    minItems: 1,
	    maxItems: 5,    
	    selector: ".slides > .ajax_block_product",
	    prevText: "",
    	nextText: "",
	    controlNav: false,
	    start : function(){
	      flexsliderFeatured = this;
	    }
	  });

 // featured homepage slider - function below to make it respoisnve slider 
	var $window = $(window);
  function getGridSize(){
    var container = $('.container_12').width();  
	if(container >= 1200){      
      return 280;
    }  
    else if(container >= 768 && container < 1200){      
      return 228;
    }
    else if(container >= 480 && container < 768){      
      return 240;      
    }
    else if(container < 480){
      return 300;
    }
  } 

 });
 
$("#footCategories").click(function () {
			$("#footCategories, #footCat").toggleClass("open");
}); 

$("#myAccountButton").click(function () {
			$("#myAccountButton, #myAccountFoot").toggleClass("open");
}); 

$("#footContactButton").click(function () {
			$("#footContactButton, #footContactinfo").toggleClass("open");
}); 

$("#footCmsButton").click(function () {
			$("#footCmsButton, #footCmsLinks").toggleClass("open");
});


//$(document).ready(function(){
//			
//		  if (runFancy) {
//         
   //
//	$(".holder li").hover(
//  function () {
//	$(".holder li").not(this).stop().fadeTo(400, 0.85);
//  },
//  function () {
//	$(".holder li").not(this).stop().fadeTo(400, 1.0);
// }
//);		 
//}
//
//
//
//
//		});
//		
//
//		
//		
//		$(window).load(function() {
//  $('.holder').flexslider({
//	  
//			namespace: "flex-",
//			animation: "slide",
//			easing: "swing",
//			slideshow: false,
//			animationLoop: false,
//			animationSpeed: 700,
//			pauseOnHover: true,
//			controlNav: false, 
//			itemWidth:  228, 
//			minItems: flexmin,                    //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
//			maxItems: flexmax, 
//			move: 0		});	
//
//$(window).resize(function() {
//	    try {
//$('.holder').flexslider(0);
//if($('.container_12').width()<=228){ $('.holder').data('flexslider').setOpts({minItems: 1, maxItems: 1});
//}
//else if($('.container_12').width()<=456){ $('.holder').data('flexslider').setOpts({minItems: 2, maxItems: 2});}
//else if($('.container_12').width()<912){ $('.holder').data('flexslider').setOpts({minItems: 3, maxItems: 3});}
//else if($('.container_12').width()>=1140){ $('.holder').data('flexslider').setOpts({minItems: 1, maxItems: 5});}
//else if($('.container_12').width()>=737){ $('.holder').data('flexslider').setOpts({minItems: 1, maxItems: 4});}
//        
//		} catch(e) {
//            // handle all your exceptions here
//        }
//
//});
//});
//  
//  
//var flexmin = 1;
//var flexmax = 5;
//$(document).ready(function(){
//	if($('.holder').width()<=228){flexmin = 1;  flexmax = 1;}
//else if($('.holder').width()<=456){flexmin = 2;  flexmax = 2;}
//else if($('.holder').width()<912){ flexmin = 3;  flexmax = 3;}
//else if($('.holder').width()>=1140){ flexmin = 1;  flexmax = 5; }
//else if($('.holder').width()>=737){ flexmin = 1;  flexmax = 4; }
//
//	});
//	
//var manFlexMin = 2;
//var manFlexmMax = 10;
//$(document).ready(function(){
//	
//if($('.holder').width()<=228){manFlexMin = 1;  manFlexmMax  = 1;}
//else if($('.holder').width()<=456){manFlexMin = 2;  manFlexmMax  = 2;}
//else if($('.holder').width()<912){ manFlexMin = 5;  manFlexmMax  = 5;}
//else if($('.holder').width()>=1140){ manFlexMin = 2;  manFlexmMax  = 10;  }
//else if($('.holder').width()>=737){ manFlexMin = 2;  manFlexmMax  = 8; }
//	});

