$(document).ready(function(){

   //Fjerner gammel søg og indsætter ny
   $("#shopmenu").find("form").css({'display':'none'});
   $("#shopmenu").find("img:first").css({'display':'none'});
   
   $("#shopmenu").find("#rem").css({'display':'none'});

   
   //Indsætter kurv
   
   //Fjerner belastende devider i bund
   $("#shopaddress").parent().parent().parent().prev().css({'display':'none'});
   
   var rightContainer = $("#CustomRightContainer");
   $("#productfront_border").parent().prepend(rightContainer);
   

    $("#shopmenu a" ).each(
        function( intIndex ){
            if(!$(this).hasClass("submit"))
            { 
                if(this.id != "submenu")
                {
                    $(this).addClass("menu");
                }
                else
                {
                    $(this).prepend("-&nbsp;");
                    $(this).addClass("submenu");
                    $(this).css({'margin-left':'0px','background-image':'none','display':'block'});
                }
            }
        }
    );
    
    $(".submenu:last").css({'margin-bottom':'8px'});

    if(path == '/default.asp')
    {
        $("#fp_table").parent().parent().css({'width':'503px'});
        $("#fp_table").parent().parent().next().addClass("fp_divider");

        $("#shopcontent").css({'width':'712px','padding-right':'0px','padding-top':'0px'});

        $( "#productfront_border img" ).each(
            function( intIndex ){
                if(this.id == 'productimg') {
                    $(this).removeAttr("style");
                    $(this).removeAttr("align");
                    $(this).parent().css({'display':'block','margin-top':'5px'});             
                };
            }
        );



        $("#divider").parent().parent().addClass("hide");
        $( ".hide td" ).each(
            function( intIndex ){
                if(this.id == 'productfront') {
                    
                    var ch = $(this).children();
                    
                    $(ch[0]).addClass("product_header");
                    $(ch[2]).addClass("product_img");
                    var myimg = $(ch[2]).find("img:first");
                    //var paddingheight = 192 - $(myimg).height();
                    $(myimg).removeAttr("style"); 
                    //$(myimg).css({'padding-top':paddingheight});
                    $(myimg).removeAttr("align"); 
                    $(ch[3]).addClass("product_info");
                    
                    var el = document.createElement("div");
                    $(el).addClass("custom_product");

                    $(el).append(ch[2]);                    
                    $(el).append(ch[0]);
                    $(el).append(ch[3]);
                    
                    $("#CustomFpDiv").append(el);
                    
                    $("#CustomFpDiv").append(el);

                    var modulus = (intIndex + 1) % 3
                    if(modulus == 0)
                    {
                        $(el).css({'margin-right':'0px'});
			            var splitter = document.createElement("div");
                        $(splitter).css({'width':'500px','height':'25px','overflow':'hidden','float':'left'});
			            $("#CustomFpDiv").append(splitter);
			            
			            var splitterCl = document.createElement("div");
                        $(splitterCl).addClass("productSplitter");
			            $("#CustomFpDiv").append(splitterCl);			            

			            var splitter2 = document.createElement("div");
                        $(splitter2).css({'width':'500px','height':'25px','overflow':'hidden','float':'left'});
			            $("#CustomFpDiv").append(splitter2);			            
                    }
                };
            }
        );
        
        
    };  

});