$(function(){


    $("#breadcrumb").each(function(){
        var charReplace = $(this).html();
        charReplace = charReplace.replace("&gt;","|");
        charReplace = charReplace.replace("&gt;","|");
        charReplace = charReplace.replace("&gt;","|");
        charReplace = charReplace.replace("&gt;","|");
        charReplace = charReplace.replace("&gt;","|");
        $(this).html(charReplace);
    });
    
    $(".footer .logo img:first").attr("style","margin-top: 4px;");
    $(".footer .bottom .social_bookmarks ul li:last").attr("style","margin: 0;");
    
    $("#home .column:nth-child(3)").attr("style","margin: 0px;");
    $("#home .column .section, .search_result_item, .products .product").fullLink();
    
    $(".products .product:odd").attr("style","margin: 0px;");
    
    
    $(".emm tr").each(function(){
        $("td:first",this).addClass("label");
    });
    
    $(".emm tr").each(function(){
        $("td:last",this).addClass("input");
    });   
     
    $(".emm .label").wrapInner("<div></div>");
    
    $(".emm").each(function(){
        $("input:last",this).addClass("SubmitButton");
        $(".label:last",this).hide();
        $("tr:last",this).addClass("SubmitButtonTR");
        $("td:last",this).addClass("SubmitButtonTD");
    });
    
    var pagingItems1 = Math.ceil(eval($(".items .item").length-5)/5);
    var countItems = 1;
   
    while (countItems<=pagingItems1+1) {
        $(".paging").append("<span id=\""+countItems+"\">"+countItems+"</span>");
        countItems++;
    }
    $(".paging span:first").addClass("active");
    $(".paging span").click(function(){
        $(".paging span").removeClass("active");
        $(this).addClass("active");
        var pageNumber=$(this).attr("id")-1;
        $(".items .item").animate({"top":"-"+eval(pageNumber*565)+"px"});

    }); 
    
    $(".product").each(function(){
        if ($("a",this).attr("href")=="http://www.floorscan.co.uk") {
	    }	
	    else {
	        $(this).fullLink();
	    }
    });

   
    
    
});

