$(document).ready(function(){

    // Space images inside tabs based on their alignment (e.g. give left-aligned images a right-margin and vice versa)
    $("#cs_container img[align='left']").each(function() { $(this).css("margin-right", "20px").css("float", "left"); });
    $("#cs_container img[align='right']").each(function() { $(this).css("margin-left", "20px").css("float", "right"); });
    
    //fix pngs if they exist
    $("#cs_container img").supersleight();
    
    //configure case study links / buttons
    var $NextCaseStudy = $(".NextCaseStudy");
    if($NextCaseStudy.html() != ""){
      $("#NextCaseStudyButton").attr("href", $NextCaseStudy.attr("href")).show();
      $("#NextCaseStudyLink").attr("href", $NextCaseStudy.attr("href")).html($NextCaseStudy.html());
    }
    else{
      $("#NextCaseP").hide();
    }
    
    
    if((navigator.appVersion.indexOf("MSIE 6") > 0) ? true : false){
	    $("#transparentborders").height($("#maincontentcontainer").height() + 40);
    }
});