/* Function List */

// Functions when the window loads
window.onload = function() {
	// [*] Fix PNG Images for IE PC
	if(navigator.appName != "Netscape"){
		if(navigator.platform != "MacPPC"){
			correctPNG();
		}
	}
	// [*] Preloader from Dreamweaver
	MM_preloadImages('toolkit/presentation/shell/hotellebleu/assets/mainNav/home_on.gif','toolkit/presentation/shell/hotellebleu/assets/mainNav/explore_on.gif','toolkit/presentation/shell/hotellebleu/assets/mainNav/guest_rooms_on.gif','toolkit/presentation/shell/hotellebleu/assets/mainNav/services_on.gif','toolkit/presentation/shell/hotellebleu/assets/mainNav/dinning_on.gif','toolkit/presentation/shell/hotellebleu/assets/mainNav/business_travel_on.gif','toolkit/presentation/shell/hotellebleu/assets/mainNav/neighborhood_on.gif','toolkit/presentation/shell/hotellebleu/assets/mainNav/calendar_on.gif','toolkit/presentation/shell/hotellebleu/assets/mainNav/news_on.gif','toolkit/presentation/shell/hotellebleu/assets/mainNav/contact_us2_on.gif','toolkit/presentation/shell/hotellebleu/assets/topNav/reservations_on.gif','toolkit/presentation/shell/hotellebleu/assets/topNav/specials_on.gif','toolkit/presentation/shell/hotellebleu/assets/topNav/photo_gallery_on.gif','toolkit/presentation/shell/hotellebleu/assets/topNav/find_on.gif','toolkit/presentation/shell/hotellebleu/assets/topNav/stay_on.gif','toolkit/presentation/shell/hotellebleu/assets/subNav/room_types_on.gif','toolkit/presentation/shell/hotellebleu/assets/footerNav/privacy_on.gif','toolkit/presentation/shell/hotellebleu/assets/footerNav/site_map_on.gif','toolkit/presentation/shell/hotellebleu/assets/footerNav/contact_us_on.gif','toolkit/presentation/shell/hotellebleu/assets/footerNav/brg_on.gif','toolkit/presentation/shell/hotellebleu/assets/footerNav/hotel_on.gif','toolkit/presentation/shell/hotellebleu/assets/footerNav/globiwest_on.gif');
	// [*] Set Sizes of DIVs according to other heights

}

// Calendar function
function openCalendar(FormElement){
 var calendarwindow;
 if(FormElement=="arrive"){
	caldate=document.getElementById('DateIn').value;
 }else if(FormElement=="depart"){
	caldate=document.getElementById('DateOut').value;	 
 }
// alert(caldate);
 url = "calendar.html?formname=resform&formelement=" + FormElement + "&curntdate=" + caldate;
 if(FormElement=='arrive')calendarwindow = window.open(url,"thewindow","toolbar=no,LEFT=420,TOP=500,WIDTH=200,HEIGHT=152,status=no,scrollbars=no,resize=no,menubar=no");
 else calendarwindow = window.open(url,"thewindow","toolbar=no,LEFT=640,TOP=500,WIDTH=200,HEIGHT=152,status=no,scrollbars=no,resize=no,menubar=no");
 calendarwindow.focus();
}
function fnSubmit()
	{
		var strCurrentDate = new Date('07/09/2010');
		var check_In=new Date(window.document.resform.arrive.value);
		if(check_In<strCurrentDate)
		{
			alert("Arrival date can not be passed date.");
			window.document.resform.arrive.focus();
			return false;
		}
		var ckin=window.document.resform.arrive.value;	
		var ckout=window.document.resform.depart.value;
		
		if(new Date(ckout)<new Date(ckin))
		{
			alert("Departure date should not be less than arrival date");
			return false;
		}
}

// newWindow(theURL,winName,features)

// makeNewWindow(URL,winname,features)

//od_displayImage(strId,strPath,intWidth,intHeight,strClass,strAlt)

//setimage(name, source)

//Navigo()

//NavigoNew()

//writeFlashVersionDetect(flashName,flashSource,imgSource,w,h,v,vars)

//adjustLayout(elementID,idHeight,imgpath,imgname)



/* start.New Window Functions */

// Current Method

function newWindow(theURL,winName,features) {

  window.open(theURL,winName,features);

}

// Blueprint Method

var newWindow = null

function makeNewWindow(URL,winname,features) {

	// open window with given name, bring it forward

	newWindow = window.open(URL,winname,features);

	newWindow.focus()

}

/* end.New Window Functions */



/* start.Detect Browser */

function BrowserDetectLite() {

	var ua = navigator.userAgent.toLowerCase(); 

	this.ua = ua;

	// browser name

	this.isGecko     = (ua.indexOf('gecko') != -1);

	this.isMozilla   = (this.isGecko && ua.indexOf("gecko/") + 14 == ua.length);

	this.isNS        = ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );

	this.isIE        = ( (ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1) ); 

	this.isOpera     = (ua.indexOf("opera") != -1); 

	this.isKonqueror = (ua.indexOf("konqueror") != -1); 

	this.isIcab      = (ua.indexOf("icab") != -1); 

	this.isAol       = (ua.indexOf("aol") != -1); 

	this.isWebtv     = (ua.indexOf("webtv") != -1); 

	this.isOmniweb   = (ua.indexOf("omniweb") != -1);

	this.isDreamcast   = (ua.indexOf("dreamcast") != -1);

	// spoofing and compatible browsers

	this.isIECompatible = ( (ua.indexOf("msie") != -1) && !this.isIE);

	this.isNSCompatible = ( (ua.indexOf("mozilla") != -1) && !this.isNS && !this.isMozilla);

	// browser version

	this.versionMinor = parseFloat(navigator.appVersion); 

	// correct version number for NS6+ 

	if (this.isNS && this.isGecko) {

		this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('/') + 1 ) );

	}

	// correct version number for IE4+ 

	else if (this.isIE && this.versionMinor >= 4) {

		this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );

	}

	// correct version number for Opera 

	else if (this.isOpera) {

	  	if (ua.indexOf('opera/') != -1) {

			this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera/') + 6 ) );

		}

		else {

			this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera ') + 6 ) );

		}

	}

	// correct version number for Konqueror

	else if (this.isKonqueror) {

		this.versionMinor = parseFloat( ua.substring( ua.indexOf('konqueror/') + 10 ) );

	}

	// correct version number for iCab 

	else if (this.isIcab) {

		if (ua.indexOf('icab/') != -1) {

			this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab/') + 6 ) );

		}

		else {

			this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab ') + 6 ) );

		}

	}

	// correct version number for WebTV

	else if (this.isWebtv) {

		this.versionMinor = parseFloat( ua.substring( ua.indexOf('webtv/') + 6 ) );

	}

	

	this.versionMajor = parseInt(this.versionMinor); 

	this.geckoVersion = ( (this.isGecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );

	

	// platform

	this.isWin   = (ua.indexOf('win') != -1);

	this.isWin32 = (this.isWin && ( ua.indexOf('95') != -1 || ua.indexOf('98') != -1 || ua.indexOf('nt') != -1 || ua.indexOf('win32') != -1 || ua.indexOf('32bit') != -1) );

	this.isMac   = (ua.indexOf('mac') != -1);

	this.isUnix  = (ua.indexOf('unix') != -1 || ua.indexOf('linux') != -1 || ua.indexOf('sunos') != -1 || ua.indexOf('bsd') != -1 || ua.indexOf('x11') != -1)

	

	// specific browser shortcuts

	this.isNS4x = (this.isNS && this.versionMajor == 4);

	this.isNS40x = (this.isNS4x && this.versionMinor < 4.5);

	this.isNS47x = (this.isNS4x && this.versionMinor >= 4.7);

	this.isNS4up = (this.isNS && this.versionMinor >= 4);

	this.isNS6x = (this.isNS && this.versionMajor == 6);

	this.isNS6up = (this.isNS && this.versionMajor >= 6);

	this.isIE4x = (this.isIE && this.versionMajor == 4);

	this.isIE4up = (this.isIE && this.versionMajor >= 4);

	this.isIE5x = (this.isIE && this.versionMajor == 5);

	this.isIE55 = (this.isIE && this.versionMinor == 5.5);

	this.isIE5up = (this.isIE && this.versionMajor >= 5);

	this.isIE6x = (this.isIE && this.versionMajor == 6);

	this.isIE6up = (this.isIE && this.versionMajor >= 6);

	this.isIE4xMac = (this.isIE4x && this.isMac);

}

var browser = new BrowserDetectLite();

/* end.Detect Browser */



/* start.Display PNG */

function OpacityObject(divId, strPath) {

	this.id = divId;

	this.path = strPath;

	if (ns){

		if (browserVersion>=5) {

			this.layerObject = document.getElementById(divId).style;

		} else {

			this.layerObject = eval("document."+divId);

		}

	} else {

		this.layerObject = eval(divId + ".style");

	}

	this.setBackground = od_object_setBackground;

}



function od_object_setBackground() {	

	if (pngAlpha) {

		this.layerObject.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.path+".png', sizingMethod='scale')";

	} else if (pngNormal) {

		this.layerObject.backgroundImage = 'url('+this.path+'.png)';

	} else {

		this.layerObject.backgroundImage = 'url('+this.path+'.gif)';

	}

}



function od_displayImage(strId, strPath, intWidth, intHeight, strClass, strAlt) {	

	if (pngAlpha) {

		document.write('<div style="height:'+intHeight+'px;width:'+intWidth+'px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+strPath+'.png\', sizingMethod=\'scale\')" id="'+strId+'" class="'+strClass+'"></div>');

	} else if (pngNormal) {

		document.write('<img src="'+strPath+'.png" width="'+intWidth+'" height="'+intHeight+'" name="'+strId+'" border="0" class="'+strClass+'" alt="'+strAlt+'" />');

	} else {

		document.write('<img src="'+strPath+'.gif" width="'+intWidth+'" height="'+intHeight+'" name="'+strId+'" border="0" class="'+strClass+'" alt="'+strAlt+'" />');

	}

}



if ((browser.isIE55 || browser.isIE6up) && browser.isWin32) {

	var pngAlpha = true;

	var strExt = ".png";



} else if ((browser.isGecko) || (browser.isIE5up && browser.isMac) || (browser.isOpera && browser.isWin && browser.versionMajor >= 6) || (browser.isOpera && browser.isUnix && browser.versionMajor >= 6) || (browser.isOpera && browser.isMac && browser.versionMajor >= 5) || (browser.isOmniweb && browser.versionMinor >= 3.1) || (browser.isIcab && browser.versionMinor >= 1.9) || (browser.isWebtv) || (browser.isDreamcast)) {

	var pngNormal = true;

	var strExt = ".png";



} else {

	var strExt = ".gif";

}



var ns = (document.all)?false:true;

var browserVersion = parseFloat(navigator.appVersion );



/* start.Rollover Script */

function setimage(name, source)

{document.images[name].src = source; return true;}

/* end.Rollover Script */



/* start.Pulldown Navigation */

// Same Window

function Navigo() {

	var popup = eval("document.NavigotronForm.elements['Navigotron']");

	var dest  = popup[popup.selectedIndex].value;

	if (dest == '') popup.selectedIndex = 0;

	else window.open(dest, '_top');

}

// New Window

function NavigoNew() {

	var popup = eval("document.NavigotronForm.elements['Navigotron']");

	var dest  = popup[popup.selectedIndex].value;

	if (dest == '') popup.selectedIndex = 0;

	else window.open(dest, '_blank');



}

/* end.Pulldown Navigation */



/* start.Flash */

function flashINIT(v)

{

	MM_FlashCanPlay = 0;

	MM_contentVersion = v;

	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

	if ( plugin ) {

			var words = navigator.plugins["Shockwave Flash"].description.split(" ");

			for (var i = 0; i < words.length; ++i)

			{

			if (isNaN(parseInt(words[i])))

			continue;

			var MM_PluginVersion = words[i]; 

			}

		MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;

	}

	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {

		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag

		document.write('on error resume next \n');

		document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');

		document.write('</SCR' + 'IPT\> \n');

	}

}



function writeFlashVersionDetect(flashName,flashSource,imgSource,w,h,v,vars,alpha,rLink)

{

  flashINIT(v);

  if (MM_FlashCanPlay) 

  {

    writeFlash(flashName,flashSource,imgSource,w,h,v,vars,alpha,rLink);

  }else{

	if(imgSource != ""){

		if(!rLink || rLink == ""){

			document.write('<a href="http://www.macromedia.com/go/getflashplayer" target="_blank"><img src="'+ imgSource +'" width="'+ w +'" height="'+ h +'" border=0></a>');

		}else if(rLink == "none"){

			document.write('<img src="'+ imgSource +'" width="'+ w +'" height="'+ h +'" border=0>');

		}else{

			if(rLink.indexOf("http",0)>-1){

				document.write('<a href="'+rLink+'" target="_blank"><img src="'+ imgSource +'" width="'+ w +'" height="'+ h +'" border=0></a>');

			}else{

				document.write('<a href="'+rLink+'"><img src="'+ imgSource +'" width="'+ w +'" height="'+ h +'" border=0></a>');	

			}

		}

	}

  }

}



function writeFlash(flashName,flashSource,imgSource,w,h,v,vars,alpha,rLink)//straight flash write no detection

{

	if(!alpha || alpha == ""){

		alpha = "opaque";	

	}

		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');

		document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ v +',0,0,0" ');

		document.write(' ID="'+ flashName +'" WIDTH="'+ w +'" HEIGHT="'+ h +'" ALIGN="">');

		document.write(' <PARAM NAME=movie VALUE="'+ flashSource +'?'+ vars +'"><PARAM NAME=quality VALUE=high><param name=wmode value='+alpha+'><PARAM NAME=menu VALUE=false>');

		document.write(' <EMBED src="'+ flashSource +'?'+ vars +'" quality=high menu="false" wmode="'+alpha+'"');

		document.write(' swLiveConnect=FALSE WIDTH="'+ w +'" HEIGHT="'+ h +'" NAME="'+ flashName +'" ALIGN=""');

		document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');

		document.write(' </EMBED>');

		document.write(' </OBJECT>');

}

/* end.Flash */



/* start.Show or Hide Image By Layout Height */

function publishImageByHeight(elementID,idHeight,imgpath,imgname) {

	var layerHeight = document.getElementById(elementID).offsetHeight;

	if (layerHeight >= idHeight) { setimage(imgname,imgpath); }

	else {  }

}

/* end.Show or Hide Image By Layout Height */



function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}



function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}



function correctPNG() {

	for(var i=0; i<document.images.length; i++) {

		var img = document.images[i]

		var imgName = img.src.toUpperCase()

		if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {

			var imgID = (img.id) ? "id='" + img.id + "' " : ""

			var imgClass = (img.className) ? "class='" + img.className + "' " : ""

			var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "

			var imgStyle = "display:inline-block;" + img.style.cssText 

			if (img.align == "left") imgStyle = "float:left;" + imgStyle

			if (img.align == "right") imgStyle = "float:right;" + imgStyle

			if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		

			var strNewHTML = "<span " + imgID + imgClass + imgTitle

			+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"

			+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"

			+ "(src=\'" + img.src + "\', sizingMethod='scale'); visibility:visible\"></span>" 

			img.outerHTML = strNewHTML

			i = i-1

		}

	}

}



// Note: This function only renders the beginning DIV tag. You need to input the content and the close DIV tag.

function renderPNGBG(name,path,style,repeat,transform) {

	alert('como?');

	document.write('<div id="' + name + '" style="' + style);

	if (pngAlpha) { document.write('filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + path + name + '.png\', sizingMethod=\'' + transform + '\');'); }

	else { document.write('background:url(' + path + name + '.png) left top ' + repeat + ';'); }

	document.write('">');

}



function adjustDivs(firstID,secondID,firstPadding,secondPadding,firstIDset,secondIDset)

{

	var fHeight = xHeight(firstID);

	var fHeightAdd = (firstPadding);

	var fHeightNew = (parseInt(fHeight) + parseInt(fHeightAdd));

	var sHeight = xHeight(secondID);

	var sHeightAdd = (secondPadding);

	var sHeightNew = (parseInt(sHeight) + parseInt(sHeightAdd));

	var maxHeight = Math.max(fHeightNew,sHeightNew);



	xHeight(firstIDset, maxHeight);

	xHeight(secondIDset, maxHeight);

}



// This is the content photo overlay JS





function addFrame(myTag,targetClass,holderClass,imgOBJ,frameClass,framePath){

	var newArray = new Array();

	var newArray2 = new Array();

	var newElements = new Array();

	var myElem = new Array();

	myElem = document.getElementsByTagName(myTag);

	for(i=0; i<myElem.length; i++){

		if(myElem[i].className == targetClass){

			newArray.push(myElem[i]);

		}

	}

	for(x in newArray[0]){

		<!--document.write(x+" = "+newArray[0][x]+"<br>");-->

	}



	for(i=0; i<newArray.length;i++){

		newArray[i].innerHTML = "<div class='"+holderClass+"'><div class='"+imgOBJ+"'>"+newArray[i].innerHTML+"</div><div class='"+frameClass+"'><img src='"+framePath+"' \/><\/div></div>";

	}

	

	newElements = document.getElementsByTagName("div");

	for(i=0; i<newElements.length; i++){

		if(newElements[i].className == "imgRFrame"){

			newArray2.push(newElements[i]);

		}

	}	

}



/*

Add Div Elements - allows the adding of multiple div elements to a targeted html tag with an associated class



***example usage***

//this script goes before the closing body tag

<script language="javascript">addDivElements("td","tdClass","wrapperClass","comma dilimited list of new div classes","comma dilimited list of paths to image elements to insert in new divs...if no element then have an empty space.");</script>



*******************

*/

function addDivElements(htmlTag,targetClass,wrapper,divs,elements){

	var tagArray = new Array();

	var allTags = new Array();

	var newDivArray = divs.split(",");

	var newElementArray = elements.split(",");

	var oldHTML = "";

	

	//returns all items based on htmlTag property usually all TD's

	allTags = document.getElementsByTagName(htmlTag);

	

	//filters htmlItems by targetClass

	for(i=0; i<allTags.length; i++){ 

		if(allTags[i].className == targetClass){

			tagArray.push(allTags[i]);

		}

	}



	//loop through filtered tagArray and insert appropriate items

	for(i=0; i<tagArray.length;i++){

		var tempHTML = "<div class='"+wrapper+"'>";

		

		for(x=0; x<newDivArray.length;x++){

			if(newElementArray[x].length > 0){

				tempHTML = tempHTML+"<div class='"+newDivArray[x]+"'><img src='"+newElementArray[x]+"' \/><\/div>";	

			}else{

				tempHTML = tempHTML+"<div class='"+newDivArray[x]+"'><\/div>";

			}

		}

		tempHTML = tempHTML + tagArray[i].innerHTML+"</div>";

		tagArray[i].innerHTML = tempHTML;

	}

}



function replaceDivContent(htmlTag,targetClass,wrapper,divs,elements){

	var tagArray = new Array();

	var allTags = new Array();

	var newDivArray = divs.split(",");

	var newElementArray = elements.split(",");

	var oldHTML = "";

	

	//returns all items based on htmlTag property usually all TD's

	allTags = document.getElementsByTagName(htmlTag);

	

	//filters htmlItems by targetClass

	for(i=0; i<allTags.length; i++){ 

		if(allTags[i].className == targetClass){

			tagArray.push(allTags[i]);

		}

	}



	//loop through filtered tagArray and insert appropriate items

	for(i=0; i<tagArray.length;i++){

		var tempHTML = "<div class='"+wrapper+"'>";

		

		for(x=0; x<newDivArray.length;x++){

			if(newElementArray[x].length > 0){

				tempHTML = tempHTML+"<div class='"+newDivArray[x]+"'><img src='"+newElementArray[x]+"' \/><\/div>";	

			}else{

				tempHTML = tempHTML+"<div class='"+newDivArray[x]+"'><\/div>";

			}

		}

		tempHTML = tempHTML + "</div>";

		tagArray[i].innerHTML = tempHTML;

	}

}



jQuery(document).ready(function() {

	/* Main navigation */

	jQuery('.item1').append('<span class="hover" onclick="setURL1();"></span>').each(function () {

	  var $span = jQuery('> span.hover', this).css('opacity', 0);

	  jQuery(this).hover(function () {

	    $span.stop().fadeTo(250, 1);

	  }, function () {

	    $span.stop().fadeTo(250, 0);

	  });

	});

	jQuery('.item56').append('<span class="hover" onclick="setURL56();"></span>').each(function () {

	  var $span = jQuery('> span.hover', this).css('opacity', 0);

	  jQuery(this).hover(function () {

	    $span.stop().fadeTo(250, 1);

	  }, function () {

	    $span.stop().fadeTo(250, 0);

	  });

	});

	jQuery('.item57').append('<span class="hover" onclick="setURL57();"></span>').each(function () {

	  var $span = jQuery('> span.hover', this).css('opacity', 0);

	  jQuery(this).hover(function () {

	    $span.stop().fadeTo(250, 1);

	  }, function () {

	    $span.stop().fadeTo(250, 0);

	  });

	});

	jQuery('.item58').append('<span class="hover" onclick="setURL58();"></span>').each(function () {

	  var $span = jQuery('> span.hover', this).css('opacity', 0);

	  jQuery(this).hover(function () {

	    $span.stop().fadeTo(250, 1);

	  }, function () {

	    $span.stop().fadeTo(250, 0);

	  });

	});

	jQuery('.item59').append('<span class="hover" onclick="setURL59();"></span>').each(function () {

	  var $span = jQuery('> span.hover', this).css('opacity', 0);

	  jQuery(this).hover(function () {

	    $span.stop().fadeTo(250, 1);

	  }, function () {

	    $span.stop().fadeTo(250, 0);

	  });

	});

	jQuery('.item60').append('<span class="hover" onclick="setURL60();"></span>').each(function () {

	  var $span = jQuery('> span.hover', this).css('opacity', 0);

	  jQuery(this).hover(function () {

	    $span.stop().fadeTo(250, 1);

	  }, function () {

	    $span.stop().fadeTo(250, 0);

	  });

	});

	jQuery('.item61').append('<span class="hover" onclick="setURL61();"></span>').each(function () {

	  var $span = jQuery('> span.hover', this).css('opacity', 0);

	  jQuery(this).hover(function () {

	    $span.stop().fadeTo(250, 1);

	  }, function () {

	    $span.stop().fadeTo(250, 0);

	  });

	});

	jQuery('.item62').append('<span class="hover" onclick="setURL62();"></span>').each(function () {

	  var $span = jQuery('> span.hover', this).css('opacity', 0);

	  jQuery(this).hover(function () {

	    $span.stop().fadeTo(250, 1);

	  }, function () {

	    $span.stop().fadeTo(250, 0);

	  });

	});

	jQuery('.item63').append('<span class="hover" onclick="setURL63();"></span>').each(function () {

	  var $span = jQuery('> span.hover', this).css('opacity', 0);

	  jQuery(this).hover(function () {

	    $span.stop().fadeTo(250, 1);

	  }, function () {

	    $span.stop().fadeTo(250, 0);

	  });

	});

	jQuery('.item64').append('<span class="hover" onclick="setURL64();"></span>').each(function () {

	  var $span = jQuery('> span.hover', this).css('opacity', 0);

	  jQuery(this).hover(function () {

	    $span.stop().fadeTo(250, 1);

	  }, function () {

	    $span.stop().fadeTo(250, 0);

	  });

	});

	

	/* Top navigation */
	jQuery('.item65').append('<span class="hover" onclick="setURL65();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.item66').append('<span class="hover" onclick="setURL66();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.item67').append('<span class="hover" onclick="setURL67();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.item68').append('<span class="hover" onclick="setURL68();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.item69').append('<span class="hover" onclick="setURL69();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	
	/* Footer navigation */
	jQuery('.item70').append('<span class="hover" onclick="setURL70();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.item71').append('<span class="hover" onclick="setURL71();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.item72').append('<span class="hover" onclick="setURL72();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.item73').append('<span class="hover" onclick="setURL73();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.item74').append('<span class="hover" onclick="setURL74();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.item75').append('<span class="hover" onclick="setURL75();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.item81').append('<span class="hover" onclick="setURL81();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});	
jQuery('.item84').append('<span class="hover" onclick="setURL84();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});		

	/* CTA */
	jQuery('.cta_email_offers').append('<span class="hover"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.cta_photo_gallery').append('<span class="hover"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});	
jQuery('.cta_virtual_tour').append('<span class="hover"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});		
	jQuery('.subnav').append('<span class="hover"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});	
//Excluisve top nav
	jQuery('.item91').append('<span class="hover" onclick="setURL91();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.item92').append('<span class="hover" onclick="setURL92();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.item93').append('<span class="hover" onclick="setURL93();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.item94').append('<span class="hover" onclick="setURL94();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
	jQuery('.item95').append('<span class="hover" onclick="setURL95();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});
});
/*jQuery('.item84').append('<span class="hover" onclick="setURL84();"></span>').each(function () {
	  var $span = jQuery('> span.hover', this).css('opacity', 0);
	  jQuery(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(250, 0);
	  });
	});	
});*/
function setURL1(){
	window.location='http://www.hotellebleu.com/';
}
function setURL56(){
	window.location='brooklyn-boutique-accommodations';
}
function setURL57(){
	window.location='brooklyn-hotel-rooms';
}
function setURL58(){
	window.location='brooklyn-hotel-amenities';
}
function setURL59(){
	window.location='brooklyn-hotel-restaurant';
}
function setURL60(){
	window.location='brooklyn-business-hotel';
}
function setURL61(){
	window.location='brooklyn-attractions';
}
function setURL62(){
	window.location='brooklyn-events';
}
function setURL63(){
	window.location='hotel-news-press';
}
function setURL64(){
	window.location='contact-us';
}
function setURL65(){
	window.open('https://gc.synxis.com/rez.aspx?Hotel=17831&Chain=5382', '_blank');
}
function setURL66(){
	window.location='brooklyn-hotel-specials';
}
function setURL67(){
	window.location='photo-gallery';
}
function setURL68(){
	window.location='brooklyn-hotel-directions';
}
function setURL69(){
	window.location='stay-connected';
}
function setURL70(){
	window.location='privacy-policy';
}
function setURL71(){
	window.location='site-map';
}
function setURL72(){
	window.location='contact-us';
}
function setURL73(){
	window.location='rate-guarantee';
}
function setURL74(){
	window.open('http://www.hotellejolie.com/', '_blank');
}
function setURL75(){
	window.open('http://www.globiwest.com/', '_blank');
}
function setURL81(){
	window.open('http://arenahotelnyc.com', '_blank');
}
function setURL84(){
	window.location='faq';
}
function setURL91(){
	window.open('https://gc.synxis.com/rez.aspx?Hotel=17831&Chain=5382', '_blank');
}
function setURL92(){
	window.location='brooklyn-hotel-specials';
}
function setURL93(){
	window.location='photo-gallery';
}
function setURL94(){
	window.location='brooklyn-hotel-directions';
}
function setURL95(){
	window.location='stay-connected';
}

/* calendar */
/* set current date */
function getDateStrWithDOW() {
var today = new Date();
var year = today.getYear();
if(year<1000) year+=1900;
var todayStr = (today.getMonth()+1) + "/" + (today.getDate()+1);
todayStr += "/" + year;
if(today.getDate()+2>31){
	var tomorrowStr = (today.getMonth()+2) + "/01";	
}else{
	var tomorrowStr = (today.getMonth()+1) + "/" + (today.getDate()+2);
}
tomorrowStr += "/" + year;
document.forms["resform"].DateIn.value = todayStr;
document.forms["resform"].DateOut.value = tomorrowStr;
}

//MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006-2007 Valerio Proietti, <http://mad4milk.net>, MIT Style License.
var MooTools={version:"1.11"};function $defined(A){return(A!=undefined)}function $type(B){if(!$defined(B)){return false}if(B.htmlElement){return"element"}var A=typeof B;if(A=="object"&&B.nodeName){switch(B.nodeType){case 1:return"element";case 3:return(/\S/).test(B.nodeValue)?"textnode":"whitespace"}}if(A=="object"||A=="function"){switch(B.constructor){case Array:return"array";case RegExp:return"regexp";case Class:return"class"}if(typeof B.length=="number"){if(B.item){return"collection"}if(B.callee){return"arguments"}}}return A}function $merge(){var C={};for(var B=0;B<arguments.length;B++){for(var E in arguments[B]){var A=arguments[B][E];var D=C[E];if(D&&$type(A)=="object"&&$type(D)=="object"){C[E]=$merge(D,A)}else{C[E]=A}}}return C}var $extend=function(){var A=arguments;if(!A[1]){A=[this,A[0]]}for(var B in A[1]){A[0][B]=A[1][B]}return A[0]};var $native=function(){for(var B=0,A=arguments.length;B<A;B++){arguments[B].extend=function(C){for(var D in C){if(!this.prototype[D]){this.prototype[D]=C[D]}if(!this[D]){this[D]=$native.generic(D)}}}}};$native.generic=function(A){return function(B){return this.prototype[A].apply(B,Array.prototype.slice.call(arguments,1))}};$native(Function,Array,String,Number);function $chk(A){return !!(A||A===0)}function $pick(B,A){return $defined(B)?B:A}function $random(B,A){return Math.floor(Math.random()*(A-B+1)+B)}function $time(){return new Date().getTime()}function $clear(A){clearTimeout(A);clearInterval(A);return null}var Abstract=function(A){A=A||{};A.extend=$extend;return A};var Window=new Abstract(window);var Document=new Abstract(document);document.head=document.getElementsByTagName("head")[0];window.xpath=!!(document.evaluate);if(window.ActiveXObject){window.ie=window[window.XMLHttpRequest?"ie7":"ie6"]=true}else{if(document.childNodes&&!document.all&&!navigator.taintEnabled){window.webkit=window[window.xpath?"webkit420":"webkit419"]=true}else{if(document.getBoxObjectFor!=null){window.gecko=true}}}window.khtml=window.webkit;Object.extend=$extend;if(typeof HTMLElement=="undefined"){var HTMLElement=function(){};if(window.webkit){document.createElement("iframe")}HTMLElement.prototype=(window.webkit)?window["[[DOMElement.prototype]]"]:{}}HTMLElement.prototype.htmlElement=function(){};if(window.ie6){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}var Class=function(B){var A=function(){return(arguments[0]!==null&&this.initialize&&$type(this.initialize)=="function")?this.initialize.apply(this,arguments):this};$extend(A,this);A.prototype=B;A.constructor=Class;return A};Class.empty=function(){};Class.prototype={extend:function(B){var C=new this(null);for(var D in B){var A=C[D];C[D]=Class.Merge(A,B[D])}return new Class(C)},implement:function(){for(var B=0,A=arguments.length;B<A;B++){$extend(this.prototype,arguments[B])}}};Class.Merge=function(C,D){if(C&&C!=D){var B=$type(D);if(B!=$type(C)){return D}switch(B){case"function":var A=function(){this.parent=arguments.callee.parent;return D.apply(this,arguments)};A.parent=C;return A;case"object":return $merge(C,D)}}return D};var Chain=new Class({chain:function(A){this.chains=this.chains||[];this.chains.push(A);return this},callChain:function(){if(this.chains&&this.chains.length){this.chains.shift().delay(10,this)}},clearChain:function(){this.chains=[]}});var Events=new Class({addEvent:function(B,A){if(A!=Class.empty){this.$events=this.$events||{};this.$events[B]=this.$events[B]||[];this.$events[B].include(A)}return this},fireEvent:function(C,B,A){if(this.$events&&this.$events[C]){this.$events[C].each(function(D){D.create({bind:this,delay:A,"arguments":B})()},this)}return this},removeEvent:function(B,A){if(this.$events&&this.$events[B]){this.$events[B].remove(A)}return this}});var Options=new Class({setOptions:function(){this.options=$merge.apply(null,[this.options].extend(arguments));if(this.addEvent){for(var A in this.options){if($type(this.options[A]=="function")&&(/^on[A-Z]/).test(A)){this.addEvent(A,this.options[A])}}}return this}});Array.extend({forEach:function(C,D){for(var B=0,A=this.length;B<A;B++){C.call(D,this[B],B,this)}},filter:function(D,E){var C=[];for(var B=0,A=this.length;B<A;B++){if(D.call(E,this[B],B,this)){C.push(this[B])}}return C},map:function(D,E){var C=[];for(var B=0,A=this.length;B<A;B++){C[B]=D.call(E,this[B],B,this)}return C},every:function(C,D){for(var B=0,A=this.length;B<A;B++){if(!C.call(D,this[B],B,this)){return false}}return true},some:function(C,D){for(var B=0,A=this.length;B<A;B++){if(C.call(D,this[B],B,this)){return true}}return false},indexOf:function(C,D){var A=this.length;for(var B=(D<0)?Math.max(0,A+D):D||0;B<A;B++){if(this[B]===C){return B}}return -1},copy:function(D,C){D=D||0;if(D<0){D=this.length+D}C=C||(this.length-D);var A=[];for(var B=0;B<C;B++){A[B]=this[D++]}return A},remove:function(C){var B=0;var A=this.length;while(B<A){if(this[B]===C){this.splice(B,1);A--}else{B++}}return this},contains:function(A,B){return this.indexOf(A,B)!=-1},associate:function(C){var D={},B=Math.min(this.length,C.length);for(var A=0;A<B;A++){D[C[A]]=this[A]}return D},extend:function(C){for(var B=0,A=C.length;B<A;B++){this.push(C[B])}return this},merge:function(C){for(var B=0,A=C.length;B<A;B++){this.include(C[B])}return this},include:function(A){if(!this.contains(A)){this.push(A)}return this},getRandom:function(){return this[$random(0,this.length-1)]||null},getLast:function(){return this[this.length-1]||null}});Array.prototype.each=Array.prototype.forEach;Array.each=Array.forEach;function $A(A){return Array.copy(A)}function $each(C,B,D){if(C&&typeof C.length=="number"&&$type(C)!="object"){Array.forEach(C,B,D)}else{for(var A in C){B.call(D||C,C[A],A)}}}Array.prototype.test=Array.prototype.contains;String.extend({test:function(A,B){return(($type(A)=="string")?new RegExp(A,B):A).test(this)},toInt:function(){return parseInt(this,10)},toFloat:function(){return parseFloat(this)},camelCase:function(){return this.replace(/-\D/g,function(A){return A.charAt(1).toUpperCase()})},hyphenate:function(){return this.replace(/\w[A-Z]/g,function(A){return(A.charAt(0)+"-"+A.charAt(1).toLowerCase())})},capitalize:function(){return this.replace(/\b[a-z]/g,function(A){return A.toUpperCase()})},trim:function(){return this.replace(/^\s+|\s+$/g,"")},clean:function(){return this.replace(/\s{2,}/g," ").trim()},rgbToHex:function(B){var A=this.match(/\d{1,3}/g);return(A)?A.rgbToHex(B):false},hexToRgb:function(B){var A=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(A)?A.slice(1).hexToRgb(B):false},contains:function(A,B){return(B)?(B+this+B).indexOf(B+A+B)>-1:this.indexOf(A)>-1},escapeRegExp:function(){return this.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")}});Array.extend({rgbToHex:function(D){if(this.length<3){return false}if(this.length==4&&this[3]==0&&!D){return"transparent"}var B=[];for(var A=0;A<3;A++){var C=(this[A]-0).toString(16);B.push((C.length==1)?"0"+C:C)}return D?B:"#"+B.join("")},hexToRgb:function(C){if(this.length!=3){return false}var A=[];for(var B=0;B<3;B++){A.push(parseInt((this[B].length==1)?this[B]+this[B]:this[B],16))}return C?A:"rgb("+A.join(",")+")"}});Function.extend({create:function(A){var B=this;A=$merge({bind:B,event:false,"arguments":null,delay:false,periodical:false,attempt:false},A);if($chk(A.arguments)&&$type(A.arguments)!="array"){A.arguments=[A.arguments]}return function(E){var C;if(A.event){E=E||window.event;C=[(A.event===true)?E:new A.event(E)];if(A.arguments){C.extend(A.arguments)}}else{C=A.arguments||arguments}var F=function(){return B.apply($pick(A.bind,B),C)};if(A.delay){return setTimeout(F,A.delay)}if(A.periodical){return setInterval(F,A.periodical)}if(A.attempt){try{return F()}catch(D){return false}}return F()}},pass:function(A,B){return this.create({"arguments":A,bind:B})},attempt:function(A,B){return this.create({"arguments":A,bind:B,attempt:true})()},bind:function(B,A){return this.create({bind:B,"arguments":A})},bindAsEventListener:function(B,A){return this.create({bind:B,event:true,"arguments":A})},delay:function(B,C,A){return this.create({delay:B,bind:C,"arguments":A})()},periodical:function(A,C,B){return this.create({periodical:A,bind:C,"arguments":B})()}});Number.extend({toInt:function(){return parseInt(this)},toFloat:function(){return parseFloat(this)},limit:function(B,A){return Math.min(A,Math.max(B,this))},round:function(A){A=Math.pow(10,A||0);return Math.round(this*A)/A},times:function(B){for(var A=0;A<this;A++){B(A)}}});var Element=new Class({initialize:function(D,C){if($type(D)=="string"){if(window.ie&&C&&(C.name||C.type)){var A=(C.name)?' name="'+C.name+'"':"";var B=(C.type)?' type="'+C.type+'"':"";delete C.name;delete C.type;D="<"+D+A+B+">"}D=document.createElement(D)}D=$(D);return(!C||!D)?D:D.set(C)}});var Elements=new Class({initialize:function(A){return(A)?$extend(A,this):this}});Elements.extend=function(A){for(var B in A){this.prototype[B]=A[B];this[B]=$native.generic(B)}};function $(B){if(!B){return null}if(B.htmlElement){return Garbage.collect(B)}if([window,document].contains(B)){return B}var A=$type(B);if(A=="string"){B=document.getElementById(B);A=(B)?"element":false}if(A!="element"){return null}if(B.htmlElement){return Garbage.collect(B)}if(["object","embed"].contains(B.tagName.toLowerCase())){return B}$extend(B,Element.prototype);B.htmlElement=function(){};return Garbage.collect(B)}document.getElementsBySelector=document.getElementsByTagName;function $$(){var D=[];for(var C=0,B=arguments.length;C<B;C++){var A=arguments[C];switch($type(A)){case"element":D.push(A);case"boolean":break;case false:break;case"string":A=document.getElementsBySelector(A,true);default:D.extend(A)}}return $$.unique(D)}$$.unique=function(G){var D=[];for(var C=0,A=G.length;C<A;C++){if(G[C].$included){continue}var B=$(G[C]);if(B&&!B.$included){B.$included=true;D.push(B)}}for(var F=0,E=D.length;F<E;F++){D[F].$included=null}return new Elements(D)};Elements.Multi=function(A){return function(){var D=arguments;var B=[];var G=true;for(var E=0,C=this.length,F;E<C;E++){F=this[E][A].apply(this[E],D);if($type(F)!="element"){G=false}B.push(F)}return(G)?$$.unique(B):B}};Element.extend=function(A){for(var B in A){HTMLElement.prototype[B]=A[B];Element.prototype[B]=A[B];Element[B]=$native.generic(B);var C=(Array.prototype[B])?B+"Elements":B;Elements.prototype[C]=Elements.Multi(B)}};Element.extend({set:function(A){for(var C in A){var B=A[C];switch(C){case"styles":this.setStyles(B);break;case"events":if(this.addEvents){this.addEvents(B)}break;case"properties":this.setProperties(B);break;default:this.setProperty(C,B)}}return this},inject:function(C,A){C=$(C);switch(A){case"before":C.parentNode.insertBefore(this,C);break;case"after":var B=C.getNext();if(!B){C.parentNode.appendChild(this)}else{C.parentNode.insertBefore(this,B)}break;case"top":var D=C.firstChild;if(D){C.insertBefore(this,D);break}default:C.appendChild(this)}return this},injectBefore:function(A){return this.inject(A,"before")},injectAfter:function(A){return this.inject(A,"after")},injectInside:function(A){return this.inject(A,"bottom")},injectTop:function(A){return this.inject(A,"top")},adopt:function(){var A=[];$each(arguments,function(B){A=A.concat(B)});$$(A).inject(this);return this},remove:function(){return this.parentNode.removeChild(this)},clone:function(C){var B=$(this.cloneNode(C!==false));if(!B.$events){return B}B.$events={};for(var A in this.$events){B.$events[A]={keys:$A(this.$events[A].keys),values:$A(this.$events[A].values)}}return B.removeEvents()},replaceWith:function(A){A=$(A);this.parentNode.replaceChild(A,this);return A},appendText:function(A){this.appendChild(document.createTextNode(A));return this},hasClass:function(A){return this.className.contains(A," ")},addClass:function(A){if(!this.hasClass(A)){this.className=(this.className+" "+A).clean()}return this},removeClass:function(A){this.className=this.className.replace(new RegExp("(^|\\s)"+A+"(?:\\s|$)"),"$1").clean();return this},toggleClass:function(A){return this.hasClass(A)?this.removeClass(A):this.addClass(A)},setStyle:function(B,A){switch(B){case"opacity":return this.setOpacity(parseFloat(A));case"float":B=(window.ie)?"styleFloat":"cssFloat"}B=B.camelCase();switch($type(A)){case"number":if(!["zIndex","zoom"].contains(B)){A+="px"}break;case"array":A="rgb("+A.join(",")+")"}this.style[B]=A;return this},setStyles:function(A){switch($type(A)){case"object":Element.setMany(this,"setStyle",A);break;case"string":this.style.cssText=A}return this},setOpacity:function(A){if(A==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden"}}else{if(this.style.visibility!="visible"){this.style.visibility="visible"}}if(!this.currentStyle||!this.currentStyle.hasLayout){this.style.zoom=1}if(window.ie){this.style.filter=(A==1)?"":"alpha(opacity="+A*100+")"}this.style.opacity=this.$tmp.opacity=A;return this},getStyle:function(C){C=C.camelCase();var A=this.style[C];if(!$chk(A)){if(C=="opacity"){return this.$tmp.opacity}A=[];for(var B in Element.Styles){if(C==B){Element.Styles[B].each(function(F){var E=this.getStyle(F);A.push(parseInt(E)?E:"0px")},this);if(C=="border"){var D=A.every(function(E){return(E==A[0])});return(D)?A[0]:false}return A.join(" ")}}if(C.contains("border")){if(Element.Styles.border.contains(C)){return["Width","Style","Color"].map(function(E){return this.getStyle(C+E)},this).join(" ")}else{if(Element.borderShort.contains(C)){return["Top","Right","Bottom","Left"].map(function(E){return this.getStyle("border"+E+C.replace("border",""))},this).join(" ")}}}if(document.defaultView){A=document.defaultView.getComputedStyle(this,null).getPropertyValue(C.hyphenate())}else{if(this.currentStyle){A=this.currentStyle[C]}}}if(window.ie){A=Element.fixStyle(C,A,this)}if(A&&C.test(/color/i)&&A.contains("rgb")){return A.split("rgb").splice(1,4).map(function(E){return E.rgbToHex()}).join(" ")}return A},getStyles:function(){return Element.getMany(this,"getStyle",arguments)},walk:function(A,C){A+="Sibling";var B=(C)?this[C]:this[A];while(B&&$type(B)!="element"){B=B[A]}return $(B)},getPrevious:function(){return this.walk("previous")},getNext:function(){return this.walk("next")},getFirst:function(){return this.walk("next","firstChild")},getLast:function(){return this.walk("previous","lastChild")},getParent:function(){return $(this.parentNode)},getChildren:function(){return $$(this.childNodes)},hasChild:function(A){return !!$A(this.getElementsByTagName("*")).contains(A)},getProperty:function(D){var B=Element.Properties[D];if(B){return this[B]}var A=Element.PropertiesIFlag[D]||0;if(!window.ie||A){return this.getAttribute(D,A)}var C=this.attributes[D];return(C)?C.nodeValue:null},removeProperty:function(B){var A=Element.Properties[B];if(A){this[A]=""}else{this.removeAttribute(B)}return this},getProperties:function(){return Element.getMany(this,"getProperty",arguments)},setProperty:function(C,B){var A=Element.Properties[C];if(A){this[A]=B}else{this.setAttribute(C,B)}return this},setProperties:function(A){return Element.setMany(this,"setProperty",A)},setHTML:function(){this.innerHTML=$A(arguments).join("");return this},setText:function(B){var A=this.getTag();if(["style","script"].contains(A)){if(window.ie){if(A=="style"){this.styleSheet.cssText=B}else{if(A=="script"){this.setProperty("text",B)}}return this}else{this.removeChild(this.firstChild);return this.appendText(B)}}this[$defined(this.innerText)?"innerText":"textContent"]=B;return this},getText:function(){var A=this.getTag();if(["style","script"].contains(A)){if(window.ie){if(A=="style"){return this.styleSheet.cssText}else{if(A=="script"){return this.getProperty("text")}}}else{return this.innerHTML}}return($pick(this.innerText,this.textContent))},getTag:function(){return this.tagName.toLowerCase()},empty:function(){Garbage.trash(this.getElementsByTagName("*"));return this.setHTML("")}});Element.fixStyle=function(E,A,D){if($chk(parseInt(A))){return A}if(["height","width"].contains(E)){var B=(E=="width")?["left","right"]:["top","bottom"];var C=0;B.each(function(F){C+=D.getStyle("border-"+F+"-width").toInt()+D.getStyle("padding-"+F).toInt()});return D["offset"+E.capitalize()]-C+"px"}else{if(E.test(/border(.+)Width|margin|padding/)){return"0px"}}return A};Element.Styles={border:[],padding:[],margin:[]};["Top","Right","Bottom","Left"].each(function(B){for(var A in Element.Styles){Element.Styles[A].push(A+B)}});Element.borderShort=["borderWidth","borderStyle","borderColor"];Element.getMany=function(B,D,C){var A={};$each(C,function(E){A[E]=B[D](E)});return A};Element.setMany=function(B,D,C){for(var A in C){B[D](A,C[A])}return B};Element.Properties=new Abstract({"class":"className","for":"htmlFor",colspan:"colSpan",rowspan:"rowSpan",accesskey:"accessKey",tabindex:"tabIndex",maxlength:"maxLength",readonly:"readOnly",frameborder:"frameBorder",value:"value",disabled:"disabled",checked:"checked",multiple:"multiple",selected:"selected"});Element.PropertiesIFlag={href:2,src:2};Element.Methods={Listeners:{addListener:function(B,A){if(this.addEventListener){this.addEventListener(B,A,false)}else{this.attachEvent("on"+B,A)}return this},removeListener:function(B,A){if(this.removeEventListener){this.removeEventListener(B,A,false)}else{this.detachEvent("on"+B,A)}return this}}};window.extend(Element.Methods.Listeners);document.extend(Element.Methods.Listeners);Element.extend(Element.Methods.Listeners);var Garbage={elements:[],collect:function(A){if(!A.$tmp){Garbage.elements.push(A);A.$tmp={opacity:1}}return A},trash:function(D){for(var B=0,A=D.length,C;B<A;B++){if(!(C=D[B])||!C.$tmp){continue}if(C.$events){C.fireEvent("trash").removeEvents()}for(var E in C.$tmp){C.$tmp[E]=null}for(var F in Element.prototype){C[F]=null}Garbage.elements[Garbage.elements.indexOf(C)]=null;C.htmlElement=C.$tmp=C=null}Garbage.elements.remove(null)},empty:function(){Garbage.collect(window);Garbage.collect(document);Garbage.trash(Garbage.elements)}};window.addListener("beforeunload",function(){window.addListener("unload",Garbage.empty);if(window.ie){window.addListener("unload",CollectGarbage)}});var Event=new Class({initialize:function(C){if(C&&C.$extended){return C}this.$extended=true;C=C||window.event;this.event=C;this.type=C.type;this.target=C.target||C.srcElement;if(this.target.nodeType==3){this.target=this.target.parentNode}this.shift=C.shiftKey;this.control=C.ctrlKey;this.alt=C.altKey;this.meta=C.metaKey;if(["DOMMouseScroll","mousewheel"].contains(this.type)){this.wheel=(C.wheelDelta)?C.wheelDelta/120:-(C.detail||0)/3}else{if(this.type.contains("key")){this.code=C.which||C.keyCode;for(var B in Event.keys){if(Event.keys[B]==this.code){this.key=B;break}}if(this.type=="keydown"){var A=this.code-111;if(A>0&&A<13){this.key="f"+A}}this.key=this.key||String.fromCharCode(this.code).toLowerCase()}else{if(this.type.test(/(click|mouse|menu)/)){this.page={x:C.pageX||C.clientX+document.documentElement.scrollLeft,y:C.pageY||C.clientY+document.documentElement.scrollTop};this.client={x:C.pageX?C.pageX-window.pageXOffset:C.clientX,y:C.pageY?C.pageY-window.pageYOffset:C.clientY};this.rightClick=(C.which==3)||(C.button==2);switch(this.type){case"mouseover":this.relatedTarget=C.relatedTarget||C.fromElement;break;case"mouseout":this.relatedTarget=C.relatedTarget||C.toElement}this.fixRelatedTarget()}}}return this},stop:function(){return this.stopPropagation().preventDefault()},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation()}else{this.event.cancelBubble=true}return this},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault()}else{this.event.returnValue=false}return this}});Event.fix={relatedTarget:function(){if(this.relatedTarget&&this.relatedTarget.nodeType==3){this.relatedTarget=this.relatedTarget.parentNode}},relatedTargetGecko:function(){try{Event.fix.relatedTarget.call(this)}catch(A){this.relatedTarget=this.target}}};Event.prototype.fixRelatedTarget=(window.gecko)?Event.fix.relatedTargetGecko:Event.fix.relatedTarget;Event.keys=new Abstract({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46});Element.Methods.Events={addEvent:function(C,B){this.$events=this.$events||{};this.$events[C]=this.$events[C]||{keys:[],values:[]};if(this.$events[C].keys.contains(B)){return this}this.$events[C].keys.push(B);var A=C;var D=Element.Events[C];if(D){if(D.add){D.add.call(this,B)}if(D.map){B=D.map}if(D.type){A=D.type}}if(!this.addEventListener){B=B.create({bind:this,event:true})}this.$events[C].values.push(B);return(Element.NativeEvents.contains(A))?this.addListener(A,B):this},removeEvent:function(C,B){if(!this.$events||!this.$events[C]){return this}var F=this.$events[C].keys.indexOf(B);if(F==-1){return this}var A=this.$events[C].keys.splice(F,1)[0];var E=this.$events[C].values.splice(F,1)[0];var D=Element.Events[C];if(D){if(D.remove){D.remove.call(this,B)}if(D.type){C=D.type}}return(Element.NativeEvents.contains(C))?this.removeListener(C,E):this},addEvents:function(A){return Element.setMany(this,"addEvent",A)},removeEvents:function(A){if(!this.$events){return this}if(!A){for(var B in this.$events){this.removeEvents(B)}this.$events=null}else{if(this.$events[A]){this.$events[A].keys.each(function(C){this.removeEvent(A,C)},this);this.$events[A]=null}}return this},fireEvent:function(C,B,A){if(this.$events&&this.$events[C]){this.$events[C].keys.each(function(D){D.create({bind:this,delay:A,"arguments":B})()},this)}return this},cloneEvents:function(C,A){if(!C.$events){return this}if(!A){for(var B in C.$events){this.cloneEvents(C,B)}}else{if(C.$events[A]){C.$events[A].keys.each(function(D){this.addEvent(A,D)},this)}}return this}};window.extend(Element.Methods.Events);document.extend(Element.Methods.Events);Element.extend(Element.Methods.Events);Element.Events=new Abstract({mouseenter:{type:"mouseover",map:function(A){A=new Event(A);if(A.relatedTarget!=this&&!this.hasChild(A.relatedTarget)){this.fireEvent("mouseenter",A)}}},mouseleave:{type:"mouseout",map:function(A){A=new Event(A);if(A.relatedTarget!=this&&!this.hasChild(A.relatedTarget)){this.fireEvent("mouseleave",A)}}},mousewheel:{type:(window.gecko)?"DOMMouseScroll":"mousewheel"}});Element.NativeEvents=["click","dblclick","mouseup","mousedown","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","keydown","keypress","keyup","load","unload","beforeunload","resize","move","focus","blur","change","submit","reset","select","error","abort","contextmenu","scroll"];Function.extend({bindWithEvent:function(B,A){return this.create({bind:B,"arguments":A,event:Event})}});Element.Events.domready={add:function(B){if(window.loaded){B.call(this);return }var A=function(){if(window.loaded){return }window.loaded=true;window.timer=$clear(window.timer);this.fireEvent("domready")}.bind(this);if(document.readyState&&window.webkit){window.timer=function(){if(["loaded","complete"].contains(document.readyState)){A()}}.periodical(50)}else{if(document.readyState&&window.ie){if(!$("ie_ready")){var C=(window.location.protocol=="https:")?"://0":"javascript:void(0)";document.write('<script id="ie_ready" defer src="'+C+'"><\/script>');$("ie_ready").onreadystatechange=function(){if(this.readyState=="complete"){A()}}}}else{window.addListener("load",A);document.addListener("DOMContentLoaded",A)}}}};window.onDomReady=function(A){return this.addEvent("domready",A)};window.extend({getWidth:function(){if(this.webkit419){return this.innerWidth}if(this.opera){return document.body.clientWidth}return document.documentElement.clientWidth},getHeight:function(){if(this.webkit419){return this.innerHeight}if(this.opera){return document.body.clientHeight}return document.documentElement.clientHeight},getScrollWidth:function(){if(this.ie){return Math.max(document.documentElement.offsetWidth,document.documentElement.scrollWidth)}if(this.webkit){return document.body.scrollWidth}return document.documentElement.scrollWidth},getScrollHeight:function(){if(this.ie){return Math.max(document.documentElement.offsetHeight,document.documentElement.scrollHeight)}if(this.webkit){return document.body.scrollHeight}return document.documentElement.scrollHeight},getScrollLeft:function(){return this.pageXOffset||document.documentElement.scrollLeft},getScrollTop:function(){return this.pageYOffset||document.documentElement.scrollTop},getSize:function(){return{size:{x:this.getWidth(),y:this.getHeight()},scrollSize:{x:this.getScrollWidth(),y:this.getScrollHeight()},scroll:{x:this.getScrollLeft(),y:this.getScrollTop()}}},getPosition:function(){return{x:0,y:0}}});var Fx={};Fx.Base=new Class({options:{onStart:Class.empty,onComplete:Class.empty,onCancel:Class.empty,transition:function(A){return -(Math.cos(Math.PI*A)-1)/2},duration:500,unit:"px",wait:true,fps:50},initialize:function(A){this.element=this.element||null;this.setOptions(A);if(this.options.initialize){this.options.initialize.call(this)}},step:function(){var A=$time();if(A<this.time+this.options.duration){this.delta=this.options.transition((A-this.time)/this.options.duration);this.setNow();this.increase()}else{this.stop(true);this.set(this.to);this.fireEvent("onComplete",this.element,10);this.callChain()}},set:function(A){this.now=A;this.increase();return this},setNow:function(){this.now=this.compute(this.from,this.to)},compute:function(B,A){return(A-B)*this.delta+B},start:function(B,A){if(!this.options.wait){this.stop()}else{if(this.timer){return this}}this.from=B;this.to=A;this.change=this.to-this.from;this.time=$time();this.timer=this.step.periodical(Math.round(1000/this.options.fps),this);this.fireEvent("onStart",this.element);return this},stop:function(A){if(!this.timer){return this}this.timer=$clear(this.timer);if(!A){this.fireEvent("onCancel",this.element)}return this},custom:function(B,A){return this.start(B,A)},clearTimer:function(A){return this.stop(A)}});Fx.Base.implement(new Chain,new Events,new Options);Fx.CSS={select:function(B,C){if(B.test(/color/i)){return this.Color}var A=$type(C);if((A=="array")||(A=="string"&&C.contains(" "))){return this.Multi}return this.Single},parse:function(C,D,A){if(!A.push){A=[A]}var F=A[0],E=A[1];if(!$chk(E)){E=F;F=C.getStyle(D)}var B=this.select(D,E);return{from:B.parse(F),to:B.parse(E),css:B}}};Fx.CSS.Single={parse:function(A){return parseFloat(A)},getNow:function(C,B,A){return A.compute(C,B)},getValue:function(C,A,B){if(A=="px"&&B!="opacity"){C=Math.round(C)}return C+A}};Fx.CSS.Multi={parse:function(A){return A.push?A:A.split(" ").map(function(B){return parseFloat(B)})},getNow:function(E,D,C){var A=[];for(var B=0;B<E.length;B++){A[B]=C.compute(E[B],D[B])}return A},getValue:function(C,A,B){if(A=="px"&&B!="opacity"){C=C.map(Math.round)}return C.join(A+" ")+A}};Fx.CSS.Color={parse:function(A){return A.push?A:A.hexToRgb(true)},getNow:function(E,D,C){var A=[];for(var B=0;B<E.length;B++){A[B]=Math.round(C.compute(E[B],D[B]))}return A},getValue:function(A){return"rgb("+A.join(",")+")"}};Fx.Style=Fx.Base.extend({initialize:function(B,C,A){this.element=$(B);this.property=C;this.parent(A)},hide:function(){return this.set(0)},setNow:function(){this.now=this.css.getNow(this.from,this.to,this)},set:function(A){this.css=Fx.CSS.select(this.property,A);return this.parent(this.css.parse(A))},start:function(C,B){if(this.timer&&this.options.wait){return this}var A=Fx.CSS.parse(this.element,this.property,[C,B]);this.css=A.css;return this.parent(A.from,A.to)},increase:function(){this.element.setStyle(this.property,this.css.getValue(this.now,this.options.unit,this.property))}});Element.extend({effect:function(B,A){return new Fx.Style(this,B,A)}});Fx.Styles=Fx.Base.extend({initialize:function(B,A){this.element=$(B);this.parent(A)},setNow:function(){for(var A in this.from){this.now[A]=this.css[A].getNow(this.from[A],this.to[A],this)}},set:function(C){var A={};this.css={};for(var B in C){this.css[B]=Fx.CSS.select(B,C[B]);A[B]=this.css[B].parse(C[B])}return this.parent(A)},start:function(C){if(this.timer&&this.options.wait){return this}this.now={};this.css={};var E={},D={};for(var B in C){var A=Fx.CSS.parse(this.element,B,C[B]);E[B]=A.from;D[B]=A.to;this.css[B]=A.css}return this.parent(E,D)},increase:function(){for(var A in this.now){this.element.setStyle(A,this.css[A].getValue(this.now[A],this.options.unit,A))}}});Element.extend({effects:function(A){return new Fx.Styles(this,A)}});

/*
	Slimbox v1.58 - The ultimate lightweight Lightbox clone
	(c) 2007-2009 Christophe Beyls <http://www.digitalia.be>
	MIT-style license.
*/
var Slimbox=(function(){var G=window,v,h,H=-1,q,x,F,w,z,N,t,l=r.bindWithEvent(),f=window.opera&&(navigator.appVersion>="9.3"),p=document.documentElement,o={},u=new Image(),L=new Image(),J,b,i,K,e,I,c,B,M,y,j,d,D;G.addEvent("domready",function(){$(document.body).adopt($$(J=new Element("div",{id:"lbOverlay"}),b=new Element("div",{id:"lbCenter"}),I=new Element("div",{id:"lbBottomContainer"})).setStyle("display","none"));i=new Element("div",{id:"lbImage"}).injectInside(b).adopt(K=new Element("a",{id:"lbPrevLink",href:"#"}),e=new Element("a",{id:"lbNextLink",href:"#"}));K.onclick=C;e.onclick=g;var O;c=new Element("div",{id:"lbBottom"}).injectInside(I).adopt(O=new Element("a",{id:"lbCloseLink",href:"#"}),B=new Element("div",{id:"lbCaption"}),M=new Element("div",{id:"lbNumber"}),new Element("div",{styles:{clear:"both"}}));O.onclick=J.onclick=E});function A(){var P=G.getScrollLeft(),O=f?p.clientWidth:G.getWidth();$$(b,I).setStyle("left",P+(O/2));if(w){J.setStyles({left:P,top:G.getScrollTop(),width:O,height:G.getHeight()})}}function n(O){["object",G.ie6?"select":"embed"].forEach(function(Q){$each(document.getElementsByTagName(Q),function(R){if(O){R._slimbox=R.style.visibility}R.style.visibility=O?"hidden":R._slimbox})});J.style.display=O?"":"none";var P=O?"addEvent":"removeEvent";G[P]("scroll",A)[P]("resize",A);document[P]("keydown",l)}function r(P){var O=P.code;if(v.closeKeys.contains(O)){E()}else{if(v.nextKeys.contains(O)){g()}else{if(v.previousKeys.contains(O)){C()}}}P.stop()}function C(){return a(x)}function g(){return a(F)}function a(O){if(O>=0){H=O;q=h[O][0];x=(H||(v.loop?h.length:0))-1;F=((H+1)%h.length)||(v.loop?0:-1);s();b.className="lbLoading";o=new Image();o.onload=m;o.src=q}return false}function m(){b.className="";d.set(0);i.setStyles({width:o.width,backgroundImage:"url("+q+")",display:""});$$(i,K,e).setStyle("height",o.height);B.setHTML(h[H][1]||"");M.setHTML((((h.length>1)&&v.counterText)||"").replace(/{x}/,H+1).replace(/{y}/,h.length));if(x>=0){u.src=h[x][0]}if(F>=0){L.src=h[F][0]}N=i.offsetWidth;t=i.offsetHeight;var O=Math.max(0,z-(t/2));if(b.offsetHeight!=t){j.chain(j.start.pass({height:t,top:O},j))}if(b.offsetWidth!=N){j.chain(j.start.pass({width:N,marginLeft:-N/2},j))}j.chain(function(){I.setStyles({width:N,top:O+t,marginLeft:-N/2,visibility:"hidden",display:""});d.start(1)});j.callChain()}function k(){if(x>=0){K.style.display=""}if(F>=0){e.style.display=""}D.set(-c.offsetHeight).start(0);I.style.visibility=""}function s(){o.onload=Class.empty;o.src=u.src=L.src=q;j.clearChain();j.stop();d.stop();D.stop();$$(K,e,i,I).setStyle("display","none")}function E(){if(H>=0){s();H=x=F=-1;b.style.display="none";y.stop().chain(n).start(0)}return false}Element.extend({slimbox:function(O,P){$$(this).slimbox(O,P);return this}});Elements.extend({slimbox:function(O,R,Q){R=R||function(S){return[S.href,S.title]};Q=Q||function(){return true};var P=this;P.forEach(function(S){S.removeEvents("click").addEvent("click",function(T){var U=P.filter(Q,this);Slimbox.open(U.map(R),U.indexOf(this),O);T.stop()}.bindWithEvent(S))});return P}});return{open:function(Q,P,O){v=$extend({loop:false,overlayOpacity:0.8,overlayFadeDuration:400,resizeDuration:400,resizeTransition:false,initialWidth:250,initialHeight:250,imageFadeDuration:400,captionAnimationDuration:400,counterText:"Image {x} of {y}",closeKeys:[27,88,67],previousKeys:[37,80],nextKeys:[39,78]},O||{});y=J.effect("opacity",{duration:v.overlayFadeDuration});j=b.effects($extend({duration:v.resizeDuration},v.resizeTransition?{transition:v.resizeTransition}:{}));d=i.effect("opacity",{duration:v.imageFadeDuration,onComplete:k});D=c.effect("margin-top",{duration:v.captionAnimationDuration});if(typeof Q=="string"){Q=[[Q,P]];P=0}z=G.getScrollTop()+((f?p.clientHeight:G.getHeight())/2);N=v.initialWidth;t=v.initialHeight;b.setStyles({top:Math.max(0,z-(t/2)),width:N,height:t,marginLeft:-N/2,display:""});w=G.ie6||(J.currentStyle&&(J.currentStyle.position!="fixed"));if(w){J.style.position="absolute"}y.set(0).start(v.overlayOpacity);A();n(1);h=Q;v.loop=v.loop&&(h.length>1);return a(P)}}})();

// AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED)
Slimbox.scanPage = function() {
	$$($$("a").filter(function(el) {
		return el.rel && el.rel.test(/^lightbox/i);
	})).slimbox({/* Put custom options here */}, null, function(el) {
		return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
	});
};
if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
	window.addEvent("domready", Slimbox.scanPage);
}
