/* == right click text == */
rightClickWarning = "The photos are copyright Trish Tunney. All rights reserved. Unauthorized use is prohibited.";

/* == photo bar HIDE == */
showPhotoBar = false;

/*=== photo bar UN-HIDE ==*/
function displayPhotobarDownloads() 
{
	if (YD.hasClass(document.body, 'category_Downloads'))
		showPhotoBar = true;
}
/* == TURN OFF THUMBS == */
YE.onAvailable('bodyWrapper', displayPhotobarDownloads); 
displaySmugPopular = false;

/*================================*/
/*==  Vanity URL's code -start  ==*/
/*================================*/

/*---------------------------------------------------------------------- */ 
/* This is a table of vanity URLs that can be appended to your           */
/* main domain and will then redirect the browser to the actual gallery. */
/*                                                                       */
/* This lets you have memorable URLs like:                               */
/* http://www.trishtunney.com/stanford                                   */
/*                                                                       */
/* rather than URLs like:                                                */
/* http://www.trishtunney.com/gallery/329885                             */
/*                                                                       */
/*-----------------------------------------------------------------------*/ 
var vanityTable =  {
        angeliqueduke: "http://www.trishtunney.com/Weddings/Angelique-and-Duke/AngeliqueWedding/10309776_MYyDt",
        nclr: "http://www.spider-t.com/NCLR/index.html",
        esc09: "http://www.trishtunney.com/gallery/7836662_Zhiaa",
        onsiteprinting: "http://www.trishtunney.com/gallery/4041812_4csXW",
        goccoelectric: "http://www.trishtunney.com/gallery/6881794_QTvNn",
        goccochicken: "http://www.trishtunney.com/gallery/6853460_u9nsy",
        jackieandmichele: "http://www.trishtunney.com/gallery/6560096_bQMej",
        eddyandwillie:  "http://www.trishtunney.com/gallery/6541188_hUzYH",        
        marisaandgianluca:  "http://www.trishtunney.com/gallery/6447781_WPRv9",
        debandjanet:  "http://www.trishtunney.com/gallery/6429085_PQeAH", 
	giclee:  "http://www.spider-t.com/docs/ReproductionServices.pdf",        
	dogs: "http://www.trishtunney.com/gallery/1449564",        
	cars: "http://www.trishtunney.com/gallery/1637771",         
	darcyandtodd: "http://www.trishtunney.com/gallery/1847684",        
	karlaandlessy: "http://www.trishtunney.com/gallery/1918730",        
	corporate: "http://www.trishtunney.com/gallery/2270706",        
	eventphotography: "http://www.backprint.com/trishtunney",        
	jillandkevin: "http://www.trishtunney.com/gallery/2306825",        
	kevinandjill: "http://www.trishtunney.com/gallery/2306825",        
	packages: "http://www.trishtunney.com/gallery/1226625",        
	studionaga: "http://www.backprint.com/view_event_photos.asp?PID=bp%1EsA&EVENTID=20107&PWD=",        
	weddingpackages: "http://www.trishtunney.com/gallery/2634768",        
	aceawards: "http://www.backprint.com/view_event_photos.asp?PID=bp%1EsA&EVENTID=21672&PWD=",        
	mit: "http://www.backprint.com/view_event_photos.asp?PID=bp%1EsA&EVENTID=21228&PWD=",        
	wedding: "http://www.trishtunney.com/gallery/2634768",        
	aliciaandkyrsten: "http://www.trishtunney.com/gallery/3871559",        
	lish: "http://www.trishtunney.com/gallery/3759287",        
	jayandchristine: "http://www.trishtunney.com/gallery/3283927",        
	christineandjay: "http://www.trishtunney.com/gallery/3283927",        
	weddingphotography: "http://www.trishtunney.com/gallery/2639817",        
	eqca: "http://www.backprint.com/view_event_photos.asp?PID=486&EVENTID=19595&PWD=",        
	nclr07: "http://www.trishtunney.com/gallery/2841386",        
	nclr08: "http://www.trishtunney.com/gallery/4955062_pNkEn",        
	church:  "http://www.trishtunney.com/gallery/3041052/1/165491041/Large",        
	kathyandmelinda:  "http://www.trishtunney.com/gallery/3394969",        
	foodphotography:  "http://www.trishtunney.com/gallery/3367564",        
	maggieandbeth: "http://www.trishtunney.com/gallery/5034233_7d8bQ",        
	techmash07:  "http://www.trishtunney.com/gallery/3637400",        
	esc08:  "http://www.trishtunney.com/gallery/4852984_BAuct",        
	erikaandtom:  "http://www.trishtunney.com/gallery/3791503",        
	julieandlynda:  "http://www.trishtunney.com/gallery/6221226_yFzsK",        
	lisaymelisa:  "http://www.trishtunney.com/gallery/5611755_rYFwT",        
	productphotography:  "http://www.trishtunney.com/gallery/4539563_nTAis",         
	lisaandrich:  "http://www.trishtunney.com/gallery/4166494",        
	iida:  "http://www.backprint.com/view_event_photos.asp?PID=bp%1EsA&EVENTID=29513&PWD=",        
	dragking07: "http://www.backprint.com/view_event_photos.asp?PID=bp%1EsA&EVENTID=27279&PWD=",        
	horizonsfoundation: "http://www.backprint.com/view_event_photos.asp?PID=bp%1EsA&EVENTID=29686&PWD=",        
	iida2: "http://www.backprint.com/view_event_photos.asp?PID=bp%1EsA&EVENTID=29513&PWD="
};

function IsHomePage() 
{  
	/* test for the "homepage"  */
	// class name in the <BODY> tag  
var bodyTag = document.body;  
	if (bodyTag)  
		{   var classStr = bodyTag.className;   
			if (classStr && (classStr.indexOf("homepage") != -1))   
				{    
					return(true);   
				}  
		}  return(false); 
	}
	
function CheckRedirects() 
{  
	if (IsHomePage()) /* only run this code on the home page   */
		{   
			/* get the path from the current URL,    */
			/* convert it to lowercase and remove the leading slash */
			var path = window.location.pathname.toLowerCase().substr(1);
			var newURL = vanityTable[path];
			/* look it up in our table */
			/* if we found it in the table && newURL is different than where we are */
			if (newURL && (newURL != window.location))   
				{
					window.location.replace(newURL);     
					/* go to the new URL  */
				}
		}
}
/*==============================*/
/*==  Vanity URL's code -end  ==*/
/*==============================*/

