if(typeof WSC=="undefined"){var WSC={};}(function($){	WSC.ProductTab = function(){		var	elements = ['Description', 'Photos', 'Friend','Tour','Retailers','Wish','Videos'];			var _load = function(){			/* Set the height with js incase the user doesn't have js on */			$('#product_left').height('400px'); 			/* loop through and set click listener */			for (var i=0, j=elements.length; i<j; i++){				var nav = $('#nav_'+ elements[i]);				if (nav && nav.size()){nav.click(function(){_onClick(this);});}			}						_show(_getInitialTab());		};		var _isTab = function(value){			var i;			for (i=0, j=elements.length; i < j; i++) {				if (elements[i] === value) { return true;}			}			return false;		};		var _getInitialTab = function() {			var loc = elements[0];			if(document.location.href.match(/#(\w.+)/)) {				var hash = RegExp.$1;				if (_isTab(hash)){loc=hash;}			}			return loc;		};		var _hide = function(){			$('#tab_'+ elements.join(',#tab_')).addClass('hide');			$('#nav_'+ elements.join(',#nav_')).removeClass('selected');		};		var _onClick = function(elm){			/* check if it is the element we want */			if(elm && elm.id.match('nav_')){				var id = elm.id.replace('nav_','');				_show(id);			}		};				var _show = function(tab){			/* Hide all */			_hide();			$('#tab_'+ tab).removeClass('hide');			$('#nav_'+ tab).addClass('selected');						if(tab == "Tour") {				$('#product_right').addClass('hide');				$('#product_right').width('0px');								$('#product_cart_add').addClass('hide');				$('#product_cart_add').width('0px');								$('#product_left').width('547px');				$('#product_header').width('555px');			}			else {				$('#product_right').removeClass('hide');				$('#product_right').width('111px');								$('#product_cart_add').removeClass('hide');				$('#product_cart_add').width('133px');								$('#product_left').width('418px');				$('#product_header').width('430px');			}		};		//the returned object here will become WSC.ProductTab:		return  {				init : function(){				$(function(){_load();}); 			}					};	}();})(jQuery);WSC.ProductTab.init();