
if (typeof(jqN)=='undefined')
{
	var jqN = jQuery.noConflict();
}
setTimeout('runRailAd()',2000);
function runRailAd()
{
if((typeof(railAdBg)!='undefined')&&(railAdBg))
{
// site specific custom background code.
jqN('body').css({'background-image':'url('+railAdBg+')','background-position':'center top'})
}
if((typeof(railAdBgColor)!='undefined')&&(railAdBgColor))
{
// site specific custom background color code.
jqN('body').css({'background-color':'#'+railAdBgColor.replace(/#/,'')});
}
if((typeof(railAdBgRepeat)!='undefined')&&(railAdBgRepeat))
{
// site specific custom background repeat code.
jqN('body').css({'background-repeat':railAdBgRepeat});
}
else
{	
	//jqN('body').css({'background-repeat':'no-repeat!important'}); //was this originally, threw a js error.
//	jqN('body').css({'background-repeat':'no-repeat'});
}

if((typeof(railAdBgClickthru)!='undefined')&&(railAdBgClickthru))
{
		
if(jqN('body').attr('id')=='')
{
jqN('body').attr('id','railAdBody');	
}

jqN('body').click(function (e) {

	evt = e || window.event;
	if (e.target) {
        targ = e.target;
    } else if (e.srcElement) {
        targ = e.srcElement;
    }
	
    if (targ.nodeType == 3) // Safari bug
		targ = targ.parentNode;
            
	if (targ.id.toLowerCase() == 'container' || (targ.id == jqN('body').attr('id'))) {
		window.open(railAdBgClickthru);
	}
});
	
    
    }
}

