$(document).ready(function(){
$('a[rel*=facebox]').facebox() 

$("#searchBoxes").hide();

	$("#showSearch").click(function() {
		$("#searchBoxes").animate({
			  height: "500px",
			  duration: "slow"
		}); 
	});

	$("#searchClose").click(function () {
		$("#searchBoxes").hide();
	}); 

});
	
//Agents
	agents = [
	"Cory, Louise or Brian",
	"Cory, Louise, Brian or Teresa",
	"Louise, Brian, Teresa or Lila",
	"Brian, Teresa or Lila",
	"Teresa, Lila or Cory",
	"Lila, Cory or Louise",
	];


function getRandomText() {                               
	var rand = Math.round(Math.random()*(agents.length-1)); 
	document.write(agents[rand]);                                     
}


//popups
function openWin1(url, name) {
popupWin = window.open(url, name, "width=600,height=570,left=0,right=0,toolbar=no,scrollbars=yes,location=0,resizable=no");
}
function openWin2(url, name) {
popupWin = window.open(url, name, "width=785,height=700,left=50,right=50,toolbar=no,scrollbars=yes,location=yes,resizable=yes");
}

function launchViewer()
	{

	var w = screen.width;
	var winwidth;
	var winurl;

	if (w >= 1000)
		{
			winwidth=880
			winurl = 'http://delivery.vrxstudios.com/destinations/vrxfullviewer.asp?ident=3510-383';
		}
	else
		{
			winwidth=546
			winurl = 'http://delivery.vrxstudios.com/destinations/vrxmap.asp?ident=3510-383';
		}


	var win = window.open(winurl,'vrxmap','width=' + winwidth + ',height=610,top=5,left=5,scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no');
	win.focus();
	}
  

