var _time;
$(function(){
	$("#ShopLayOut_Topmenu_TD a").each(function(index){
		if(index > 0){
			$(this).before('<div><img src="http://cyklop.byneel.dk/chokoladehimlen/images/header/menuSeperator.png" /></div>');
		}
	});
	
	_time = new Date();
	$("#frontpageNews").load("/chokoladehimlen/includes/frontpageNews.asp?_="+_time.getTime());

	$("#ProductCardNews").load("/chokoladehimlen/includes/productcardnews.asp?prodNo="+escape($("#ProductNo .Description_Productinfo").text())+"&_="+_time.getTime(), function(){
		setTimeout(function(){
			document.MediaViewers[0].MediaItemMouseOver(0,document.getElementById('Mediasundefined0'))
		}, 200);
	});
	
	$("#ShopMainLayOutTable .Frontpage_Custom_TBL > tbody > tr").each(function(){
		$(this).find("td").removeAttr("align")
		$(this).find("td:first").css("padding", "0px 40px 0px 10px");
	});
	
	if($("#ShopMainLayOutTable .CmsPageStyle").length > 0){
		if($("#ShopMainLayOutTable .CmsPageStyle").html().length < 50){
			$("#ShopMainLayOutTable .CmsPageStyle").parent().parent().parent().parent().parent().remove();
		}
	}
	
	if($("#like").length > 0){
		$("#like").load("/chokoladehimlen/includes/like.asp?relid="+escape(location.href)+"&_="+_time.getTime(), function(){
			setTimeout(function(){
				document.MediaViewers[0].MediaItemMouseOver(0,document.getElementById('Mediasundefined0'))
			}, 200);
		})
	}
	
	/*if($("#ShopMainLayOutTable #fbTd2").length > 0){
		$("#ShopMainLayOutTable #fbTd2").load("/chokoladehimlen/includes/like.asp?relid="+escape("http://cyklop.byneel.dk")+"&_="+_time.getTime())
	}*/
	
	
	$("#ShopMainLayOutTable .FrontPage_TD .buttons").each(function(){
		$(this).find("img").attr("src", "/chokoladehimlen/images/buttons/infoBtn.jpg")
	});
	$("#ShopMainLayOutTable .FrontPage_TD .buttons").each(function(){
		$(this).find(".BuyButton_ProductList").attr("src", "/chokoladehimlen/images/buttons/buyBtn.jpg")
	});
	
	//$(".Prices_Custom_TBL td").attr("align", "right")
	
	$(".Related_BuyButton_IMG").attr("src", "/chokoladehimlen/images/buttons/buyBtn3.jpg")
	$(".Related_InfoButton_IMG").attr("src", "/chokoladehimlen/images/buttons/infoBtn2.jpg")
	$(".ProductInfo_MagixZoomPlus_MainImage_TABLE").attr("align", "center");

}); 


