<!--//--><![CDATA[//><!--
 
sfHover = function() {
	var sfEls = document.getElementById("menu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
 
//--><!]]>

<!--//--><![CDATA[//><!--
 /*
sfHover2 = function() {
	var sfEls = document.getElementById("client_menu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover2);
 */
//--><!]]>

function message_close() {
	document.getElementById("message_bubble").className = "message_none";
}

function showhide(id){ 
	if (document.getElementById){ 
		obj = document.getElementById(id); 
		if (obj.style.display == "none"){ 
			obj.style.display = ""; 
		} else { 
			obj.style.display = "none"; 
		}
	} 
}

function contentWide(showMe,hideMe,d) {
	var showMeDiv = document.getElementById(showMe);
	var hideMeDiv = document.getElementById(hideMe);
	showMeDiv.style.display = "block";
	hideMeDiv.style.display = "none";
	window.location = "http://" +d;
	}

function doNothing(){}

function linkout(url) {
	newwindow=window.open(url,'name');
	if (window.focus) {newwindow.focus()}
	return false;
}



$(function() {
	/*
	$('.gallery-pic a').lightBox({
		
		imageLoading: '/webcore-js/lightbox/images/loading.gif',
		imageBtnClose: '/webcore-js/lightbox/images/close.gif',
		imageBtnPrev: '/webcore-js/lightbox/images/prev.gif',
		imageBtnNext: '/webcore-js/lightbox/images/next.gif'

	});
	*/
	$('.load-modal').fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'overlayOpacity'	: '0.8',
		'overlayColor'	: '#000'
	});
	
	$('.load-form-listing').fancybox({
		'width'				: 640,
		'height'			:  480,
		'scrolling'		: 'no',
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'overlayOpacity'	: '0.8',
		'overlayColor'	: '#000',
		'type'				: 'iframe'
	});

	$('.load-virtualtour-listing').fancybox({
		'width'				: '75%',
		'height'			:  '90%',
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'overlayOpacity'	: '0.8',
		'overlayColor'	: '#000',
		'type'				: 'iframe'
	});
	
	$("div a[rel=listing-gallery-pic]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
		'overlayOpacity'	: '0.8',
		'overlayColor'	: '#000',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
	
});

