var $j = jQuery.noConflict();//-----------------jQuery(document).ready(function() {    if($j(".featured_art").length>0){		$j('.featured_art').jcarousel({			  scroll: 5,			animation: 1000		});	}	//-------------------------		$j(".theme").colorbox({width:"550", inline:true, href:"#select_theme", opacity : 0.75});	//-------------------------	//$j('.tab_block_cont h2').click(function() {//		$j(this).toggleClass('selected').next().slideToggle('slow');//		return false;//	}).next().hide();	//$j('#hiddenClick').colorbox({width:"610", inline:true, href:"#product", opacity : 0.75});	//$j($j('.tab_block_cont h2').get(1)).click();				//---------------------	/*if($j.browser.msie && jQuery.browser.version < 7){		var hhsel = null;		$j('#banner_nav > a').click(function(){											$j('#banner_nav > a').css('background-position', 'right top');			$j(this).css('background-position', '0 0');			hhsel = $j(this).get(0);		 });		$j('#banner_nav > a').hover(function() {				$j(this).css('background-position', '0 0');		},		function() {			if($j(this).get(0).className.indexOf('active', 0) == -1 ){				$j(this).css('background-position', 'right top');			}				})	}*/	//---------------------		$j("#ytube_video_link").colorbox({ inline:true, href:"#ytube_video"}); function are_cookies_enabled(){	var cookieEnabled = (navigator.cookieEnabled) ? true : false;	if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled)	{ 		document.cookie="testcookie";		cookieEnabled = (document.cookie.indexOf("testcookie") != -1) ? true : false;	}	return (cookieEnabled);}//*********Subscription Pop UP********************************var isballs = $j("body").hasClass('category-i-hate-balls-shop');if(are_cookies_enabled() && !isballs){				var key_value = "myTestCookie=true"; 		var foundCookie = 0; 		var date = new Date();		var days = 30;		date.setTime(date.getTime()+(days*24*60*60*1000));		var expires = "; expires="+date.toGMTString();		// Get all the cookies from this site and store in an array 		var cookieArray = document.cookie.split(';');     		// Walk through the array     		for(var i=0;i < cookieArray.length;i++)         		{                		var checkCookie = cookieArray[i];         		// Remove any leading spaces                		while (checkCookie.charAt(0)==' ')                		{                 		 checkCookie = checkCookie.substring(1,checkCookie.length);                		}                 		// Look for cookie set by key_value                		 if (checkCookie.indexOf(key_value) == 0)               		 {                   		//alert("Found Cookie ");             		// The cookie was found so set the variable                    		foundCookie = 1; 						console.log('cookie found');               		}     		}     		// Check if a cookie has been found     		if ( foundCookie == 0)     		{         		// The key_value cookie was not found so set it now         		document.cookie = key_value+expires;                         $j.fn.colorbox({                                          href:"subscribe-pop-up",                                          iframe:false,                                          onOpen: function(){addTheme("theme2");},                                          onClosed:function(){removeTheme("theme2");},                                          opacity : 0.75                        });			console.log('pop up shown');    		} }//end subscription pop up	function addTheme(id){		$j("#cboxOverlay, #colorbox").addClass(id);	}	function removeTheme(id){		$j("#cboxOverlay, #colorbox").removeClass(id);	}});//------------------------$j('#theme_preview').cycle({     fx:     'scrollRight',     speed:  500,     timeout: 0,     pager:  '.theme_nav', 	    pagerAnchorBuilder: function(idx, slide) {         // return selector string for existing anchor 		return '.theme_nav li:eq(' + idx + ') a';     }});$j('#theme_thumbs').cycle({     fx:     'scrollHorz',     speed:  500,     timeout: 0, 	continuous: 0,    prev:   '#theme_prev',     next:   '#theme_next'  });//-----------------------//-----------------------$j('#banner_slideshow').cycle({ 	fx:      'scrollHorz',	timeout:  7000,	speed:    1000,	pager:   '#banner_nav'});//------------------------$j(function() {    var maxHeight = 0;	$j('.equal_height').each(function(){        if (maxHeight < $j(this).height()) {maxHeight = $j(this).height()}    });	$j('.equal_height').each(function(){        $j(this).height(maxHeight);    });		//$j('.col-left').height(maxHeight-95)});//--------------------------$j(function() {    var maxHeight = 0;	$j('.equal_height1').each(function(){        if (maxHeight < $j(this).height()) {maxHeight = $j(this).height()}    });	$j('.equal_height1').each(function(){        $j(this).height(maxHeight);    });		//$j('.col-left').height(maxHeight-95)		//Chat Close Control	$j(".chatclose").click(function(){		$j("#livechat_messages").html("");		$j(".mini-livechat").fadeOut("slow");	});		$j(".livechatopen").click(function(){		$j("#livechat_messages").html("");		$j(".mini-livechat").fadeIn("slow");	});		});//Function for set Body Backgroung image//See page/html/header.phtmlfunction setBodyBgImage(imagePath){	//Set the form hidden field to the parameter	$j("#bodybgfield").val(imagePath);	return true;}function openQuickOrder(productId,url){		jQuery(".cart_popup_wrap").fadeOut("slow");		jQuery("#ajaxquickview-"+productId).fadeIn("slow");					 beforAjaxWaiting(productId,url);				jQuery.ajax({				  url: 'https://www.davidandgoliathtees.com/quick/product/view?id='+productId,				  success: function(data) {					afterAjaxWaiting(productId);										jQuery("#ajaxquickview-"+productId).html(data).fadeIn("slow");								  }				});				 return false;}function beforAjaxWaiting(divid,url){	var jsUrl = url.replace('index.php/','');	jQuery("#ajaxquickview-"+divid).css('display','block');	//jQuery("#quick-"+divid).fadeIn("slow");	jQuery("#ajaxquickview-"+divid).html('<div class="cart_popup_wrap"><div class="cart_popup_cont rel"><img style="padding:92px 0px 97px 142px;" src="'+jsUrl+'js/dandg/ajax-loader.gif"></div></div>');	}function afterAjaxWaiting(divid){	jQuery("#ajaxquickview-"+divid).css('display','block');	jQuery("#ajaxquickview-"+divid).html('');	}function hideQuickOrder(divid){	jQuery("#ajaxquickview-"+divid).css('display','none');	jQuery("#ajaxquickview-"+divid).fadeOut();}
