
	/* ////////////////////////////////////////////////////////////////////////////////////
	=======================================================================================
		Setting Class and Associations
	======================================================================================= 
	//////////////////////////////////////////////////////////////////////////////////// */
	
	$(document).ready(function(){
						
						
			// SELECTORS | First, Last, Odd, Even
			$("#MainContentWrap .section:first").addClass("FirstSection"); 
			$("#MainContentWrap .section:last").addClass("LastSection");  
			$("#FullWidthWrap .section:first").addClass("FirstSection"); 
			$(".Pag ul li:last").addClass("lastinnav"); 
			

					
			// COLOR BOX - Popup Photo/Slideshow  
			$("a[rel='photo']").colorbox({transition:"elastic"}); // News Photo_Viewer
			$("a[rel='AvailColors']").colorbox({transition:"elastic"}); // Products AvailColors
			
				
			
	}); //END
		

	
	/* ////////////////////////////////////////////////////////////////////////////////////
	=======================================================================================
		Functions
	======================================================================================= 
	//////////////////////////////////////////////////////////////////////////////////// */
	
	
	$(document).ready(function(){	
		
		
			//  Smart Colums
			function smartColumns() {		
				$("ul.column").css({ 'width' : "100%"});
				
				var colWrap = $("ul.column").width();
				var colNum = Math.floor(colWrap / 140);
				var colFixed = Math.floor(colWrap / colNum);
				
				$("ul.column").css({ 'width' : colWrap});
				$("ul.column li").css({ 'width' : colFixed});	
			}
			
			smartColumns();	 
				$(window).resize(function () {
				smartColumns();		
			}); 
				
			
		
			
			// EXTERNAL LINKS - Attach _blank & external class to all outgoing URLs
			$.fn.externalLink = function() {
				return this.each(function() {
					$(this).addClass('external').attr('target', '_blank');
				});
			}
			
			$(function(){ // call onload
				$('a[href^="http://"]').externalLink();
			});
			
			$("img.thumbproduct").bind("click", function($param) {
				  $("img.thumbproduct").removeClass('current_viewing');
				  $(this).addClass('current_viewing');
			});

				

			
			
	}); //END
		
	function swapProductImage($url,$id,$catID){
		
		$('#'+$id).attr("src",$url);
		$('#catalogIDHolder').html($catID); 
	}
			
	/* ////////////////////////////////////////////////////////////////////////////////////
	=======================================================================================
		
	// JQUERY HOVER SCRIPT for toggling the hover state in browsers that don't support the ":hover" pseudo class, like IE 6 
			$(function(){
				$('.submitBtn').hover(
					// mouseover
					function(){ $(this).addClass('submitBtnHover'); },
					
					// mouseout
					function(){ $(this).removeClass('submitBtnHover'); }
				);	
			});
			
			/// RESOURCES
		
	J Query Cycle - Feature_Scroller
		http://www.malsup.com/jquery/cycle/
	
	Switch/Toggle Display & Smart Colums
		www.sohtanaka.com/web-design/smart-columns-w-css-jquery/  
		www.sohtanaka.com/web-design/examples/display-switch/
	
	COLOR BOX - Popup Photo/Slideshow
		http://colorpowered.com/colorbox/
		
		
			//  SwitchView Toggle to Change Display Class 
	$("a.Switch_View").toggle(function(){
								  
		$(this).addClass("swap_View"); 
		$("ul.display").fadeOut("fast", function() {
		$(this).fadeIn("fast").addClass("compact_view"); 
		
		});
		
		}, function () {
			
			$(this).removeClass("swap_View");
			$("ul.display").fadeOut("fast", function() {
			$(this).fadeIn("fast").removeClass("compact_view");
			
		});
	});
	
	
	//  SwitchSize Toggle to Change Site to Liquid 
	$("a.Switch_Layout").toggle(function(){
								  
		$(this).addClass("swap_Layout"); 
		$("#Wrap").fadeOut("fast", function() {
		$(this).fadeIn("fast").addClass("Liquid"); 
		
		});
		
		}, function () {
			
			$(this).removeClass("swap_Layout");
			$("#Wrap").fadeOut("fast", function() {
			$(this).fadeIn("fast").removeClass("Liquid");
			
		});
	}); 
	
	
	
	
	
	
	
	
			(function($) {
			$.fn.smartColumns = function(options) {
			var opts = $.extend({}, $.fn.smartColumns.defaults, options);
			
			$(this).css({ 'width' : "100%"})
			
			var colWrap = $(this).width();
			var colNum = Math.floor(colWrap / opts.dimensions);
			var colFixed = Math.floor(colWrap / colNum);
			
			$(this).css({ 'width' : colWrap})
			$(this).children('li').css({ 'width' : colFixed});
			
			return $(this);
			};
			
			$.fn.smartColumns.defaults = {
			dimensions : 200
			};
			})(jQuery);
			
			Call it like this:
			$(’ul.column’).smartColumns();
			
			Or hand in the dimension:
			$(’ul.column’).smartColumns({ dimensions : 300 });
	
	
	
	
	
	
	
	
	
	
	======================================================================================= 
	//////////////////////////////////////////////////////////////////////////////////// */
	
	
	
	
	
	
	
	

			

		