Cufon.replace('h2, #navi a, button, a.btn, span.btn, .tabsNavi li, .perexBig, .ui-state-default a, .cuf', { hover: true, textShadow: '#fff 1px 1px' });
Cufon.replace('#storeMap h3');
Cufon.replace('a.btn2:not(.btn2Active)', { hover: { textShadow: '#9e2622 -1px -1px' }, textShadow: '#fff 1px 1px' });
Cufon.replace('a.btn2Active', { textShadow: '#9e2622 -1px -1px' });
Cufon.replace('a.btnOrange, a.btnOrangeBig', { hover: true, textShadow: '#d57600 -1px -1px' });
Cufon.replace('a.btnBlack', { hover: true, textShadow: '#222 -1px -1px' });
Cufon.replace('#countries a strong, #radCountriesSmall a strong, #radCountries a strong, #continents a strong', { hover: true });

function resizeFlash(height) {
	$("#flashContent", "#content").height(parseFloat(height)).attr("height", parseFloat(height));
}

$(document).ready(function() {

  if ($.browser.msie) {
    $('#hpNavi li').hover(function() {
        $(this).addClass('hover');
     }, function() {
        $(this).removeClass('hover');
    })
  }

	$('.tabs, .radTabs').each(function() {
		var tab = this;
		$('.tab, .radTab', tab).hide();
		if(window.location.hash) {
			var tabId = window.location.hash.split('#')[1].split(':')[0];
			$('#' + tabId).show();
			$('.tabsNavi li a[href$=#' + tabId + ']', tab).parent().addClass('active');
			$('.radTabsNavi li a[href$=#' + tabId + ']', tab).addClass('active');
		} else {
			$('.tab:first, .radTab:first', tab).show();
			$('.tabsNavi li:first, .radTabsNavi li:first a', tab).addClass('active');
		}

		$('.tabsNavi a, .radTabsNavi a', tab).click(function (event) {
			event.preventDefault();
			Cufon.replace($('.tabsNavi .active', tab), { hover: true, color: '#333', textShadow: '#fff 1px 1px' });
			$('.radTabsNavi .active', tab).removeClass('active');
			$('.tabsNavi .active', tab).removeClass('active').css({'background':'transparent'});
			if ($(this).parent().parent()[0].className == "radTabsNavi" ) {
				$(this).addClass('active');
			} else {
				$(this).parent().addClass('active').removeAttr('style');
			}
			$('.tab, .radTab', tab).hide();
			$($(this).attr('href')).show();
		});

	});

	$("p.arrows > a", "#slider2").click(function (event) {
		event.preventDefault();
		$(".radTabsNavi .active", ".radTabs").removeClass("active");
		$("#rad-" + $(this).attr("href").split("#")[1] + " a").addClass("active");
		$(".radTab", ".radTabs").hide();
		$($(this).attr("href"), ".radTabs").show();
	});



	$('.horizTabs').each(function() {
		var hTab = this;
		$('.horizTab', hTab).hide();
		if(window.location.hash) {
			var hTabId = window.location.hash.split(':')[1];
			if (!hTabId) {
				$('.horizTab:first', hTab).show();
				$('.horizTabsNavi li:first a', hTab).addClass('active');
			}
			$('#' + hTabId).show();
			$('.horizTabsNavi li a[href$=#' + window.location.hash.split('#')[1] + ']', hTab).addClass('active');
		} else {
			$('.horizTab:first', hTab).show();
			$('.horizTabsNavi li:first a', hTab).addClass('active');
		}

		$('.horizTabsNavi a', hTab).click(function (event) {
			event.preventDefault();
			$('.horizTabsNavi .active', hTab).removeClass('active');
			$(this).addClass('active');
			$('.horizTab', hTab).hide();
			$("#" + $(this).attr('href').split(':')[1]).show();
		});

	});



	$("a[rel=external]").each(function() {
		this.target = "_blank";
	});

  $('.jsHide').wrap('<div class="jsHideWrap" />');
  $('.jsHideWrap').hide();

});
