$(function() {

    $(".NavigationMenu td:first .divide").hide();

    var moreWebinars = $(".more_webinars_feed").html(); 
        $(".right .more").html(moreWebinars);
        
        
        var eveningVid = $(".evening_vid").html();
        $(".evening_with .right .interview").html(eveningVid);
        
    var blogContent = $(".blogFeed").html();
        $(".blog").html(blogContent);
        $(".blog_link:first").attr("style","border-top: 1px dotted #b1b1b1;");

    $("#breadcrumb").each(function() {
        $(this).html($(this).html().replace("&gt;","|"));
        $(this).html($(this).html().replace("&gt;","|"));
        $(this).html($(this).html().replace("&gt;","|"));
        $(this).html($(this).html().replace("&gt;","|"));
    });

    $("#tab").toggle(function(){
        $("#offices,#tab").animate({top:"-30px"},500,function(){$("#top").css("z-index","0");});
        $("#top").css("z-index","10");
        $("#contact_details").css("z-index","5");
    },function(){
        $("#offices,#tab").animate({top:"-526px"},500,function(){$("#top").css("z-index","1");$("#contact_details").css("z-index","0");});
        $("#top").css("z-index","20");
    });
    
    
    $(".gallery_feed").parent().attr("style","width: 573px; position: relative;");
    $(".gallery_feed").parent().parent().attr("style","width: 573px; position: relative;");
    
    
    $(".webinars_more:first").hide();
    $(" #top_right .latest_news .item:last").attr("style","border-bottom: 1px dotted #999;");
    
    $(".callback .off .button").click(function(){
        $(".callback .off").hide();
        $(".callback .on").show();
    });
    
    $(".access").toggle(function(){
        $("body").css("font-size","85%");
        $(".NavigationMenu").css("font-size","80%");
    },function(){
        $("body").css("font-size","70%");
        $(".NavigationMenu").css("font-size","100%");
    });
    
    
     $("#content_right .personal_injury, #content_right .employment_law, #content_right .latest_publications, #content_right .latest_webinar, #content_right .bjl_publications").parent().parent().attr("style","width: 321px;");
  
  
      
    var urlmenunav = window.location;
    $(".services_menu .Phuse_SiteMap_UL .Phuse_SiteMap_LI a[href$="+urlmenunav+"]").parent().addClass("active_link");
    $(".services_menu .Phuse_SiteMap_UL .Phuse_SiteMap_LI .Phuse_SiteMap_UL .Phuse_SiteMap_LI a[href$="+urlmenunav+"]").parent().addClass("active_sublink").removeClass("active_link");
    
    if ($(".active_link").is(":visible")) {
        $(".active_link .Phuse_SiteMap_UL").slideDown();
    }
    
    if ($(".active_sublink").is(":visible")) {
        $(".active_sublink .Phuse_SiteMap_UL").slideDown();
    }
    $("ul:has(.active_sublink)").slideDown();
    $(".active_sublink").parent().parent().addClass("grey_ul");
    
    if ($(".home").is(":visible")) {
        $(".header p").attr("style","font-size: 135%; margin-bottom: 10px; margin-top: 0;");
        $(".header em").attr("style","font-size: 80%;");
    }
    

    

});


