Cufon.replace('h1', {
	hover: true,
	fontFamily: 'avant-garde'
});

Cufon.replace('h2', {
	hover: true,
	fontFamily: 'avant-garde'
});

Cufon.replace('h3', {
	hover: true,
	fontFamily: 'avant-garde'
});
	
Cufon.replace('.toplinks-bar .welcome', {
	hover: true,
	fontFamily: 'avant-garde'
});

Cufon.replace('.toplinks-bar .top-links', {
	hover: true,
	fontFamily: 'avant-garde'
});

Cufon.replace('#nav', {
	hover: true,
	fontFamily: 'avant-garde'
});

Cufon.replace('.footer-strap', {
	hover: true,
	fontFamily: 'avant-garde'
});

Cufon.replace('.footer-strap', {
	hover: true,
	fontFamily: 'avant-garde'
});

Cufon.replace('#side-nav li.level0', {
	hover: true,
	fontFamily: 'avant-garde'
});

Cufon.replace('.base-mini h4', {
	hover: true,
	fontFamily: 'avant-garde'
});

Cufon.replace('.mini-cart h5', {
	hover: true,
	fontFamily: 'avant-garde'
});

Cufon.replace('.home-right-wrapper h4', {
	hover: true,
	fontFamily: 'avant-garde'
});

Cufon.replace('#mc_embed_signup h2', {
	hover: true,
	fontFamily: 'avant-garde'
})

var $j = jQuery.noConflict(); 

function showPic(whichpic) {
	var source = whichpic.getAttribute("href");
	var placeholder = document.getElementById("image");
	placeholder.setAttribute("src",source);
}

function prepareGallery() {
	if (!document.getElementsByTagName) return false;
	if (!document.getElementById) return false;
	if (!document.getElementById) return false;
	if (!document.getElementById("swapDetail")) return false;	
	var gallery = document.getElementById("swapDetail");
	var links = gallery.getElementsByTagName("a");
	for (var i=0; i < links.length; i++) {
		links[i].onclick = function() {
			showPic(this);
			removeSpans();
			zoomImage(); 
			return false;
		}
	}
}
document.observe("dom:loaded", function() {
	$('main').addClassName('hasJS');
	prepareGallery();
	new Horinaja('slider',0.6,6,true,false,0);
	
 });

$j(document).ready(function(){
    $j("body").addClass("hasJS");
	$j("div.home-categories div.home-cat-box a").hover(function() {
		$j(this).stop().animate({"opacity": "0"}, "slow");
	},
	function() {
		$j(this).stop().animate({"opacity": "1"}, "slow");
	});
	$j("div.product-categories div.prod-cat-box a").hover(function() {
		$j(this).stop().animate({"opacity": "0"}, "slow");
	},
	function() {
		$j(this).stop().animate({"opacity": "1"}, "slow");
	});
	$j("p.product-image a img").hover(
	function() {
	$j(this).stop().animate({"opacity": "0.6"},  "slow");
	},
	function() {
	$j(this).stop().animate({"opacity": "1"},  "slow");
	});
	zoomImage();
	tabbedContent();
});

function removeSpans() {
	$j('span.eiz-magnifier').remove();
}

function zoomImage() {
	$j('div.product-img-box p.product-image-zoom img').epicZoom({ magnification: 1, hideCursor: true });
}

function tabbedContent() {
	$j("div.panes div").hide(); //Hide all content
		$j("ul.tabbed li:first").addClass("active").show(); //Activate first tab
		$j("div.panes div:first").show(); //Show first tab content

		//On Click Event
		$j("ul.tabbed li").click(function() {

			$j("ul.tabbed li").removeClass("active"); //Remove any "active" class
			$j(this).addClass("active"); //Add "active" class to selected tab
			$j("div.panes div").hide(); //Hide all tab content

			var activeTab = $j(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
			$j(activeTab).fadeIn(); //Fade in the active ID content
			return false;
		});
}

