var urls = [
{'url':null,'fader':null}
,{'url':/^http:\/\/(\w+\.)?rhrosen\.com\/$/,'fader':'Yes'}
,{'url':/^http:\/\/(\w+\.)?rhrosen\.com\/index.html$/,'fader':'yes'}
/*
	The follwing 2 lines code for using the test directory with index.html
*/
,{'url':/^http:\/\/(\w+\.)?rhrosen\.com\/staging\/$/,'fader':'Yes'}
,{'url':/^http:\/\/(\w+\.)?rhrosen\.com\/staging\/index.html$/,'fader':'yes'}
/*
	rhrosen.dev used for development
*/
,{'url':/^http:\/\/(\w+\.)?rhrosen\.dev\/$/,'fader':'yes'}
,{'url':/^http:\/\/(\w+\.)?rhrosen\.dev\/index.html$/,'fader':'yes'}
,{'url':/^http:\/\/(\w+\.)?rhrosen\.dev\/staging\/$/,'fader':'Yes'}
,{'url':/^http:\/\/(\w+\.)?rhrosen\.dev\/staging\/index.html$/,'fader':'yes'}
,{'url':/^http:\/\//,'fader':null}
];

function findMatch(ref) {
   for(var i=0; i<urls.length; i++)
      if( ( ref=='' && urls[i].url==null) || (ref>'' && ref.match(urls[i].url) ) )
         return urls[i].fader;
   return null;
}

$(document).ready(function() {
		   
	var ref = document.referrer.toLowerCase();
	var fader = findMatch(ref);

	if (fader)
	{
		$("body").css("display", "none");
	    $("body").fadeIn(1500);
    }
	else
	{
		$("body").css("display", "inline");
	}
});


