function popChatLive() {
	url = 'http://sightmax.fullsail.com/SightMaxAgentInterface/PreChatSurvey.aspx?accountID=1&siteID=1&queueID=2';
	var NewWindow = window.open(url, 'chatWindow','width=490,height=490,resizable=0,scrollbars=no,menubar=no,status=no');				
}



$(document).ready(function() {
//---hoverIntent------<http://cherne.net/brian/resources/jquery.hoverIntent.html>------------------------------//
(	function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);



//---navDropDown-----------------------------------------------------------------------------------------------//
	function addNavDropDown(){
		$(this).addClass("hovering");
		$(this).find("div.dropdown")
			.animate({"height": "toggle"}, {duration: 200}, "swing");
	}
	
	function removeNavDropDown(){
		$(this).removeClass("hovering");
		$(this).find("div.dropdown")
			.animate({"height": "toggle"}, {duration: 200}, "swing");
	}
	
	var navDropDownConfig = {
		interval: 25,
		sensitivity: 1,
		over: addNavDropDown,
		timeout: 0,
		out: removeNavDropDown
	};
	$(".navDropDown").hoverIntent(navDropDownConfig)
	
	
	
//---rifPanel--------------------------------------------------------------------------------------------------//	
	jQuery.timer = function(time,func,callback){
		var a = {timer:setTimeout(func,time),callback:null}
		if(typeof(callback) == 'function'){a.callback = callback;}
		return a;
	};
	
	jQuery.clearTimer = function(a){
		clearTimeout(a.timer);
		if(typeof(a.callback) == 'function'){a.callback();};
		return this;
	};
	var myTimer = {};
	
	var headerHeight = 61;
	var rifDropTime = 600;
	var rifdsDropAnimateTime = (rifDropTime/6);
	var rifHideTime = 600;
	var rifdsHideAnimateTime = (rifHideTime/6);
	
	/* Expand Panel
	$("#requestInfoLink > a").toggle(
		function() {
			var rifHeight = $("div#requestInfoFormPanel").height();
			var rifdsHeight = $("div#rifDropShadow").height();
			var rifdsDropTime = ((rifdsHeight*rifDropTime)/rifHeight);
			$("div#requestInfoFormPanel").stop();
			$("div#rifDropShadow").stop();
			$("div#requestInfoFormPanel").css({
				'display': 'block',
				'top': -rifHeight+headerHeight
			}).animate({
				top:"61"
			}, rifDropTime, "sineEaseOut");

			myTimer = $.timer(rifdsDropTime,function(){
				$("div#rifDropShadow").css({
					'display': 'block',
					'top': -rifdsHeight+headerHeight
				}).animate({
					top:"61"
				}, rifdsDropAnimateTime, "sineEaseOut");
			});
		},
		// Collapse Panel
		function() {
			var rifHeight = $("div#requestInfoFormPanel").height();
			var rifdsHeight = $("div#rifDropShadow").height();
			var rifdsHideTime = ((rifHideTime-((rifdsHeight*rifHideTime)/rifHeight))-rifdsHideAnimateTime);
			$("div#requestInfoFormPanel").stop();
			$("div#rifDropShadow").stop();
			var rifHeight = $("div#requestInfoFormPanel").height();
			$("div#requestInfoFormPanel").animate({
				top:-rifHeight+headerHeight
			}, rifHideTime, "sineEaseIn");
			
			myTimer = $.timer(rifdsHideTime,function(){
				$("div#rifDropShadow").animate({
					top:-rifdsHeight+headerHeight
				}, rifdsHideAnimateTime, "sineEaseIn");
			});
		}
	);	
	
	// Trigger Collapse Panel
	//$("#rifCloseButton").click(function(){
	//	$("#requestInfoLink > a").trigger('click');	
	//});*/
	
	//---searchBox--------------------------------------------------------------------------------------------------//
	$("#searchField").focus(function(){
		if ($(this).val() == "SEARCH") {
			$(this).val("");	
		}
	});
	
	$("#searchField").blur(function(){
		if ($(this).val() == "") {
			$(this).val("SEARCH");	
		}
	});
});