$(document).ready(function(){
	if(location.href.search(/our-practice/gi) != -1){
		$('body').css("background-image", "url(../images/ourPractice.jpg)");
	}
	else if(location.href.search(/practice-areas/gi) != -1){
		$('body').css("background-image", "url(../images/practiceAreas.jpg)");
	}
	else if(location.href.search(/test-page/gi) != -1){
		$('body').css("background-image", "url(../images/ourPractice.jpg)");
	}
	else if(location.href.search(/attorneys/gi) != -1){
		$('body').css("background-image", "url(../images/c_law095.jpg)");
	} 
	else if(location.href.search(/testimonials/gi) != -1){
		$('body').css("background-image", "url(../images/bodybg2.jpg)");
	}
	else if(location.href.search(/verdicts/gi) != -1){
			/* /verdicts is actually the Representative Matters page */
		$('body').css("background-image", "url(../images/c_law081.jpg)");
	}
	else if(location.href.search(/contact/gi) != -1){
		$('body').css("background-image", "url(../images/c_law076.jpg)");
	}
	var bgImage = $("body").css("background-image").replace(/url\(|"/gi, "").replace(/"|[\)]/gi, "");
	$("body").prepend('<img id="bgImage" src="'+bgImage+'" />');
	$("body").css("background-image", "none");
});
