/*
<!-- popup box start-->
<link type="text/css" href="http://www.tokyozakka.com/js/himagic_cn/jquery-ui.css" rel="stylesheet" />
<script language="JavaScript" src="http://www.tokyozakka.com/js/himagic_cn/jquery.js"></script>
<script language="JavaScript" src="http://www.tokyozakka.com/js/himagic_cn/jquery-ui.js"></script>
<script language="JavaScript" src="http://www.tokyozakka.com/js/himagic_cn/popupbox.js"></script>
<!-- popup box end-->
//*/
try 
{
	jQuery.noConflict();
	var cookieKey = "time.login.magento.himagic.cn";
	var lastLogon = Mage.Cookies.get(cookieKey);
	//~~popup info box
	if (false)
	{
		if (lastLogon == null || (((new Date()).getTime() - lastLogon)/(60*60*1000)) >= 48)
		{
			Mage.Cookies.set(cookieKey, (new Date).getTime(), new Date((new Date).getTime() + 365*24*60*60*1000));
			if (Mage.Cookies.get(cookieKey) != null)
			{
				jQuery(function () 
				{
					jQuery.get("http://www.tokyozakka.com/js/himagic_cn/popupbox.html", function (data) 
					{
						jQuery(document.createElement("div")).attr("title", "Winter clear out! Everything must go! No, really... (^_^)").html(data).dialog({
							bgiframe: true
							, height: 360
							, width: 480
							, hide: "drop"
							, draggable: true
							, show: "drop"
							, resizable: false
							, modal: true
						});
					})
				});
			}
		}
	}

	//~~side tag
	if (true)
	{
		jQuery(function ($) 
		{
			$(document.createElement("div")).prependTo(document.body).css({"background-image": "url(http://www.tokyozakka.com/js/himagic_cn/feedback.png)", "color": "white", "top": "50px", "left": "0px", "position": "absolute", "cursor": "pointer", "width": 38, "height": 102, "margin-left": "-4px"}).hover(function () 
			{
				$(this).css("margin-left", "0px");
			}, function () 
			{
				$(this).css("margin-left", "-4px");
			}).click(function () 
			{
				window.location.href = "http://www.tokyozakka.com/contacts/";
			}).attr("id", "id_feedbackbtn");

			if (!$.browser.msie)
			{
				$("#id_feedbackbtn").css("position", "fixed");
			}
		});
	}

	//~~activated menu
	if (true)
	{
		jQuery(function ($) 
		{
			var hasExactlyEqual = false;
			$(".quick-access .shop-access").find("a").each(function () 
			{
				if (window.location.href.toLowerCase() == $(this).attr("href").toLowerCase())
				{
					$(this).addClass("shop-access-activated");
					hasExactlyEqual = $(this).attr("href");
				}
			});

			$(".quick-access .shop-access").find("a").each(function () 
			{
				if (window.location.href.toLowerCase().indexOf($(this).attr("href").toLowerCase()) != -1 && hasExactlyEqual === false)
				{
					$(this).addClass("shop-access-activated");
				}
				else if ($(this).attr("href") != hasExactlyEqual)
				{
					$(this).removeClass("shop-access-activated");
				}
			});
		});
	}
}
catch(e)
{
	//alert(e);
}

