$(function() {
    var blogContent = $(".blogFeed").html();
    $("#blogFeed").html(blogContent);
    $("#blogFeed li:nth-child(1)").addClass("first_blog");
    $("#blogFeed li:last").css("border","none");
    
    $(".MMDataCaptureForm_Table td span:first").attr("style","color: #9b243e;");

    var logo = $("#logo").html();
    $(".logo").html(logo);

    var topnav = $("#top_nav").html();
    $(".top_nav").html(topnav);

    var urltopnav = window.location;
    $("#top_nav div div a[href$="+urltopnav+"]").addClass("active_nav");

   
    if ($("#PNL51").is(":visible")) {
	    $('#content_right a').css("color","#8c1e67");
	    $('.points_of_difference a').addClass("active");
	}
	
	if ($("#PNL53").is(":visible")) {
	    $('#content_right a').css("color","#7623a0");
	    $('.benefits_of_outsourcing a').addClass("active");
	}
	
	if ($("#PNL55, #PNL39").is(":visible")) {
	    $('#content_right a').css("color","#3131ad");
	    $('.strategic_marketing a').addClass("active");
	}
	
	if ($("#PNL57, #PNL41").is(":visible")) {
	    $('#content_right a').css("color","#1b83b7");
	    $('.marketing_communication a').addClass("active");
	}
	
	if ($("#PNL59, #PNL40").is(":visible")) {
	    $('#content_right a').css("color","#289e9e");
	    $('.business_development a').addClass("active");
	}	
	
	if ($("#PNL61 ,#PNL42").is(":visible")) {
	    $('#content_right a').css("color","#2cae3b");
	    $('.copywriting a').addClass("active");
	}
	
	if ($("#PNL63, #PNL43").is(":visible")) {
	    $('#content_right a').css("color","#96c518");
	    $('.events a').addClass("active");
	}
    
    
    
    $(".paging a").each(function(){
        var getStyle = $(this).attr("style");
        if (getStyle=="font-weight: bold; text-decoration: underline;") {
            $(this).css("text-decoration","none");
        }
    });
    
    $(".paging a").each(function(){
        $(this).html($(this).html().replace("Next &gt;","&gt;").replace("&lt; Prev","&lt;"));
    });

    
    $(".sub .sub_link").click(function(){
        $(".sub").animate({ right: "745px" }, 1000);
    });
    
    $(".sub .back_link").click(function(){
        $(".sub").animate({ right: "0px" }, 1000);
    });
    
    $(".content_right a").click(function(){
        $(".sub").animate({ right: "0px" }, 0);
    });
    
    
});

$(document).ready(function() {
  $('.collapsible_div span').hide();
  $('.collapsible_div span:first').slideDown(1500);
  $('.collapsible_div h3').click(function() {
 $(this).next().slideToggle('fast');
  });
});