var pathN = location.href;


var countryISO = "GB";
	if($.cookie('country_iso').length > 0){
		countryISO = $.cookie('country_iso'); 
	}


$(document).ready(function(){
						  
 // $(document).pngFix(); 
  ie6_CMS_NavigationFix();
  /*$("div.rev_holder").capslide({

			caption_color : 'white',

			caption_bgcolor : 'black',

			overlay_bgcolor : 'black',

			border : '',

			showcaption : true

  });*/				  
  $("ul#accountNav li:nth-child(2)").css({"display":"none"}); 	
  /*temp disable of nav lkins without content on top navigation*/
    $.each($("#topNavCategories_level_1 li a.level_1"),function(){
													  
	$(this).click(function(){
	  					   
					
		return false;
		
	 });								  
													  
	$(this).css({"cursor":"default"})
													  
   });
  $.each($("#topNavCategories_dept_clothing li a.level_2"),function(){
													  
	 $(this).click(function(){
	
		return false
	 });								  
		$(this).css({"cursor":"default"})											  
													  
													  
   });
  $("li#inspired_link a.disabled_link").click(function(){return false;}).css({"cursor":"default"});
   
  $("li#inspired_link ul a").css({"cursor":"pointer"});
});

// Inserts an iFrame behind the navigation menu drop-downs to fix a bug in IE6 where Select elements show through on top of menu items
function ie6_CMS_NavigationFix(){
	if ($.browser.msie && $.browser.version == 6) { // Checks for Internet Explorer 6
		menuItems = $("#post_top_nav > li.drop_down"); // Fills array menuItems with all list items (menu items) in navigation bar
	
		$.each(menuItems, function(i, n) { // For each loop on menuItems array
			
			$(this).hover(function(){ // Checks for hover event on menuItems
					
				var iframeWidth = ($(this).children('ul').width() + parseFloat($(this).children('ul').css('padding-left')) + parseFloat($(this).children('ul').css('padding-right'))) + 'px';
				
				$(this).addClass("hovering").children("ul").css('display', 'block').prepend("<iframe class='ie6_nav_block' frameBorder='0' src='/pws/blank.html'></iframe>"); // Displays the ul (drop-down menu) and creates the iFrame
				$("iframe.ie6_nav_block").css({'display' : 'block', 'z-index' : '-10', 'position' : 'absolute', 'top' : '0px', 'left' : '0px', 'width' : iframeWidth});

			}, function(){
				$("iframe.ie6_nav_block").remove();
				$(this).removeClass("hovering").children("ul").css('display', 'none');
			});
		});
	}
}
