var tourfolder = ""+document.location;
tourfolder = tourfolder.substr( tourfolder.indexOf( "/", 7 )+1 ).replace( /\/.*/i, '' );
$(document).ready(function(){

	if ( $(document).width() > 1024 ) {
		$("div.escortlisting").css("width","98%");
	}
	// Add a nice hover effect to the div.profile box
	$("div.escortlisting div.profile").hover(function(){
		$(this).addClass("hover");
	},function(){
		$(this).removeClass("hover");
	});
	$("dl dt:even,dl dd:even").addClass("highlight");

	$("#setheight").css( "height", 
		( ( navigator.userAgent.match( /firefox\/3/i ) ) ? '500' : $("#getheight").height() ) +"px" 
	);

	// Add a little effect to the join forms
	$("div.joinform span.hideme")
		.addClass( "hidden" );
	$("div.joinform input")
		.focus(function(){
			$(this).addClass("focus");
			$(this).parent().find("span").slideDown();
		})
		.blur(function(){
			$(this).removeClass("focus");
			$(this).parent().find("span").slideUp("fast");
		})

	setTimeout( "initLightBox()", 100 );

});
function initLightBox() {

	if ( "function" == typeof $.fn.lightBox ) { 
		$(".lightbox a.lightbox").lightBox({
			imageLoading: '/templates/'+tourfolder+'/graphics/lightbox/lightbox-ico-loading.gif',
			imageBtnClose:'/templates/'+tourfolder+'/graphics/lightbox/lightbox-btn-close.gif',
			imageBtnPrev: '/templates/'+tourfolder+'/graphics/lightbox/lightbox-btn-prev.gif',
			imageBtnNext: '/templates/'+tourfolder+'/graphics/lightbox/lightbox-btn-next.gif',
			imageBlank:   '/templates/'+tourfolder+'/graphics/lightbox/lightbox-blank.gif'
		});
	} else {
		setTimeout( "initLightBox()", 100 );
	}
}

