// Thistle Consolidated JS

// used in Component 18
function SubmitForm() {
	var key_words=document.search_form.searchterm.value;
	key_words=key_words.replace(/ /g, " +");
	document.search_form.action= "/search_results.html?keywords=" + key_words;
	document.search_form.submit();
}

// used in Component 112
function initializeWeather(){
for(var count=2;count<=6;count++){
	var countstr = String(count);

	//document.getElementById("high"+countstr).replace(/<sup>o</sup>C/, "");
	//document.getElementById("high"+countstr).replace(/<sup>o</sup>F/, "");

	tempTemperature = document.getElementById("high" + countstr).innerHTML;
  
	highCelsiusValue.push(tempTemperature);

	highFahrenheitValue.push(Math.round((212-32)/100 * tempTemperature + 32));
	tempTemperature = document.getElementById("low" + countstr).innerHTML;
	lowCelsiusValue.push(tempTemperature);
	lowFahrenheitValue.push(Math.round((212-32)/100 * tempTemperature + 32));
}

}

function toggleWeather(toggleText) {
var od = document.getElementById('otherDays').style.display;
     if(od == 'none') {
          $('#otherDays').slideDown('normal');
          $("#seeFiveDayForecast").html(toggleText);
          height = $('#layoutRight').height();
          $('#layoutRight').height(height + 370);
     }
     else {
          $('#otherDays').slideUp('normal');
           $("#seeFiveDayForecast").html(toggleText);     
          height = $('#layoutRight').height();
          $('#layoutRight').height(height - 370);
     }
}

function fahrenheit(){

try {
	document.getElementById("temperature_matrix").innerHTML="<a href='javascript:celsius();'><sup>o</sup>C</a> or <sup>o</sup>F"
	for(var count=2;count<=6;count++){
		var countstr = String(count);

		//document.getElementById("high"+countstr).replace(/<sup>o</sup>C/, "");
		//document.getElementById("low"+countstr).replace(/<sup>o</sup>C/, "");     
                                  
		document.getElementById("high"+countstr).innerHTML = highFahrenheitValue[count-2]+"<sup>o</sup>F";
		document.getElementById("low"+countstr).innerHTML = lowFahrenheitValue[count-2]+"<sup>o</sup>F";
	}
}

catch (e) { }
 	$("#temperature_matrix a").css("visibility","visible");
}
function celsius(){

try {
	document.getElementById("temperature_matrix").innerHTML="<sup>o</sup>C or <a href='javascript:fahrenheit();'><sup>o</sup>F</a>"
	for(var count=2;count<=6;count++){
		var countstr = String(count);

		//document.getElementById("high"+countstr).replace(/<sup>o</sup>F/, "");
		//document.getElementById("low"+countstr).replace(/<sup>o</sup>F/, "");

		document.getElementById("high"+countstr).innerHTML = highCelsiusValue[count-2]+"<sup>o</sup>C";
		document.getElementById("low"+countstr).innerHTML = lowCelsiusValue[count-2]+"<sup>o</sup>C";
	}
}

catch (e) { }
 	$("#temperature_matrix a").css("visibility","visible");
}



// used in Component 110
function updateDMY() 
{
  dayPiece = document.getElementById("dayDisplay");
  dayPiece.innerHTML = clockDay + " " + month[clockMonth] + " " + clockYear;
  dateToday  = clockMonth + "/" + clockDay + "/" + clockYear;  
  dateToday2 = clockMonth + "/" + [clockDay+1] + "/" + clockYear;  

}

function updateClock()
{
	var AmPm      = "";
	var smallHour = 0;
	var strHour   = "";
	var strMinute = "";
	var strSecond = "";

	timePiece = document.getElementById("timeDisplay");	
	clockSecond++;

	if(clockSecond == 60)
	{
		clockSecond = 0;
		clockMinute++;
	}

	if(clockMinute >= 60)
	{
		clockMinute = 0;
		clockHour++;
	}
	
	if(clockHour >= 24)
	{
		clockHour = 0;
		clockDay++;
	}
	
	if(clockHour >= 12)
	{
		if(clockHour != 12)
			smallHour = clockHour - 12;
		else
			smallHour = clockHour;
			
		AmPm = PM;
	}
	else
	{
		smallHour = clockHour;
		AmPm = AM;
	}

	if(clockHour == 0)
		smallHour = 12;
	
	if(clockSecond < 10)
		strSecond = "0" + clockSecond;
	else
		strSecond = clockSecond;
	
	if(clockMinute < 10)
		strMinute = "0" + clockMinute;
	else
		strMinute = clockMinute;
	
	if(smallHour < 10)
		strHour = "0" + smallHour;
	else
		strHour = smallHour;

	timePiece.innerHTML = strHour +":"+ strMinute +" "+ AmPm;
	
	setTimeout("updateClock()", 1000);
}

function writeClock(){
$('#timeLine').html(clockCountry+' <br /> '+clockTimeLabel+': <span id="timeDisplay"></span> <span id="dayDisplay"></span>')
}

// used in Component 116

function findCity(prop){
	var city="";
		for(var i=0; i < promoMatrix.length;i++){
			if(promoMatrix[i][2]==prop){
			 city=promoMatrix[i][0];
			 break; //if found
			}// end if
		}//end for
	return city;
	}
	
	function findProperty(offer){
	var prop="";
		for(var i=0; i < promoMatrix.length;i++){
			if(promoMatrix[i][4]==offer){
			 prop=promoMatrix[i][2];
			 break; //if found
			}// end if
		}//end for
	return prop;
	}
	
	function updateDDLarrays(){
		//empty DDLs
		$(b2).empty().append(c2);
		$(b3).empty().append(c3);
				
		for (x in d2){$(b2).append('<option value="'+x+'">'+d2[x]+'</option>');}
		for (x in d3){$(b3).append('<option value="'+x+'">'+d3[x]+'</option>');}

		$(b2).css('width','190px');
		$(b3).css('width','190px');
	}
	
	function generateDDLarrays(DDLobj){
		var DDLid=$(DDLobj).attr('id');
		//empty the arrays
		d1=[];d2=[];d3=[];
		
		// ---start internal functions ---
		function updateFromb1(){
		var ddlval=$(b1).val();
			for(var i=0; i < promoMatrix.length;i++){
				if((promoMatrix[i][0]==ddlval || ddlval==0) && !d2[promoMatrix[i][2]])d2[parseInt(promoMatrix[i][2])]=promoMatrix[i][3];
				if((promoMatrix[i][0]==ddlval || ddlval==0) && !d3[promoMatrix[i][4]])d3[parseInt(promoMatrix[i][4])]=promoMatrix[i][5];
			}// end for
			updateDDLarrays();
		}// end updateFromb1
		
		function updateFromb2(){
		var ddlval=$(b2).val();
		var b3Sel=$(b3).val();
		var cityID=findCity(ddlval);
			for(var i=0; i < promoMatrix.length;i++){
				if((promoMatrix[i][0]==cityID || ddlval==0) && !d2[promoMatrix[i][2]])d2[parseInt(promoMatrix[i][2])]=promoMatrix[i][3]; 
				if((promoMatrix[i][2]==ddlval || ddlval==0) && !d3[promoMatrix[i][4]])d3[parseInt(promoMatrix[i][4])]=promoMatrix[i][5];
			}// end for
			updateDDLarrays();
			if(ddlval==0){
				$(b1+" > option").eq(0).attr('selected',true);
				$(b2+" > option").eq(0).attr('selected',true);
			}
			else {
				$(b1+" > option[value*="+cityID+"]").attr('selected',true);
				$(b2+" > option[value*="+ddlval+"]").attr('selected',true);
				$(b3+" > option[value*="+b3Sel+"]").attr('selected',true);
			}
		}// end updateFromb2
		
		function updateFromb3(){
		var b1Sel=$(b1).val();
		var b2Sel=$(b2).val();
		var ddlval=$(b3).val();
		
		var propID=findProperty(ddlval);
		var cityID=findCity(propID);
		var cntr=0;
			for(var i=0; i < promoMatrix.length;i++){
				if((promoMatrix[i][0]==b1Sel  || b1Sel ==0) && (promoMatrix[i][4]==ddlval  || ddlval==0) && !d2[promoMatrix[i][2]])d2[parseInt(promoMatrix[i][2])]=promoMatrix[i][3];
			}// end for
			
			//if(b2Sel!=0){
				for (x in d2){
					for(var i=0; i < promoMatrix.length;i++){
						if((promoMatrix[i][2]==b2Sel || b2Sel==0) && promoMatrix[i][2]==x && !d3[promoMatrix[i][4]])d3[parseInt(promoMatrix[i][4])]=promoMatrix[i][5];
					}// end for
				}
			//}
			updateDDLarrays();
			if(b2Sel==0){
				$(b3).html(a3).css('width','190px');
				$(b2+" > option").eq(0).attr('selected',true);
			}
			else {
				$(b2+" > option[value*="+b2Sel+"]").attr('selected',true);
			}
			if(ddlval!=0)$(b3+" > option[value*="+ddlval+"]").attr('selected',true);
			
		}// end updateFromb3
		
		//  --- end internal functions ---
		
		// function switcher
		if("#"+DDLid == b1) updateFromb1();
		if("#"+DDLid == b2) updateFromb2();
		if("#"+DDLid == b3) updateFromb3();
		
	} // end generateDDLarrays	

// used in Component 177
function showImage(src,clickFlag) {
	    
		var largeImage = new Image();
		
		// event handler, set of routines to run AFTER the image fully loads
		$(largeImage).bind('load',function() {
			// set the css, alt and title tags. method call uses chaining						
			$(this).hide().addClass('homegalleryPic').attr('alt',$("#galleria img").eq(c).attr("alt")).attr('title',$("#galleria img").eq(c).attr("alt"));
			
			$("#imageViewer").append(this); // append the new image to image viewer but still hidden
					
			$(this).fadeIn(FADE_SPEED, function() { //fade in the image then execute code only AFTER the fade in completes
												
				// create overlay content
				var t1=$("#galleria span.title").eq(c).text(); 			//title
				var t2=$("#galleria span.body").eq(c).text();			//body
				var t3=$("#galleria span.linkTitle").eq(c).text(); 		//linkTitle
				var t4=$("#galleria span.linkTitleMain").eq(c).text(); 	//link title main
				
				var appendHTML ='<div id="detailContainer">'; //split code for readability
				appendHTML +='<div id="headline">'+ t1 + '</div>';
				appendHTML +='<div id="para">' + t2 + '</div>';

				// check linkTitle is null then, if null then will not be included
				if(t4 != '') {
					appendHTML +='<div id="link"><a href="'+t3+'" title="'+t4+'">'+t4+'</a></div>';	
				} // end of check linkTitle
							
				appendHTML +='</div>'// end detail container

				$("#imageViewer").append(appendHTML);//add the overlay content
				

				if($("#imageViewer img").length >1){  //if old banner exists remove it and its overlay
					$("#imageViewer img:first").remove();
					$("#detailContainer:first").remove();
				}
				
				$("#detailContainer").hide();
$("#detailContainer").fadeIn(500);
				
				
				if( e-1 > c ) { // if havent reached the end of the list of images
					c++;
					timer = setTimeout('showImage($("#galleria img:eq('+ c +')"),0)',TRANSITION_SPEED);
					
				}
				else { //else loop back to first image
					c=0; 
					timer = setTimeout('showImage($("#galleria img:first"),0)', TRANSITION_SPEED); 
					
				}
				
			}); // end fade in call back routines	           
		}); // end load bind
		
		// show image run time
		var c = $("#galleria img").index(src);
		$(largeImage).attr("src", src.attr("src"));

} // end showImage

// used in Component 221
function toggleMap() {
          $("#listHotelView").html('<a href="javascript:toggleList();">List view</a>');
          $("#listHotelView").removeClass('listMapActive');
          $("#listMapView").addClass('listMapActive');
          $("#content-container").slideToggle("normal");
}

function toggleList() {
          $("#listMapView").html('<a href="javascript:toggleMap();">Map View</a>');
          $("#listHotelView").addClass('listMapActive');
          $("#listMapView").removeClass('listMapActive');
          $("#content-container").slideToggle("normal");
}

// used in Component 280

function mycarousel_initCallback(carousel) {
    $("#content-container .chooseRoomLeft ul li img").removeClass('hidden');
}

// used in Component 283
function detailExpand(imgObj){
	var imgParent = imgObj.parentNode;
	var hotelWrapper = imgObj.parentNode.parentNode.parentNode;
	//change button
	$(imgObj).remove();
	$(imgParent).prepend(MINUS);
	
	expandHotelDetail(hotelWrapper);

}//end detailExpand

function detailCollapse(imgObj){
	var imgParent = imgObj.parentNode;
	var hotelWrapper = imgObj.parentNode.parentNode.parentNode;
	//change button
	$(imgObj).remove();
	$(imgParent).prepend(PLUS);
	
	collapseHotelDetail(hotelWrapper);
}//end detailCollapse

function collapseHotelDetail(hotelObj){
	$(hotelObj).find('.hotelDetailsImg').css('width','175px');
	
	$(hotelObj).find('.venuesGreyBoxAddress address').css('width','200px');
	$(hotelObj).find('.venuesGreyBoxAddress p').css('width','200px');
	$(hotelObj).find('.venuesGreyBoxSpaces p').css('width','215px');	
		
	/* Enable when carousel kicks in */
	$(hotelObj).find('.hotelDetailsImg li > img.big').eq(0).addClass('hidden');
    $(hotelObj).find('.hotelDetailsImg li > img.small').eq(0).removeClass('hidden');
	/* end */
	
	$(hotelObj).find('.facilityList').toggleClass('hidden');
	$(hotelObj).find('.hotelDetailContact').toggleClass('hidden');
	$(hotelObj).find('.hotelDetailInfo p.topBottomPadding').toggleClass('hidden');
}//end collapseHotelDetail

function expandHotelDetail(hotelObj){
	$(hotelObj).find('.hotelDetailsImg').css('width','275px');
	
	$(hotelObj).find('.venuesGreyBoxAddress address').css('width','350px');
	$(hotelObj).find('.venuesGreyBoxAddress p').css('width','350px');
	$(hotelObj).find('.venuesGreyBoxSpaces p').css('width','350px');
		
	/* Enable when carousel kicks in */
	$(hotelObj).find('.hotelDetailsImg li > img.small').eq(0).addClass('hidden');
    $(hotelObj).find('.hotelDetailsImg li > img.big').eq(0).removeClass('hidden');
	/**/
	
	$(hotelObj).find('.facilityList').toggleClass('hidden');
	$(hotelObj).find('.hotelDetailContact').toggleClass('hidden');
	$(hotelObj).find('.hotelDetailInfo p.topBottomPadding').toggleClass('hidden');
	
}//end expandHotelDetail


function mycarousel_initCallback2(carousel) {
		$('#pageContainer #'+sliderBuffer+' .hotelDetailsImg .mycarousel-next').bind('click', function() {
			carousel.next();
			return false;
		});
	
		$('#pageContainer #'+sliderBuffer+' .hotelDetailsImg .mycarousel-prev').bind('click', function() {
			carousel.prev();
			return false;
		});

	};
	
	
function injectCarousel(){

		$("#pageContainer .hotelDetailsBox").each(function(){
			sliderBuffer = $(this).attr('id');
                                                                $(this).find('.imageSlide').after(controlHTML);
                                           $(this).find('.imageSlide').eq(0).jcarousel({
			scroll: 1,
			initCallback: mycarousel_initCallback2,
			buttonNextHTML: null,
			buttonPrevHTML: null
			});
		});	
	}


// used in Component 284
function filterRooms(){
var r = "";
$('#roomFilters input').each(function(){if($(this).attr('checked')==true) r=$(this).attr('value');});
if(r=='all') r='chooseRoomBox';
//show all rooms
$('.chooseRoomBox').css('display','none'); 
$('.'+r).css('display','block');

  if($('#accessibleRoomFilter').attr('checked') == true) {
    $('.chooseRoomBox:not([class*=acc])').each(function(){
    if($(this).css('display')=='block') $(this).css('display','none'); 
    });
  }


  $('#chooseRoomTop p:last').html('There are '+$('.chooseRoomBox:visible').length+' Room options available in your choice of hotel');
  
}//end filterRooms


// used in Component 178
function showImageSub(src,clickFlag) { //start showImageSub
		var largeImage = new Image();
		
		
		$(largeImage).load(function() { //load bind
			$(this).hide().addClass('homegalleryPic');
			//$(this).hide().attr('alt',$("#galleria img").eq(c).attr("alt"));
			//$(this).hide().attr('title',$("#galleria img").eq(c).attr("alt"));
					
				$("#imageViewer").append(this); //append new image
				
				if(eType == '0') { // IF FADE EFFECT
					$(this).fadeIn(FADE_SPEED, function() { //fade in 
					
					$("#imageViewer img").attr('alt',$("#galleria img").eq(c).attr("alt"));
					$("#imageViewer img").attr('title',$("#galleria img").eq(c).attr("alt"));
					
							if($("#imageViewer img").length >1){
								$("#imageViewer img:first").remove();
							}

							if( e_carousel-1 > c ) { 
								$("#ulfullscreen li").find("a").attr("href",$("#galleria img").eq(c).attr("src"));
								c++;
								timer = setTimeout('showImageSub($("#galleria img:eq('+ c +')"),0)',TRANSITION_SPEED);
							}
							else { 
								c=0; 
								$("#ulfullscreen li").find("a").attr("href",$("#galleria img").eq(c).attr("src"));
								timer = setTimeout('showImageSub($("#galleria img:first"),0)', TRANSITION_SPEED); 
							}
					}); //end fade in   
				}	// end IF FADE EFFECT 
				
          		else if(eType=='1') { // IF SLIDE EFFECT 
					$(this).css("left","-754px");
					$(this).css('opacity','0.15');
					$(this).animate({ 'width':754, 'left': 0, 'opacity':0.99 }, 'normal', function() {
																								   
							if($("#imageViewer img").length >1){
								$("#imageViewer img:first").remove();
							}

							if( e_carousel-1 > c ) { 
								$("#ulfullscreen li").find("a").attr("href",$("#galleria img").eq(c).attr("src"));
								c++;
								timer = setTimeout('showImageSub($("#galleria img:eq('+ c +')"),0)',TRANSITION_SPEED);
							}
							else { 
								c=0; 
								$("#ulfullscreen li").find("a").attr("href",$("#galleria img").eq(c).attr("src"));
								timer = setTimeout('showImageSub($("#galleria img:first"),0)', TRANSITION_SPEED); 
							}
					});
				} // END IF SLIDE EFFECT 
				
		}); //end load bind   
		
		$(largeImage).attr("src", src.parent().attr("href")); //gets the link attribute of the parent of the thumbnail
		src.parent().parent().parent().find("img").each(function(){$(this).css({"border":"0px", "width":"48px", "height":"48px"});});
		src.css({"border":"1px white solid","width":"47px", "height":"47px"});
		$("#viewFullPic").unbind('click').click(function(){src.trigger('dblclick'); });
		var c = $("#galleria img").index(src);
		
	} //end 
	
	function parseURLParam()
	{
		var temp=location.href;
		if(temp.indexOf("?")>0){
			temp=temp.substr(temp.indexOf("?")+1,temp.length);
		var parArrayTemp=temp.split('&');
		var parArray=new Array();
			for(var i=0; i<parArrayTemp.length;i++){
			parArray.push(parArrayTemp[i].split('='));
			}
			return parArray;
		}
		else return "";
	
	}//end parseURLParam


/* SCRIPTS GUOMAN THISTLE PHASE 2 */
var collapse 	= "-40px -71px";
var expand 		= "-40px -37px";
var genCollapse = "0px -3px";
var genExpand 	= "0px 63px";
var headIsOpen 	= true;
var detailOpen 	= "";
var toToggle;
		
$(function() {

	$("#guestFullInfo").show(); //h3 See Full Guest Profile	- JS OFF is hidden   
	$("#profileFormContainer").hide(); //Profile of Member JS ON hidden
	
	/* Member Guest Details - ExpandCollapse Detail Information */
	$("#guestFullInfo").click(function() {
		var profileFormContainer = $(this).next("div").css("display");
		try {
			if(profileFormContainer != "block")
				$(this).next("div").slideDown("fast");
			else 
				$(this).next("div").slideUp("fast");	
		}
		catch(e){ }
		
	});
	/* end  Member Guest Details - ExpandCollapse Detail Information */
	
	/* start HBS Tabs Room-Selection */
	$(".tab").click(function() {
		try {
			$(this).parent().find("li").each(function() { $(this).removeClass("current"); });
			$(this).addClass("current");	
		}	
		catch(e){}
	});	
	/* end HBS Tabs Room-Selection */
	
	/* Tab Content collapse/expand */
	$("h5.exp-col").click(function() {
		var centerHeight = $("#layoutCenter").height();
		try {
			$(".scroll-container").height(centerHeight - 260);	
			if($(this).attr("id") == "optional-extras") {
				detailOpen = $(this).next().next("div").css("display");
				toToggle =  $(this).next().next("div");
			}
			else {
				detailOpen = $(this).next("div").css("display");
				toToggle =  $(this).next("div");
			}
			
			if(detailOpen != "block") {
				$(toToggle).slideDown("normal");
				$(this).css("background-position","8px 0px");
			}
			else {
				$(toToggle).slideUp("normal");
				$(this).css("background-position","8px 26px");
			}	
		}
		catch(e){  }
	});	
	/* end Tab Content collapse/expand */
	
		/* Panel Generic Collapse/Expand */
	$(".sidepanel-title").click(function() {
		try {	
			if(headIsOpen) {
				headIsOpen = false;
				$(this).next().slideUp("normal");
				$(this).css("background-position",genCollapse);
			}
			else {
				headIsOpen = true;
				$(this).next().slideDown("normal");
				$(this).css("background-position",genExpand);		
			}
		}
		catch(e) {}
	});
	/* end Panel Generic Collapse/Expand */
	
	/* Compare Hotels Collapse/Expand */
	$(".detialHead").click(function() {
		try {							
			if(headIsOpen) {
				headIsOpen = false;
				$(this).next().slideUp("normal");
				$(this).css("background-position",collapse);
			}
			else {
				headIsOpen = true;
				$(this).next().slideDown("normal");
				$(this).css("background-position",expand);		
			}
		}
		catch(e) {}
	});
	/* end Compare Hotels Collapse/Expand */
	
	/* SidePanel Collapse/Expand */
	$(".sidepanel h2").click(function() {
		try {							
			if(headIsOpen) {
				headIsOpen = false;
				$(this).next().slideUp("normal");
				$(this).css("background-position","0px 0px");
			}
			else {
				headIsOpen = true;
				$(this).next().slideDown("normal");
				$(this).css("background-position","0px -33px");		
			}
		}
		catch(e) {}								  
	});
	/* end SidePanel Collapse/Expand */
	
	
	/* popWindow for Add New Contact - Add Manager, Delete-Edit Guest Information */
	$(".popLink").popupWindow({ centerScreen:1, width:760, height:385, scrollbars:1, location:0 });
	/*$(".guestTableList #resultTable .popLink").popupWindow({ centerScreen:1, width:760, height:385, scrollbars:1, location:0 });*/
	$("#contentCenter a.buttonLink").popupWindow({ centerScreen:1, width:760, height:385, scrollbars:1, location:0 });
	$(".popRoomInc").popupWindow({ centerScreen:1, width:530, height:250, scrollbars:1, location:0 });
	/* end popWindow for Add New Contact - Add Manager, Delete-Edit Guest Information */
	
	// Init jQuery dataTable for MyGuest List
	try {
		$(".bookingsTable").dataTable({ 
			"sPaginationType"	: "full_numbers", 
			"bSort" 			: false, 
			"bFilter" 			: false, 
			"bLengthChange" 	: false, 
			"bInfo"				: false, 
			"bAutoWidth" 		: false, 
			"iDisplayLength" 	: 5
		});
		
		$("#memberMyStayHistory .dataTable").dataTable({ 
			"sPaginationType"	: "full_numbers", 
			"bSort" 			: false, 
			"bFilter" 			: false, 
			"bLengthChange" 	: false, 
			"bInfo"				: false, 
			"bAutoWidth" 		: false, 
			"iDisplayLength" 	: 5
		});

		$("#myGuestListTable .dataTable").dataTable({ 
			"sPaginationType"	: "full_numbers", 
			"bSort" 			: false, 
			"bFilter" 			: false, 
			"bLengthChange" 	: false, 
			"bInfo"				: false, 
			"bAutoWidth" 		: false, 
			"iDisplayLength" 	: 5,
			"oLanguage": {
                "sZeroRecords"	: zGuests
            }
		});
		
		$("#myManagerListContainer .dataTable").dataTable({ 
			"sPaginationType"	: "full_numbers", 
			"bSort" 			: false, 
			"bFilter" 			: false, 
			"bLengthChange" 	: false, 
			"bInfo"				: false, 
			"bAutoWidth" 		: false, 
			"iDisplayLength" 	: 5,
			"oLanguage": {
                "sZeroRecords"	: zManagers
            }
		});

		//set position of myGuestList Pagination  and myManagerList Pagination
		$(".paging_full_numbers").eq(0).insertAfter("#myGuestListTable .legendContainer");
		$(".paging_full_numbers").eq(1).insertAfter("#myManagerListContainer .guestTableList");
		$(".guestTableList").css("height","170px");//set height of dataTable Container
		// end Init jQuery dataTable for MyGuest List
	}
	catch(e){ }
	
	$(".corpBooker").css("margin-top","-30px");
	$("#AccessibleForm").css("margin-right","135px");
	
	//Choose your room JS ON
	if($.browser.msie) {
		if($.browser.version=="6.0") {
			$("#roomDetails3").css({ margin : "-92px 7px 0px 0px", padding : "11px 11px", width : "auto" });
		} 
		else if($.browser.version=="7.0") {
			$("#roomDetails3").css({ margin : "-52px 7px 0px 0px", padding : "11px 11px", width : "auto" });
		}
		else {
			$("#roomDetails3").css({ margin : "-46px 7px 0px 0px", padding : "11px 11px", width : "auto" });	
		}
	}
	else {
		$("#roomDetails1").css({ top : "-122px" });
		$("#roomDetails2").css({ top : "-122px" });
		$("#roomDetails3").css({ margin : "-40px 7px 0px 0px", padding : "6px 6px", width : "auto" });
	}
	
	
	/***
	Hover Room Tabs
	********************/
	$("#tab-list").find("li").each(function() {
		$(this).mouseover(function() {
			$(this).css({
				opacity	: ".60",
				filter	: "alpha(opacity=60)"
			});					   
		});	
		$(this).mouseout(function() {
			$(this).css({
				opacity: "100",
				filter	: "alpha(opacity=100)"
			});							   
		});	
	});
	
});