// Duncan hack, get the entire path, turn /s to -s 

// strip extension and add that as an id to the body

// so we can target specific pages in the styles if we need to

 

// www.blah.com/this/that/whatever.html -> body id="this-that-whatever"

// or body id="home-page" if at root / 

 

var pathname = window.location.pathname.toLowerCase();

var pathSlashesReplaced = pathname.replace(/\//g, "-");

var pathSlashesReplacedNoFirstDash = pathSlashesReplaced.replace("-","");

var newID = pathSlashesReplacedNoFirstDash.replace(/(\.[\s\S]+)/ig, "");

 

$("body").attr("id",newID);

 

if ( $("body").attr("id") == "")

{

    $("body").attr("id","home");

}
