/**
 * Template designed by zen-cart-power.net* 
 * Power your Zen Cart!

 * @copyright Copyright 2008-2011 Newlement
 */
	$(document).ready(function() {

			function myStart(){ 
				$(".tab_content").hide(); //Hide all content
				$("ul.tabs li").removeClass("active_t"); //Remove any "active" class
				if(location.hash != "") {
					var target = "#"+location.hash.split("#")[1]; // need semicolon at end of line
					$(location.hash).show(); //Show first tab content
					$("ul.tabs li:has(a[href="+target+"])").addClass("active_t").show(); //need ‘+’ either side of ‘target’
				} else {
					$("ul.tabs li:first").addClass("active_t").show(); //Activate first tab
					$(".tab_content:first").show(); //Show first tab content
				}
			}
	
			myStart();	
		
			$("a.detailed_image").fancybox({
				'titleShow'		: true,
				'titlePosition' : 'inside',
				'callbackOnStart': myStart
			});	

			//On Click Event
			$("ul.tabs li").click(function() {
				$("ul.tabs li").removeClass("active_t"); //Remove any "active" class
				$(this).addClass("active_t"); //Add "active" class to selected tab
				$(".tab_content").hide(); //Hide all tab content
				var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab content		
				$(activeTab).show();
				return false;
			});

			$("div#main_banner").cycle({
				fx: 'fade', //transition effects: shuffle, zoom, turnDown, curtainX
				timeout: 5000, //miliseconds between slide image change
				pause: 1,
				prev: '#previous',
				next: '#next'
			});

//			$("#banner_area").hover(function() {
//			$("div#controls").fadeIn();
//			},
//			function() {
//				$("div#controls").fadeOut();
//			}); 
		});
