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());
}


function findreplace(el, find, rep) {
	try{$(el).html($(el).html().replace(find, rep))}catch(e){};
}

function ShowCostumerDetails(){

	if ($('.LoadProfile_Orderstep1_TBL').css('display') == 'none'){
		$('.LoadProfile_Orderstep1_TBL').show()
	}else{
		$('.LoadProfile_Orderstep1_TBL').hide()
	}

}

	PinkBG = ',1,10,88,159,61,2,3,4,146,155,6,7,8,';
	BlueBG = ',18,59,89,160,62,52,19,145,147,156,55,56,';
	if	(location.href.indexOf('milkywalk.com') != -1){					
	
		SearchText1 = 'Unfortunately no products to display for this search';
		SearchText2 = 'Unfortunately no products in the category: <b>[[CATEGORYNAME]]</b><p><a href="/shop/search-1.html?keyword=[[CATEGORYNAME]]">Click here to try to search for products</a></p>';
		LoadProfileText = '<h4 style="float:left;padding-left:10px;margin-top:0px;padding-top:2px;">Check here if you have shopped here earlier</h4>';
	
	}else{

		SearchText1 = 'Desværre ingen produkter at vise for denne søgning';
		SearchText2 = 'Desværre ingen produkter i kategorien: <b>[[CATEGORYNAME]]</b><p><a href="/shop/search-1.html?keyword=[[CATEGORYNAME]]">Klik her for at prøve søge efter produkter</a></p>';
		LoadProfileText = '<h4 style="float:left;padding-left:10px;margin-top:0px;padding-top:2px;">Marker her, hvis du har handlet her tidligere.</h4>';

	}


domReady(function(){


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// TJUBANG

	if (location.href.indexOf('/shop/showbasket.html') != -1){
		$('#ShopMainLayOutTable .ShowBasket_ProductLine_Description_TD').each(function(){
			strs = $(this).find('.ShowBasket_ProductNumber_DIV').text();
			shoeSize = strs.substring(strs.indexOf('-')+1,strs.length);
			
			if	(location.href.indexOf('milkywalk.com') != -1){					
				$(this).find('.ShowBasket_ProductNumber_DIV').after('<div class="ShowBasket_ProductNumber_DIV ProdInfoStr">Size: '+ shoeSize +'</div>');
			}else{
				$(this).find('.ShowBasket_ProductNumber_DIV').after('<div class="ShowBasket_ProductNumber_DIV ProdInfoStr">Størrelse: '+ shoeSize +'</div>');
			}
			
		});
	}


	if ($('#ContentContainer_DIV').height() < 780){
		$('#ContentContainer_DIV').css('height','780')
	}

	$('.prod, .Prod').each(function(){
		$(this).html($(this).html().replace('</strike>8<strike></strike>8<strike>','88'))
		$(this).html($(this).html().replace('</STRIKE>8<STRIKE></STRIKE>8<STRIKE>','88'))
		$(this).html($(this).html().replace('</strike>8<strike>','8'))
		$(this).html($(this).html().replace('</STRIKE>8<STRIKE>','8'))
		$(this).html($(this).html().replace('</strike>&nbsp;</strike>','</strike>'))
		$(this).html($(this).html().replace('</STRIKE>&nbsp;</STRIKE>','</strike>'))
		$(this).html($(this).html().replace('</strike>8<strike>','8'))
		$(this).html($(this).html().replace('</STRIKE>8<STRIKE>','8'))
	});





	if (PinkBG.indexOf(','+ $('#RootCatagory').val() +',') != -1){$('h1').css('background-image','url(/images/template/background-h1-pink.png)')}
	if (BlueBG.indexOf(','+ $('#RootCatagory').val() +',') != -1){$('h1').css('background-image','url(/images/template/background-h1-blaa.png)')}

	if (PinkBG.indexOf(','+ $('#RootCatagory').val() +',') != -1){$('.ProductInfo_TD h1').css('background-image','url(/images/template/background-h1-big-pink.png)')}
	if (BlueBG.indexOf(','+ $('#RootCatagory').val() +',') != -1){$('.ProductInfo_TD h1').css('background-image','url(/images/template/background-h1-big-blaa.png)')}

	if (location.href.indexOf('frontpage.html') != -1){$('#ShopLayOut_Topmenu_TD a').eq(0).css('background-image','url(/images/template/menu-link-hover.png)')}
	if (location.href.indexOf('shop/cms-2.html') != -1){$('#ShopLayOut_Topmenu_TD a').eq(1).css('background-image','url(/images/template/menu-link-hover.png)')}
	if (location.href.indexOf('shop/cms-15.html') != -1){$('#ShopLayOut_Topmenu_TD a').eq(2).css('background-image','url(/images/template/menu-link-hover.png)')}
	if (location.href.indexOf('shop/cms-13.html') != -1){$('#ShopLayOut_Topmenu_TD a').eq(3).css('background-image','url(/images/template/menu-link-hover.png)')}

	if (location.href.indexOf('shop/cms-17.html') != -1){$('#ShopLayOut_Topmenu_TD a').eq(4).css('background-image','url(/images/template/menu-link-hover.png)')}
	if (location.href.indexOf('shop/cms-3.html') != -1){$('#ShopLayOut_Topmenu_TD a').eq(5).css('background-image','url(/images/template/menu-link-hover.png)')}
	if (location.href.indexOf('shop/cms-21.html') != -1){$('#ShopLayOut_Topmenu_TD a').eq(6).css('background-image','url(/images/template/menu-link-hover.png)')}

	if (location.href.indexOf('shop/frontpage.html') != -1 || location.href.indexOf('c1.html') != -1 || location.href.indexOf('c2.html') != -1 || location.href.indexOf('c3.html') != -1 || location.href.indexOf('s.html') != -1 || location.href.indexOf('shop/cms-') != -1){
		if ($('#ContentContainer_DIV').height() <= 650){$('#ContentContainer_DIV').css('height','650px');}
		$('#EkstraCullum').show();
	}

	if (location.href.indexOf('showbasket.html') != -1 || location.href.indexOf('order1.html') != -1 || location.href.indexOf('order2.html') != -1 || location.href.indexOf('order3.html') != -1 || location.href.indexOf('order4.html') != -1){
		$('#ShopLayOut_SpaceBottom_TD').css('background-image','url(/images/template/background-bottom-light.png)');
	}

	$('img').each(function(){
		if	(location.href.indexOf('milkywalk.com') != -1 || location.href.indexOf('1900913') != -1){					
			if ($(this).attr('src').indexOf('/piger_uk.png') != -1 || $(this).attr('src').indexOf('/drenge_uk.png') != -1 || $(this).attr('src').indexOf('/maerker_uk.png') != -1){
				$(this).wrap('<u></u>')
			}
		}else{
			if ($(this).attr('src').indexOf('/piger.png') != -1 || $(this).attr('src').indexOf('/drenge.png') != -1 || $(this).attr('src').indexOf('/maerker.png') != -1){
				$(this).wrap('<u></u>')
			}
		}
	})

	$('.ProductListVariantSelector').each(function(){
		if	(location.href.indexOf('kidsshoes.dk') != -1){					
			$(this).find('option:eq(0)').text('Vælg størrelse')
		}else{
			$(this).find('option:eq(0)').text('Choose size')
		}
	})
	
	
//	document.getElementById('LastForm').innerHTML = 'b</form>b';
		
	
//	$('#ShopMainLayOutTable #ProdForm').after('</form>')
	$('#ShopLayOut_SpaceTop_TD').append('<div class="searchCN">'+ $('#ShopLayOut_Search_TD').html() +'</div>')
	
	
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


		// Loader productmenu
		cn_init_menu(document.getElementById('ProductMenu_Table'),1)

		// 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))
			}
		})
		
		// identificere alle menupunkter - tildeler class
		var iMenu = 1;
		$('#ShopLayOut_Topmenu_TD a').each(
			function() {
				if (this.className != 'TopMenuSpace') $(this).attr('id', 'menu'+iMenu++);
			}
		)

		// Floater indhold i liste
		ProdCount = 1
		$('#ShopMainLayOutTable .Prod').each(function() {
			
			if (ProdCount == 1){$(this).parent().attr('align','center')};
			if (ProdCount == 2){$(this).parent().attr('align','center')};
			if (ProdCount == 2){ProdCount = 1}else{ProdCount++};
		
		})
		
		// Retter pris i vareliste
		$('.Price').each(function(){
			$(this).html($(this).html().toLowerCase().replace('</strike>8<strike>','8'))
			$(this).html($(this).html().toLowerCase().replace('</strike>&nbsp;</strike>','</strike>'))
		});

		// Hvis taget <i></i> er i text så lav hide på den
		$('.niv1, .niv2, .niv3, .niv4, .niv5, .SubCats_Prodlink').each(function(){
			$(this).find('i').text('')
		})


		// Fjerner billeder fra produktmenu
		$('.SubCategory1_Productmenu, .SubCategory2_Productmenu, .SubCategory3_Productmenu, .SubCategory4_Productmenu, .SubCategory5_Productmenu').each(function() {
			LinkNivs = $(this).find('a[title==\'\']')
			$(this).html('<a href="'+ LinkNivs.attr('href') +'" title="'+ LinkNivs.attr('title') +'" class="'+ LinkNivs.attr('class') +'">'+ LinkNivs.html() +'</a>')
			
		})

		// For at lave en billedevisning på kategorikort
			$('.SubCats_Prodlink').next('br').remove();
			findreplace('#COLUMNLIST table','</tr><tr>','');
		$('#COLUMNLIST a').each(function(){
			$(this).html($(this).html().replace('>','><div>'))
			$(this).html($(this).html().replace('</a>','</div></a>'))
		});

		// Funktion til skjul af "handlet her tidligere"
		if	(location.href.indexOf('order1.html&showForgotPswForm=1') == -1){$('.LoadProfile_Orderstep1_TBL').hide()};
		$('.LoadProfile_Orderstep1_TBL').before('<div><input onclick="ShowCostumerDetails()" style="float:left;margin-left:5px;" type="checkbox"> '+ LoadProfileText +'</div>')

		// Skjuler menu i step2, step3, step4
		if	(location.href.indexOf('order1.html') != -1 || location.href.indexOf('order2.html') != -1 || location.href.indexOf('order3.html') != -1 || location.href.indexOf('pg-dd.html') != -1 || location.href.indexOf('pay.dandomain.dk/securetunnel.asp') != -1){
//			$('#ProductmenuContainer_DIV, .box').css('display','none');
//			$('#ProductmenuContainer_DIV').after('')
		}


		// Indhold der flytter posison
		DivContent = function() {  
			if ($('#MoveFrom').html() != null) {   
				if ($('#MoveTo').html() == ''){  
					document.getElementById('MoveTo').innerHTML = document.getElementById('MoveFrom').innerHTML; 
					document.getElementById('MoveFrom').innerHTML = '';  
					$('#MoveFrom').css('display', 'none');   
					clearInterval(DivContentTimer); 
				}  
			} 
		} 
		DivContentTimer = setInterval('DivContent()', 100);


		// Rettelse af tabeller
		$('table').each(function(){
			$(this).attr('border','0').attr('cellpadding','0').attr('cellspacing','0')
		});

		// Steps står pænt
		if (location.href.indexOf('shop/showbasket.html') != -1){
			$('#ShowBasket_TD a').each(function(){
				if ($(this).attr('href') == "javascript:history.go(-1);")$(this).remove();
				if ($(this).attr('href') == "/shop/basket.asp?caller=showbasket&removeall=1")$(this).remove();
				if ($(this).attr('href') == "/shop/order1.html"){$(this).eq(0).remove();}
				return false;
			});
		}

		if (location.href.indexOf('shop/order1.html') != -1){
			GetHeader = $('#OrderStep1_TD h1').text();
			$('#OrderStep1_TD').prepend('<h1>'+ GetHeader +'</h1>')
			$('.Heading_Orderstep1_TBL').remove();
			$('.SubmitButton_Orderstep1, .SubmitButton_Orderstep2, #SubmitButton_Gem').val('');
		}

		if (location.href.indexOf('shop/order2.html') != -1){
			GetHeader = $('#OrderStep2_TD h1').text();
			$('#OrderStep2_TD').prepend('<h1>'+ GetHeader +'</h1>')
			$('#OrderStep2_TD .BackgroundColor1_Orderstep2 tr').eq(0).remove();
			$('#OrderStep2_TD .BackgroundColor1_Orderstep2 tr').eq(0).remove();
			$('.SubmitButton_Orderstep1, .SubmitButton_Orderstep2, #SubmitButton_Gem').val('');
		}

		if (location.href.indexOf('shop/order3.html') != -1){

			// Tildele table's ID'er i steps
			var i = 1;
			$('.CustomerInfo_OrderStep3 table').each(
				function() {
					$(this).attr('id', 'CustomerInfo_OrderStep3_Table'+i++)
				}
			)

			GetHeader = $('#OrderStep3_TD h1').text();
			$('#OrderStep3_TD').prepend('<h1>'+ GetHeader +'</h1>')
			$('#OrderStep3_TD .Heading_OrderStep3').remove();
			$('#OrderStep3_TD .CustomerInfo_OrderStep3 br:lt(2)').remove();
			$('#OrderStep3_TD .BackGroundColor1_OrderStep3 tr').eq(0).find('td br:lt(2)').remove();
			$('#OrderStep3_TD .CustomerInfo_OrderStep3 td').eq(0).find('br:lt(1)').remove();
			$('.SubmitButton_OrderStep3').val('');
		}

		if (location.href.indexOf('shop/order4.html') != -1){
			GetHeader = $('#OrderStep4_TD h1').text();
			$('#OrderStep4_TD').prepend('<h1>'+ GetHeader +'</h1>')
			$('#OrderStep4_TD .BackGroundColor1_OrderStep4 tr').eq(0).remove();
		}

		// Ekstra billeder på varekort
		$('#ShopMainLayOutTable #ProdImage a:gt(0)').addClass('SProdImages');

});



$(document).ready(function(){



		$('.CustomerInfo_OrderStep3').css('width', '100%');

		// Indsætte rettebilleder på possition
		$('#CustomerInfo_OrderStep3_Table3').each(function(){
			$(this).css('width', '100%');
			if	(location.href.indexOf('milkywalk.com') != -1 || location.href.indexOf('1900913') != -1){					
				$(this).before('<a href="javascript:history.go(-2)"><img src="/images/template/BN-ret_uk.png" align="right" style="position:relative;top:0px;" /></a>');
			}else{
				$(this).before('<a href="javascript:history.go(-2)"><img src="/images/template/BN-ret.png" align="right" style="position:relative;top:0px;" /></a>');
			}
		})
		$('#CustomerInfo_OrderStep3_Table4').each(function(){
			$('#CustomerInfo_OrderStep3_Table4').css('width', '100%');
			if	(location.href.indexOf('milkywalk.com') != -1 || location.href.indexOf('1900913') != -1){					
				$(this).before('<a href="javascript:history.go(-1)"><img src="/images/template/BN-ret_uk.png" align="right" style="position:relative;top:0px;" /></a>');
			}else{
				$(this).before('<a href="javascript:history.go(-1)"><img src="/images/template/BN-ret.png" align="right" style="position:relative;top:0px;" /></a>');
			}
		})

		// Fjerne link i bestillingsoversigt i step
		$('.BackGroundColor1_OrderStep3 table table table td a').each(function(){
			this.removeAttribute('href')
		})
		
		//Ny linie efter postlogo
		$('#ShippingMethodsContainer table td img').each(function(){
			$(this).after('<br>')
		})

		// For skjule print icon på kvitering
		$('.BackGroundColor1_OrderStep4 a:parent').css('display', 'none');

		
		// Ved fejlside
		if ($('#ProductList_TD').text() == ''){
		
			if	(location.href.indexOf('search-1.html') != -1){					
				$('#ProductList_TD').html('<h1>'+ Keyword +'</h1><div class="PriductListBackground" style="padding-top:40px;padding-bottom:30px;text-align:center;width:536px;">'+ SearchText1 +'</div>')
			}else{
				$('#ProductList_TD').html('<h1>[[CATEGORYNAME]]</h1><div class="PriductListBackground" style="padding-top:40px;padding-bottom:30px;text-align:center;width:536px;">'+ SearchText2 +'</div>')
			}

		$('.EmtyList').attr('align', 'center').css('margin-top','60px')

		}

		if (PinkBG.indexOf(','+ $('#RootCatagory').val() +',') != -1){$('h1').css('background-image','url(/images/template/background-h1-pink.png)')}
		if (BlueBG.indexOf(','+ $('#RootCatagory').val() +',') != -1){$('h1').css('background-image','url(/images/template/background-h1-blaa.png)')}

		if (PinkBG.indexOf(','+ $('#RootCatagory').val() +',') != -1){$('.ProductInfo_TD h1').css('background-image','url(/images/template/background-h1-big-pink.png)')}
		if (BlueBG.indexOf(','+ $('#RootCatagory').val() +',') != -1){$('.ProductInfo_TD h1').css('background-image','url(/images/template/background-h1-big-blaa.png)')}
		
//		alert(	$('.ProductInfo_TD h1').css('background-image')	)

		// 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());
					}
				})
			}
		}
		
		// 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')
			}
		}
		
		// Finder alle p-tag og hvis de er tomme så skjul dem
		$('p').each(function(){
			if ($(this).text()  == ''){
				$(this).remove();
			}
		})

		$('.Description_Productinfo').each(function(){
			if ($(this).text()  == ''){
				$(this).remove();
			}
		})


	if	(location.href.indexOf('milkywalk.com') != -1){					

		// Sætter overskrift på Anbefal
		$('#TipFriend_TD').html('<h1>Anbefal</h1>'+$('#TipFriend_TD').html());

		// Laver brede på table 100% på anbefal siden
		findreplace('#TipFriend_TD','400','100%');

		// Overskrift til nyheder
		if	(location.href.indexOf('news-ALL-1.html') != -1){
			$('#ProductList_TD h1').text('News');
		}

		// Overskrift til tilbud
		if	(location.href.indexOf('specialoffer-ALL-1.html') != -1){
			$('#ProductList_TD h1').text('Special offer');
		}

		for (i=1; i<256; i++){
			var re = new RegExp('&#(' + i + ');', 'g');
			Keyword = Keyword.replace(re, String.fromCharCode(i))
		}

		// Overskrift til søgning
		if	(Keyword  != ''){
			$('#ProductList_TD h1').text('Search: '+Keyword);
		}

	}else{

		// Sætter overskrift på Anbefal
		$('#TipFriend_TD').html('<h1>Anbefal</h1>'+$('#TipFriend_TD').html());

		// Laver brede på table 100% på anbefal siden
		findreplace('#TipFriend_TD','400','100%');

		// 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');
		}

		for (i=1; i<256; i++){
			var re = new RegExp('&#(' + i + ');', 'g');
			Keyword = Keyword.replace(re, String.fromCharCode(i))
		}

		// Overskrift til søgning
		if	(Keyword  != ''){
			$('#ProductList_TD h1').text('Søgning: '+Keyword);
		}

	}

		// Hvis søgestring ikke er tom gemmer den, den i en cookie
		if (Keyword != ''){setCookie('seekform',Keyword,365);};
		
		var SeekCookie = getCookie('seekform');

		// 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 = '/';};

		if	(location.href.indexOf('milkywalk.com') != -1 || location.href.indexOf('1900913') != -1){					
			SearchValue = "Type keyword";
			NewsletterValue = "Type your e-mail";
		}else{
			SearchValue = "Indtast søgeord";
			NewsletterValue = "Indtast din e-mail";
		}
		$('#ShopMainLayOutTable form input.SearchField_SearchPage').val(SearchValue).click(function(){if($(this).attr('value') == SearchValue){$(this).val('')}}).blur(function(){if($(this).attr('value') == ''){$(this).val(SearchValue)}})

		// Sætter string ind i formen på siden
		if (SeekCookie != ''){$('#ShopMainLayOutTable form input.SearchField_SearchPage').attr('value', SeekCookie);};

		$('.newsletter form input.email').val(NewsletterValue).click(function(){if($(this).attr('value') == NewsletterValue){$(this).val('')}}).blur(function(){if($(this).attr('value') == ''){$(this).val(NewsletterValue)}})

		// Finder alle speciale elementer og hvis de er tomme så skjul dem
		if ($('#ShopMainLayOutTable #Canvas').html()  == ''){
			$('#ShopMainLayOutTable #Canvas').remove();
		}
		if ($('#ShopMainLayOutTable #Selector').html()  == ''){
			$('#ShopMainLayOutTable #Selector').remove();
		}

		// Retter op på enkelte produkter i relaterede eller kunder købte også på varekort
		var RelatedCount = 0;
		$('#ShopMainLayOutTable .Related_Custom_TBL .Prod').each(function(){
		+RelatedCount++
		})

		var AlsoBoughtCount = 0;
		$('#ShopMainLayOutTable .CustomersAlsoBought_Custom_TBL .Prod').each(function(){
		+AlsoBoughtCount++
		})
		
		if (RelatedCount == 1){$('.Related_Custom_TBL').attr('width', '268px').attr('align', 'center');}
		if (RelatedCount == 2){$('.Related_Custom_TBL').attr('width', '536px').attr('align', 'center');}

		if (AlsoBoughtCount == 1){$('.CustomersAlsoBought_Custom_TBL').attr('width', '268px').attr('align', 'center');}
		if (AlsoBoughtCount == 2){$('.CustomersAlsoBought_Custom_TBL').attr('width', '536px').attr('align', 'center');}

		$('#ShopMainLayOutTable .Related_Custom_TBL .Prod, #ShopMainLayOutTable .CustomersAlsoBought_Custom_TBL .Prod').each(function(){
			if	(location.href.indexOf('milkywalk.com') != -1 || location.href.indexOf('1900913') != -1){					
				$(this).find('.Related_BuyButton_IMG').attr('src','/images/template/BN-bestil_uk.png');
			}else{
				$(this).find('.Related_BuyButton_IMG').attr('src','/images/template/BN-bestil.png');
			}
		})

		// 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');

		// Fjerner Amauontfelt i Prod-liste
		$('.TextInputField_Productlist').hide();

		// Ændre alle tilbud og nyhed til store på varekort
		$('.ProductInfo_TD .ImageRelative .label').each(function(){
			if	(location.href.indexOf('milkywalk.com') != -1 || location.href.indexOf('1900913') != -1){					
				$(this).html($(this).html().replace('tilbud_uk.png','tilbud-big_uk.png'))
				$(this).html($(this).html().replace('nyhed_uk.png','nyhed-big_uk.png'))
			}else{
				$(this).html($(this).html().replace('tilbud.png','tilbud-big.png'))
				$(this).html($(this).html().replace('nyhed.png','nyhed-big.png'))
			}
		})

		// Skjul variantstreg hvis ingen variant er der...
		$('.Variants').each(function(){
			if ($(this).html() == ''){
				$('.VariantsLine').css('display', 'none');
			}
		})

		$('.Prices_Custom_TBL td').attr('align','left')

});






// Denne funktion sørger for automatisk at tilpasse indholdet er en menu
function cn_init_menu(menu,level){
	// Hent indhold i menuen
	var list=menu.rows;
	var i=list.length; var j=i;

	// Gennemgå punkterne
	if(i>0)do{
		// Hent en reference til punktet
		var tmp=list[j-i].cells; tmp=tmp[tmp.length-1];

		// Tjek om det er en undermenu
		var x=tmp.getElementsByTagName('table')[0];
		if(x){
			cn_init_menu(x,level+1);
			continue;
		}

		// Tjek om det er et almindeligt punkt
		tmp=tmp.getElementsByTagName('a');
		var x=tmp[0];
		var y=tmp[1];
		
		if (tmp.length>2)
		{
			if (tmp[2].innerHTML.substring(0,3).toLowerCase()=='<u>'){tmp[2].innerHTML='<div class="specialniv">'+tmp[2].innerHTML+'</div>'}else{tmp[2].innerHTML='<div class="niv'+level+'">'+tmp[2].innerHTML+'</div>'}
		}
		if(y&&x&&y.parentNode==x.parentNode) 
		{
			if (tmp.length<3)
			{
			if (y.innerHTML.substring(0,3).toLowerCase()=='<u>'){y.innerHTML='<div class="specialniv">'+y.innerHTML+'</div>'}else{y.innerHTML='<div class="niv'+level+'">'+y.innerHTML+'</div>'}
			}
		}
		else if(x)
		{
			if (x.innerHTML.substring(0,3).toLowerCase()=='<u>'){x.innerHTML='<div class="specialniv">'+x.innerHTML+'</div>'}else{x.innerHTML='<div class="niv'+level+'">'+x.innerHTML+'</div>'}
		}
	}while(--i);
}

