
	// kræver jquery
	function findreplace(el, find, rep) {
		try{$(el).html($(el).html().replace(find, rep))}catch(e){};
	}

	function getCookie(c_name)
	{
	if (document.cookie.length>0)
	  {
	  c_start=document.cookie.indexOf(c_name + "=");
	  if (c_start!=-1)
		{
		c_start=c_start + c_name.length+1;
		c_end=document.cookie.indexOf(";",c_start);
		if (c_end==-1) c_end=document.cookie.length;
		return unescape(document.cookie.substring(c_start,c_end));
		}
	  }
	return "";
	}
	
	function setCookie(c_name,value,expiredays)
	{
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+
	((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
	}

	domReady(function(){
//	$(document).ready(function(){	
		// Loader productmenu
		cn_init_menu(document.getElementById('ProductMenu_Table'),1)

		// identificere alle menupunkter - tildeler class
		var i = 1;
		$('#ShopLayOut_Topmenu_TD a').each(
			function() {
				if (this.className != 'TopMenuSpace') $(this).attr('id', 'menu'+i++);
			}
		)
		
		// Laver div-tag rundt om menu'en
		$('#ShopLayOut_Topmenu_TD').html('<div class="TopmenuDIV">'+ $('#ShopLayOut_Topmenu_TD').html() +'</div>')
		

		// Tildele table's ID'er i steps
		var i = 1;
		$('.CustomerInfo_OrderStep3 table').each(
			function() {
				$(this).attr('id', 'CustomerInfo_OrderStep3_Table'+i++)
			}
		)

		$('#CustomerInfo_OrderStep3_Table3').each(function(){
			$(this).css('width', '100%');
			$(this).before('<a href="javascript:history.go(-2)"><img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/BN-ret.png" align="right" style="position:relative;top:18px;" /></a>');
		})

		$('#CustomerInfo_OrderStep3_Table4').each(function(){
			$('#CustomerInfo_OrderStep3_Table4').css('width', '100%');
			$(this).before('<a href="javascript:history.go(-1)"><img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/BN-ret.png" align="right" style="position:relative;top:2px;" /></a>');
		})
		
		$('.SmallProductInfo').each(function(){
			if ($(this).find('.SpecialPrice strike').text() == ''){
				$(this).find('.SpecialPrice br').css('display','none')				
			}
		})
		
		// Fjerner bindestreg i starten af et produktnavn
		$('.niv1, .niv2, .niv3, .niv4, .niv5').each(function(){
			if ($(this).text().substring(0,1) == '-'){
				$(this).text($(this).text().substring(1,999))
			}
		})

/*

		// Hvis taget <i></i> er i text så lav hide på den
		$('.niv1, .niv2, .niv3, .niv4, .niv5, .SubCats_Prodlink, .Deactiv_Productmenu').each(function(){
			if ($(this).html().toLowerCase().indexOf('<i>') != -1){
				$(this).find('I').css('display','none')
//				$(this).html($(this).html().replace('<I>','<I style="display:none;">'))
//				$(this).html($(this).html().replace('</I>&nbsp;','</I>'))
			}
		})
*/

/*

		// Hvis taget <i></i> er i text så lav hide på den
		$('.niv1, .niv2, .niv3, .niv4, .niv5, .SubCats_Prodlink').each(function(){
//			alert($(this).find('i').html())
			$(this).find('i').css('display','none')
//				$(this).html($(this).html().replace('<I>','<I style="display:none;">'))
//				$(this).html($(this).html().replace('</I>&nbsp;','</I>'))
		})
*/

		
		// Fjerner billeder i menu
		$('.SubCategory1_Productmenu a img').css('display', 'none');

		//Fjerne mellemrum i menu
		$('.SubCategoryIndent1_Productmenu, .SubCategoryIndent2_Productmenu, .SubCategoryIndent3_Productmenu, .SubCategoryIndent4_Productmenu, .SubCategoryIndent5_Productmenu').css('display','none');


		// For skjule print på kvitering
		$('.BackGroundColor1_OrderStep4 a:parent').css('display', 'none');


		// Giv niv's en ekstra class i tilfælde af u-tag
		$('.RootCategory_Productmenu a u').each(function(){
			$(this).parent().addClass('specialniv');
		})

	

		// Ved fejlside skriver den Kategorinavn i stedet for [[CATEGORYNAME]]
		if (document.getElementById('ProductList_TD') != null){
			if ($('#ProductList_TD').html().indexOf('[[CATEGORYNAME]]') != -1){
				
				if (Keyword != ''){$('.EmtyList a').css('display', 'none');}
				
				$('#ProductList_TD *').each(function(){
					if ($('#ProductList_TD').html().indexOf('[[CATEGORYNAME]]') != -1){
						findreplace('#ProductList_TD','[[CATEGORYNAME]]',$('.Activ_Productmenu').text());
					}
				})
			}
		}

		// laver et span rundt om alle niv 1
		$('.niv1').each(function(){
			$(this).after('<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-productmenu-line.png">');
		})

			$('.SubMenu_Productmenu_Table').after('<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-productmenu-line.png">');




		// laver et span rundt om alle menupunkter
		$('#ShopLayOut_Topmenu_TD a').each(function(){
			$(this).wrap('<span class="topmenu"></span>');
		})

		// laver et span inde i alle menupunkter
		$('#ShopLayOut_Topmenu_TD a').each(function(){
			$(this).html('<span class="innerMenu">'+ $(this).html() +'<span class="MenuSpacer"></span></span>')
		})
		
		// Insætter pris i fragt hvor der ikke står noget som standart
		if ($('#ShippingFee').html()  != null){
			if	($('#ShippingFee').html() == ''){
					$('#ShippingFee').text('0,00 DKK')
			}
		}
		

		// Indhold der flytter posison
		// Infokort bytter om på tekstpossion
		if ($('#MoveFrom').html()  != null){
			if ($('#MoveTo').html()  == ''){
				document.getElementById('MoveTo').innerHTML = document.getElementById('MoveFrom').innerHTML
				document.getElementById('MoveFrom').innerHTML = ''
				$('#MoveFrom').css('display', 'none');
			}
		}

		$('p').each(function(){
			if ($(this).text()  == ''){
				$(this).css('display','none');
			}
		})
		

		// Hvis ingen indhold i div's på Infokort
		if (ProductNumber  != ''){
//			alert('')
			if ($('#Canvas').html() == ''){$('#Canvas').css('display', 'none');}
			if ($('#Selector').html() == ''){$('#Selector').css('display', 'none');}
		}
		
		// Steps - overskrifter
		if ($('#OrderStep1_TD').html() != null){
			$('#OrderStep1_TD h1').css('display', 'none')
			$('#OrderStep1_TD').prepend('<h1>'+ $('#OrderStep1_TD h1').text() +'</h1>')
		}

		if ($('#OrderStep2_TD').html() != null){
			$('#OrderStep2_TD h1').css('display', 'none')
			$('#OrderStep2_TD').prepend('<h1>'+ $('#OrderStep2_TD h1').text() +'</h1>')
		}

		// laver et span rundt om Step 3
		if ($('#OrderStep3_TD').html() != null){
			$('#OrderStep3_TD h1').css('display', 'none')
			$('#OrderStep3_TD').prepend('<h1>'+ $('#OrderStep3_TD h1').text() +'</h1>')
		}
		if ($('#OrderStep4_TD').html() != null){
			$('#OrderStep4_TD h1').css('display', 'none')
			$('#OrderStep4_TD').prepend('<h1>'+ $('#OrderStep4_TD h1').text() +'</h1>')
		}


		// TABS
		var uri = location.href;
			
		if (uri.indexOf('/shop/cms-29.html') != -1){

			$('#menu2').css({'background-image':'url(https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-active.png)','color':'#000000'});
			$('#ShopLayOut_Topmenu_TD #menu2').each(function(){
				$(this).html('<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-left.png" class="TabLeft">'+ $(this).html() +'<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-right.png" class="TabRight">')
			})

		}else if (uri.indexOf('/shop/cms-30.html') != -1){

			$('#menu3').css({'background-image':'url(https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-active.png)','color':'#000000'});
			$('#ShopLayOut_Topmenu_TD #menu3').each(function(){
				$(this).html('<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-left.png" class="TabLeft">'+ $(this).html() +'<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-right.png" class="TabRight">')
			})

		}else if (uri.indexOf('/shop/customer.html') != -1){

			$('#menu4').css({'background-image':'url(https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-active.png)','color':'#000000'});
			$('#ShopLayOut_Topmenu_TD #menu4').each(function(){
				$(this).html('<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-left.png" class="TabLeft">'+ $(this).html() +'<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-right.png" class="TabRight">')
			})

		}else if (uri.indexOf('/shop/cms-18.html') != -1){

			$('#menu5').css({'background-image':'url(https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-active.png)','color':'#000000'});
			$('#ShopLayOut_Topmenu_TD #menu5').each(function(){
				$(this).html('<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-left.png" class="TabLeft">'+ $(this).html() +'<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-right.png" class="TabRight">')
			})

		}else if (uri.indexOf('/shop/news-ALL-1.html') != -1){

			$('#menu6').css({'background-image':'url(https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-active.png)','color':'#000000'});
			$('#ShopLayOut_Topmenu_TD #menu6').each(function(){
				$(this).html('<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-left.png" class="TabLeft">'+ $(this).html() +'<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-right.png" class="TabRight">')
			})

		}else if (uri.indexOf('/shop/cms-13.html') != -1){

			$('#menu7').css({'background-image':'url(https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-active.png)','color':'#000000'});
			$('#ShopLayOut_Topmenu_TD #menu7').each(function(){
				$(this).html('<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-left.png" class="TabLeft">'+ $(this).html() +'<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-right.png" class="TabRight">')
			})

		}else if (uri.indexOf('/shop/frontpage.html') != -1){

			$('#menu1').css({'background-image':'url(https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-active.png)','color':'#000000'});
			$('#ShopLayOut_Topmenu_TD #menu1').each(function(){
				$(this).html('<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-left.png" class="TabLeft">'+ $(this).html() +'<img src="https://pay.dandomain.dk/securetunnel-bin.asp?url=http://www.batterinet.dk/design/background-menu-right.png" class="TabRight">')
			})

		}





		// Sætter overskrift på Anbefal
		$('#TipFriend_TD').html('<h1>Anbefal</h1>'+$('#TipFriend_TD').html());
		// Laver brede på table 100%
		findreplace('#TipFriend_TD','400','100%');

		// Overskrift til sub kategori
		if ($('#ProductList_TD').html()  != null){
		if	($('#ProductList_TD').html().toLowerCase().indexOf('<h1>') == -1){
//			alert($('.Activ_Productmenu').html())
			$('#ProductList_TD').html('<h1>'+ $('.Activ_Productmenu').text() +'</h1><br><table border="0" cellspacing="0" cellpadding="0" width="730" align="center"><tbody><tr><td valign="top" width="430"><table border="0" cellspacing="0" cellpadding="0" width="100%" align="center"><tbody><tr><td class="CellName3" style="border-top:1px solid #cacaca;">'+ $('#ProductList_TD').html() +'</td></tr></tbody></table></td><td valign="top" width="10">&nbsp;</td><td class="CellName2" valign="middle" rowspan="2" width="290" align="center"><img alt="" src="/design/bat.png" /></td></tr></tbody></table><br /></td></tr></table>')
//			$('#ProductList_TD').html('<h1>'+ $('.Activ_Productmenu').text() +'</h1><br><span style="border-top:1px solid #cacaca;">'+ $('#ProductList_TD').html() +'</span>')
		}
		}
		
		
		

		// Overskrift til nyheder
		if	(location.href.indexOf('pay.dandomain.dk') != -1){
			$('#CreditCardPayment_TD').html('<h1>Betaling med kort</h1>'+ $('#CreditCardPayment_TD').html());
			$('#CreditCardPayment_TD form').css('margin-left','30px');
			$('#CreditCardPayment_TD table td').css('white-space','nowrap');
		}

		// Overskrift til nyheder
		if	(location.href.indexOf('news-ALL-1.html') != -1){
			$('#ProductList_TD h1').text('Nyheder');
		}

		// Overskrift til tilbud
		if	(location.href.indexOf('specialoffer-ALL-1.html') != -1){
			$('#ProductList_TD h1').text('Tilbud');
		}


			Keyword=Keyword.replace('&#2;','');
			Keyword=Keyword.replace('&#3;','');
			Keyword=Keyword.replace('&#4;','');
			Keyword=Keyword.replace('&#5;','');
			Keyword=Keyword.replace('&#6;','');
			Keyword=Keyword.replace('&#7;','');
			Keyword=Keyword.replace('&#8;','');
			Keyword=Keyword.replace('&#14;','');
			Keyword=Keyword.replace('&#15;','');
			Keyword=Keyword.replace('&#16;','');
			Keyword=Keyword.replace('&#17;','');
			Keyword=Keyword.replace('&#18;','');
			Keyword=Keyword.replace('&#19;','');
			Keyword=Keyword.replace('&#20;','');
			Keyword=Keyword.replace('&#21;','');
			Keyword=Keyword.replace('&#22;','');
			Keyword=Keyword.replace('&#23;','');
			Keyword=Keyword.replace('&#24;','');
			Keyword=Keyword.replace('&#25;','');
			Keyword=Keyword.replace('&#26;','');
			Keyword=Keyword.replace('&#27;','');
			Keyword=Keyword.replace('&#33;','!');
			Keyword=Keyword.replace('&#34;','""');
			Keyword=Keyword.replace('&#35;','#');
			Keyword=Keyword.replace('&#36;','$');
			Keyword=Keyword.replace('&#37;','%');
			Keyword=Keyword.replace('&#38;','&');
			Keyword=Keyword.replace('&#40;','(');
			Keyword=Keyword.replace('&#41;',')');
			Keyword=Keyword.replace('&#42;','*');
			Keyword=Keyword.replace('&#43;','+');
			Keyword=Keyword.replace('&#44;',',');
			Keyword=Keyword.replace('&#45;','-');
			Keyword=Keyword.replace('&#46;','.');
			Keyword=Keyword.replace('&#47;','/');
			Keyword=Keyword.replace('&#48;','0');
			Keyword=Keyword.replace('&#49;','1');
			Keyword=Keyword.replace('&#50;','2');
			Keyword=Keyword.replace('&#51;','3');
			Keyword=Keyword.replace('&#52;','4');
			Keyword=Keyword.replace('&#53;','5');
			Keyword=Keyword.replace('&#54;','6');
			Keyword=Keyword.replace('&#55;','7');
			Keyword=Keyword.replace('&#56;','8');
			Keyword=Keyword.replace('&#57;','9');
			Keyword=Keyword.replace('&#58;',':');
			Keyword=Keyword.replace('&#59;',';');
			Keyword=Keyword.replace('&#60;','<');
			Keyword=Keyword.replace('&#61;','=');
			Keyword=Keyword.replace('&#62;','>');
			Keyword=Keyword.replace('&#63;','?');
			Keyword=Keyword.replace('&#64;','@');
			Keyword=Keyword.replace('&#65;','A');
			Keyword=Keyword.replace('&#66;','B');
			Keyword=Keyword.replace('&#67;','C');
			Keyword=Keyword.replace('&#68;','D');
			Keyword=Keyword.replace('&#69;','E');
			Keyword=Keyword.replace('&#70;','F');
			Keyword=Keyword.replace('&#71;','G');
			Keyword=Keyword.replace('&#72;','H');
			Keyword=Keyword.replace('&#73;','I');
			Keyword=Keyword.replace('&#74;','J');
			Keyword=Keyword.replace('&#75;','K');
			Keyword=Keyword.replace('&#76;','L');
			Keyword=Keyword.replace('&#77;','M');
			Keyword=Keyword.replace('&#78;','N');
			Keyword=Keyword.replace('&#79;','O');
			Keyword=Keyword.replace('&#80;','P');
			Keyword=Keyword.replace('&#81;','Q');
			Keyword=Keyword.replace('&#82;','R');
			Keyword=Keyword.replace('&#83;','S');
			Keyword=Keyword.replace('&#84;','T');
			Keyword=Keyword.replace('&#85;','U');
			Keyword=Keyword.replace('&#86;','V');
			Keyword=Keyword.replace('&#87;','W');
			Keyword=Keyword.replace('&#88;','X');
			Keyword=Keyword.replace('&#89;','Y');
			Keyword=Keyword.replace('&#90;','Z');
			Keyword=Keyword.replace('&#91;','[');
			Keyword=Keyword.replace('&#93;',']');
			Keyword=Keyword.replace('&#94;','^');
			Keyword=Keyword.replace('&#95;','_');
			Keyword=Keyword.replace('&#96;','`');
			Keyword=Keyword.replace('&#97;','a');
			Keyword=Keyword.replace('&#98;','b');
			Keyword=Keyword.replace('&#99;','c');
			Keyword=Keyword.replace('&#100;','d');
			Keyword=Keyword.replace('&#101;','e');
			Keyword=Keyword.replace('&#102;','f');
			Keyword=Keyword.replace('&#103;','g');
			Keyword=Keyword.replace('&#104;','h');
			Keyword=Keyword.replace('&#105;','i');
			Keyword=Keyword.replace('&#106;','j');
			Keyword=Keyword.replace('&#107;','k');
			Keyword=Keyword.replace('&#108;','l');
			Keyword=Keyword.replace('&#109;','m');
			Keyword=Keyword.replace('&#110;','n');
			Keyword=Keyword.replace('&#111;','o');
			Keyword=Keyword.replace('&#112;','p');
			Keyword=Keyword.replace('&#113;','q');
			Keyword=Keyword.replace('&#114;','r');
			Keyword=Keyword.replace('&#115;','s');
			Keyword=Keyword.replace('&#116;','t');
			Keyword=Keyword.replace('&#117;','u');
			Keyword=Keyword.replace('&#118;','v');
			Keyword=Keyword.replace('&#119;','w');
			Keyword=Keyword.replace('&#120;','x');
			Keyword=Keyword.replace('&#121;','y');
			Keyword=Keyword.replace('&#122;','z');
			Keyword=Keyword.replace('&#123;','{');
			Keyword=Keyword.replace('&#124;','|');
			Keyword=Keyword.replace('&#125;','}');
			Keyword=Keyword.replace('&#126;','~');
			Keyword=Keyword.replace('&#128;','€');
			Keyword=Keyword.replace('&#130;','‚');
			Keyword=Keyword.replace('&#131;','ƒ');
			Keyword=Keyword.replace('&#132;','„');
			Keyword=Keyword.replace('&#133;','…');
			Keyword=Keyword.replace('&#134;','†');
			Keyword=Keyword.replace('&#135;','‡');
			Keyword=Keyword.replace('&#136;','ˆ');
			Keyword=Keyword.replace('&#137;','‰');
			Keyword=Keyword.replace('&#138;','Š');
			Keyword=Keyword.replace('&#139;','‹');
			Keyword=Keyword.replace('&#140;','Œ');
			Keyword=Keyword.replace('&#142;','Ž');
			Keyword=Keyword.replace('&#145;','‘');
			Keyword=Keyword.replace('&#146;','’');
			Keyword=Keyword.replace('&#147;','“');
			Keyword=Keyword.replace('&#148;','”');
			Keyword=Keyword.replace('&#149;','•');
			Keyword=Keyword.replace('&#150;','–');
			Keyword=Keyword.replace('&#151;','—');
			Keyword=Keyword.replace('&#152;','˜');
			Keyword=Keyword.replace('&#153;','™');
			Keyword=Keyword.replace('&#158;','ž');
			Keyword=Keyword.replace('&#159;','Ÿ');
			Keyword=Keyword.replace('&#161;','¡');
			Keyword=Keyword.replace('&#162;','¢');
			Keyword=Keyword.replace('&#163;','£');
			Keyword=Keyword.replace('&#164;','¤');
			Keyword=Keyword.replace('&#165;','¥');
			Keyword=Keyword.replace('&#166;','¦');
			Keyword=Keyword.replace('&#167;','§');
			Keyword=Keyword.replace('&#168;','¨');
			Keyword=Keyword.replace('&#169;','©');
			Keyword=Keyword.replace('&#170;','ª');
			Keyword=Keyword.replace('&#171;','«');
			Keyword=Keyword.replace('&#172;','¬');
			Keyword=Keyword.replace('&#173;','­');
			Keyword=Keyword.replace('&#174;','®');
			Keyword=Keyword.replace('&#175;','¯');
			Keyword=Keyword.replace('&#176;','°');
			Keyword=Keyword.replace('&#177;','±');
			Keyword=Keyword.replace('&#178;','²');
			Keyword=Keyword.replace('&#179;','³');
			Keyword=Keyword.replace('&#180;','´');
			Keyword=Keyword.replace('&#181;','µ');
			Keyword=Keyword.replace('&#182;','¶');
			Keyword=Keyword.replace('&#183;','·');
			Keyword=Keyword.replace('&#184;','¸');
			Keyword=Keyword.replace('&#185;','¹');
			Keyword=Keyword.replace('&#186;','º');
			Keyword=Keyword.replace('&#187;','»');
			Keyword=Keyword.replace('&#188;','¼');
			Keyword=Keyword.replace('&#189;','½');
			Keyword=Keyword.replace('&#190;','¾');
			Keyword=Keyword.replace('&#191;','¿');
			Keyword=Keyword.replace('&#192;','À');
			Keyword=Keyword.replace('&#193;','Á');
			Keyword=Keyword.replace('&#194;','Â');
			Keyword=Keyword.replace('&#195;','Ã');
			Keyword=Keyword.replace('&#196;','Ä');
			Keyword=Keyword.replace('&#197;','Å');
			Keyword=Keyword.replace('&#198;','Æ');
			Keyword=Keyword.replace('&#199;','Ç');
			Keyword=Keyword.replace('&#200;','È');
			Keyword=Keyword.replace('&#201;','É');
			Keyword=Keyword.replace('&#202;','Ê');
			Keyword=Keyword.replace('&#203;','Ë');
			Keyword=Keyword.replace('&#204;','Ì');
			Keyword=Keyword.replace('&#205;','Í');
			Keyword=Keyword.replace('&#206;','Î');
			Keyword=Keyword.replace('&#207;','Ï');
			Keyword=Keyword.replace('&#208;','Ð');
			Keyword=Keyword.replace('&#209;','Ñ');
			Keyword=Keyword.replace('&#210;','Ò');
			Keyword=Keyword.replace('&#211;','Ó');
			Keyword=Keyword.replace('&#212;','Ô');
			Keyword=Keyword.replace('&#213;','Õ');
			Keyword=Keyword.replace('&#214;','Ö');
			Keyword=Keyword.replace('&#215;','×');
			Keyword=Keyword.replace('&#216;','Ø');
			Keyword=Keyword.replace('&#217;','Ù');
			Keyword=Keyword.replace('&#218;','Ú');
			Keyword=Keyword.replace('&#219;','Û');
			Keyword=Keyword.replace('&#220;','Ü');
			Keyword=Keyword.replace('&#221;','Ý');
			Keyword=Keyword.replace('&#222;','Þ');
			Keyword=Keyword.replace('&#223;','ß');
			Keyword=Keyword.replace('&#224;','à');
			Keyword=Keyword.replace('&#225;','á');
			Keyword=Keyword.replace('&#226;','â');
			Keyword=Keyword.replace('&#227;','ã');
			Keyword=Keyword.replace('&#228;','ä');
			Keyword=Keyword.replace('&#229;','å');
			Keyword=Keyword.replace('&#230;','æ');
			Keyword=Keyword.replace('&#231;','ç');
			Keyword=Keyword.replace('&#232;','è');
			Keyword=Keyword.replace('&#233;','é');
			Keyword=Keyword.replace('&#234;','ê');
			Keyword=Keyword.replace('&#235;','ë');
			Keyword=Keyword.replace('&#236;','ì');
			Keyword=Keyword.replace('&#237;','í');
			Keyword=Keyword.replace('&#238;','î');
			Keyword=Keyword.replace('&#239;','ï');
			Keyword=Keyword.replace('&#240;','ð');
			Keyword=Keyword.replace('&#241;','ñ');
			Keyword=Keyword.replace('&#242;','ò');
			Keyword=Keyword.replace('&#243;','ó');
			Keyword=Keyword.replace('&#244;','ô');
			Keyword=Keyword.replace('&#245;','õ');
			Keyword=Keyword.replace('&#246;','ö');
			Keyword=Keyword.replace('&#247;','÷');
			Keyword=Keyword.replace('&#248;','ø');
			Keyword=Keyword.replace('&#249;','ù');
			Keyword=Keyword.replace('&#250;','ú');
			Keyword=Keyword.replace('&#251;','û');
			Keyword=Keyword.replace('&#252;','ü');
			Keyword=Keyword.replace('&#253;','ý');
			Keyword=Keyword.replace('&#254;','þ');
			Keyword=Keyword.replace('&#255;','ÿ');
			
			// Hvis søgesting ikke er tom gemmer den, den i en cookie
			if (Keyword != ''){setCookie('seekform',Keyword,365);};
			var SeekCookie = getCookie('seekform');
			// Sætter string ind i formen på siden
			if (SeekCookie != ''){$('#Search_Form_New #Keyword').attr('value', SeekCookie);};

			// Hvis Formen bliver sendt tom eller med standart-text sendes brugern til forsiden
			if (CurrencyReturnUrl == '/shop/search-1.html?keyword='){alert('Du skal udfylde et søgeord');setCookie('seekform','',-1);location.href = '/';};

			// Overskrift til søgning
			if	(Keyword  != ''){
				$('#ProductList_TD h1').text('Søgning: '+Keyword);
			}


	
			//Retter købsknap på varekort´
/*
			$('.Related_Custom_TBL .hover image, .CustomersAlsoBought_Custom_TBL .hover image, ').css('cursor','pointer').attr('src', '/design/BN-koeb-green.png')

			// Hover billede på købsknapper
			$('.hover image').hover(
					function(){
						$(this).css('cursor','pointer').attr('src', '/design/BN-koeb.png')
					},
					function(){
						$(this).attr('src', '/design/BN-koeb-green.png')
					}
			)

*/
				/*alert($('.BuyButton_ProductList').attr('src').indexOf('BN-vaelg.png'))*/



			// Hover billede på købsknapper
			// Instillinger
			var NormalVaelgKnap = 'BN-vaelg-green.png';
			var HoverVaelgKnap  = 'BN-vaelg.png';
			var NormalKoebKnap  = 'BN-koeb-green.png';
			var HoverKoebKnap   = 'BN-koeb.png';
			
			$('.FrontPage_TD .Hover .BuyButton_ProductList, #ProductList_TD .Hover .BuyButton_ProductList, .ProductInfo_TD .Hover img').each(function(){
				if ($(this).attr('src').indexOf(NormalVaelgKnap) != -1) {
				    $(this).addClass("SpecialHover1")
				}else{
				    $(this).addClass("SpecialHover2")
					$(this).attr('src', '/design/'+ NormalKoebKnap)
				}
			})

			$('.SpecialHover1').hover(
				function(){
					$(this).css('cursor','pointer').attr('src', '/design/'+ HoverVaelgKnap)
				},
				function(){
					$(this).attr('src', '/design/'+ NormalVaelgKnap)
				}		
			)
			$('.SpecialHover2').hover(
				function(){
					$(this).css('cursor','pointer').attr('src', '/design/'+ HoverKoebKnap)
				},
				function(){
					$(this).attr('src', '/design/'+ NormalKoebKnap)
				}		
			)

			// Retter op på enkelte produkter i relaterede eller kunder købte også på varekort
			var RelatedCount = 0;
			$('.ProductInfo_TD .Related_Custom_TBL td').each(function(){
			+RelatedCount++
			})
	
			var AlsoBoughtCount = 0;
			$('.ProductInfo_TD .CustomersAlsoBought_Custom_TBL td').each(function(){
			+AlsoBoughtCount++
			})
			
//			alert(RelatedCount)
			CountTD = 10
			
			if ((RelatedCount/CountTD) == 1){$('.Related_Custom_TBL').css('width', '25%');}
			if ((RelatedCount/CountTD) == 2){$('.Related_Custom_TBL').css('width', '50%');}
			if ((RelatedCount/CountTD) == 3){$('.Related_Custom_TBL').css('width', '75%');}
	
			if ((AlsoBoughtCount/CountTD) == 1){$('.CustomersAlsoBought_Custom_TBL').css('width', '25%');}
			if ((AlsoBoughtCount/CountTD) == 2){$('.CustomersAlsoBought_Custom_TBL').css('width', '50%');}
			if ((AlsoBoughtCount/CountTD) == 3){$('.CustomersAlsoBought_Custom_TBL').css('width', '75%');}
			
			// Skjuler Amount-felt i relaterede og knder købte også
			$('.Related_Custom_TBL table .TextInputField_ProductInfo, .CustomersAlsoBought_Custom_TBL table .TextInputField_ProductInfo').css('display', 'none');
			
			// laver strike og 8-taller rigtige i DD-Shop
			$('.price').each(function(){
				$(this).html($(this).html().replace(/<\/STRIKE>8<STRIKE>/ig,'8'))
				$(this).html($(this).html().replace(/<\/STRIKE>\&nbsp;<\/STRIKE>/ig,'</STRIKE>&nbsp;'))
			});

			$('.SpecialPrice').each(function(){
				$(this).html($(this).html().replace('<BR>&nbsp;DKK','&nbsp;DKK'))
			});
			

			// Special for batterinet.dk
			$('#RelatedText b').css('cursor', 'hand')
			$('#RelatedText b').click(function () {
				if ($('#RelatedBox').css('display') == 'block'){
				$('#RelatedBox').slideUp();
				$('#RelatedText').css('color', '#999999');
				}else{
				$('#RelatedText').css('color', '#000000');
				$('#Anmeldelser').css('color', '#999999');
				$('#CustomersAlsoBoughtText').css('color', '#999999');

				$('#AnmeldelserBox').slideUp();
				$('#AlsoBoughtBox').slideUp();
				$('#RelatedBox').slideDown();
				}
			});

			$('#Anmeldelser b').css('cursor', 'hand')
			$('#Anmeldelser b').click(function () {
				if ($('#AnmeldelserBox').css('display') == 'block'){
				$('#AnmeldelserBox').slideUp();
				$('#Anmeldelser').css('color', '#999999');
				}else{
				$('#RelatedText').css('color', '#999999');
				$('#Anmeldelser').css('color', '#000000');
				$('#CustomersAlsoBoughtText').css('color', '#999999');

				$('#AlsoBoughtBox').slideUp();
				$('#RelatedBox').slideUp();
				$('#AnmeldelserBox').slideDown();
				}
			});

			$('#CustomersAlsoBoughtText b').css('cursor', 'hand')
			$('#CustomersAlsoBoughtText b').click(function () {
				if ($('#AlsoBoughtBox').css('display') == 'block'){
				$('#AlsoBoughtBox').slideUp();
				$('#CustomersAlsoBoughtText').css('color', '#999999');
				}else{
				$('#RelatedText').css('color', '#999999');
				$('#Anmeldelser').css('color', '#999999');
				$('#CustomersAlsoBoughtText').css('color', '#000000');

				$('#AnmeldelserBox').slideUp();
				$('#RelatedBox').slideUp();
				$('#AlsoBoughtBox').slideDown();
				}
			});
			
//			alert('RelatedText: ('+ $('#RelatedText b').text() +')<br>CustomersAlsoBoughtText: ('+ $('#AlsoBoughtBox').text() +')<br>AnmeldelserBox: ('+ $('#AnmeldelserBox').text() +')<br>')
//			alert('('+ $('#RelatedText b').text() +')')
			if ($('#RelatedText b').text() != ''){
				$('#RelatedBox').css('display', 'block')
			}else if ($('#CustomersAlsoBoughtText b').text() != ''){
				$('#AlsoBoughtBox').css('display', 'block')
			}else{
				$('#AnmeldelserBox').css('display', 'block')
			}

			if ($('#RelatedBox').css('display') == 'block'){$('#RelatedText').css('color', '#000000'); }else{ $('#RelatedText').css('color', '#999999');}
			if ($('#AnmeldelserBox').css('display') == 'block'){$('#Anmeldelser').css('color', '#000000'); }else{ $('#Anmeldelser').css('color', '#999999');}
			if ($('#AlsoBoughtBox').css('display') == 'block'){$('#CustomersAlsoBoughtText').css('color', '#000000'); }else{ $('#CustomersAlsoBoughtText').css('color', '#999999');}
			
			//Udfylder alle før-pris med et mellemrum
			$('.PriceBefore_ProductInfo_TD').each(function(){
				$(this).html($(this).html() +'&nbsp;')
			})
			
			// Ændre alle tilbud og nyhed til store på varekort
			$('.ProductInfo_TD .ops').each(function(){
				$(this).html($(this).html().replace('tilbud.png','tilbud-big.png'))
				$(this).html($(this).html().replace('nyhed.png','nyhed-big.png'))
			})

			$('.CatOverview').each(function(){
				$(this).find('img').wrap('<a href="'+ $(this).find('.categoris').attr('href') +'"></a>');
			})

	});

