ddsmoothmenu.init({mainmenuid: "gNavi",orientation: 'h',contentsource: "markup"});

$(function() {
	$("#footGift").accordion({
		active: false,
		autoHeight: false,
		header: "dt:not(.single)",
		alwaysOpen: false
	});

	$("#hNavi li").not(":last").each(function(i) {
		if(i != 0) $("em", this).addClass("s");
		$(this)
			.click(function () {
				location.href = $('a', this).attr("href");
			})
			.hover(
				function () {
					showTooltip($(this));
				},
				function () {
					hideTooltip($(this));
				}
			)
	});


	$('#gNavi img[src*="'+$("body").attr("id")+'"]').each (function(){
		$(this).attr("src", $(this).attr("src").replace("_off.", "_on."));
	});

	$('#gNavi a[href$="/gift/about/"]').parent().css("display", "none");
	$('#gNavi a[href$="/gift/about/order.html"]').parent().css("display", "none");
	$('#gNavi a[href$="/gift/about/recycle.html"]').parent().css("display", "none");

	$('#footGift a[href$="/gift/about/"]').parent().css("display", "none");
	$('#footGift a[href$="/gift/about/order.html"]').parent().css("display", "none");
	$('#footGift a[href$="/gift/about/recycle.html"]').parent().css("display", "none");

	/***********************************************
	* Encrypt Email script- Please keep notice intact
	* Tool URL: http://www.dynamicdrive.com/emailriddler/
	* **********************************************/
	<!-- Encrypted version of: info [at] ********.*** //-->

	var emailriddlerarray=[105,110,102,111,64,103,114,101,101,110,45,121,97,46,99,111,109]
	var encryptedemail_id42='' //variable to contain encrypted email 
	for (var i=0; i<emailriddlerarray.length; i++)
	encryptedemail_id42+=String.fromCharCode(emailriddlerarray[i])

//	document.write('<a href="mailto:'+encryptedemail_id42+'"><img src="yourimage.gif" alt="Email Us" /></a>')
	$('#mailContact a:eq(0)').attr("href", "mailto:"+encryptedemail_id42);
	$('a#mailOrder').attr("href", "mailto:"+encryptedemail_id42);
});

function showTooltip(e){
	var position = e.position();
	var t = 37;
	$("em",e)
		.stop()
		.css({'top':(t - 10) + 'px','opacity':0,'display':'block'})
		.animate({
			opacity: 1,
			top: t + 'px'
		}, 200);
}
function hideTooltip(e){
	$("em",e)
		.stop()
		.fadeOut(200);
}


