$(function() {
	$("div.div_menu_button img").hover(
      function () {
        src = $(this).attr("src");

        if ($(this).hasClass("inactive")) {
            src = src.substr(0, src.length - 13) + "_active.jpg";
        } else {
        	src = src.substr(0, src.length - 4) + "_active.jpg";
		}

        $(this).attr("src", src);
      },
      function () {
        src = $(this).attr("src");

        if ($(this).hasClass("inactive")) {
            src = src.substr(0, src.length - 11) + "_inactive.jpg";
        } else {
        	src = src.substr(0, src.length - 11) + ".jpg";
        }

        $(this).attr("src", src);
      }
    );

    $("div#div_menu_back a").click(function () {
		window.history.back();
		return false;
	});

    if (location.href.match(/.*shop.*/)) {
        $.swfobject.embedSWF("jaxx_logo_2_shop.swf", "div_header_logo", "1024", "339", "8.0.0");
	} else {
    	$.swfobject.embedSWF("jaxx_logo_2.swf", "div_header_logo", "1024", "339", "8.0.0");
    }
});
