//Checks for image then adds class, and applies to background.
if( $(".page #pagebannercontainer img").length > 0){
theurl = $("#pagebannercontainer").find("img").attr("src");
$("#pagebannercontainer").addClass("hasimage");
$("#pagebannercontainer").css('background-image', 'url(' + theurl + ')');
}