			_cf_loadingtexthtml="Loading..."; 
			function randOrd(){
				return (Math.round(Math.random())-0.5);
			}
				
			$(function() {
			    $('#location').cycle({
			        fx:     'fade',
			        speed:  'slow',
			        startingSlide: (Math.random()*14),
			        timeout: 0,
			        pager:  '#leftnav-locationslist',
			        pagerAnchorBuilder: function(idx, slide) {
  			          return '#leftnav-locationslist li:eq(' + (idx) + ') a';
        			}
			    });
			});
			Shadowbox.init({
				language: 'en',
				players:  ['img', 'html', 'iframe']
			});
			function ShadoboxIframe(){ 
				var argv = ShadoboxIframe.arguments;
				Shadowbox.open({
		        content:    argv[0],
		        player:     "iframe",
		        title:      argv[3],
		        height:     argv[1],
		        width:      argv[2] 
		        });
			}
			$(document).ready(function() {
				
				$(document).pngFix(); 
				$('#homesList').hide();
				$('#searchbarsearch').focus(function() {
 						 $('#homesList').fadeIn('slow');
					});
					$('#searchbarsearch').blur(function() {
						if(hovered != 1) {
							$('#homesList').fadeOut('slow');
						}
					});
					
					$("#homesList").hover(
						function () {
							hovered = 1;
						}, 
						function () {
							hovered = 0;
						}
					);

				$("img.rollover").hover(
					function()
					{
						this.src = this.src.replace("_off","_on");
					},
					function()
					{
						this.src = this.src.replace("_on","_off");
					}
				);
				$("input.rollover").hover(
					function()
					{
						this.src = this.src.replace("_off","_on");
					},
					function()
					{
						this.src = this.src.replace("_on","_off");
					}
				);
				
				imagesArray = ['/images/bg1.jpg','/images/bg2.jpg'];
				imagesArray.sort(randOrd);
				
				$(document).bgStretcher({
					images: imagesArray,
					imageWidth: 1024,
					imageHeight: 768,
					nextSlideDelay: 30000,
					slideShowSpeed: 7000
				});
			});

			$(function() {
				$(".datepicker").datepicker();
			});
/*			
			var message="I'm sorry, but right-clicking is disabled to protect our copyrighted material.";

			function clickIE4(){
				if (event.button==2){
					alert(message);
					return false;
				}
			}

			function clickNS4(e){
				if (document.layers||document.getElementById&&!document.all){
					if (e.which==2||e.which==3){
						alert(message);
						return false;
					}
				}
			}

			if (document.layers){
				document.captureEvents(Event.MOUSEDOWN);
				document.onmousedown=clickNS4;
			}
			else if (document.all&&!document.getElementById){
				document.onmousedown=clickIE4;
			}

			document.oncontextmenu=new Function("alert(message);return false");
*/
function openGoogleMap(lat,long,title){
    Shadowbox.open({
        player:     'html',
        content:    '',
        height:     600,
        width:      800,
        title: title,
        options:    {
            onFinish: function(item){
                if(GBrowserIsCompatible()){
                    var body = document.getElementById(Shadowbox.contentId());
                    var map = new GMap2(body);
					var point = new GLatLng(lat, long);
					var options = { 
						draggable: false,
						title: '' + title
					};
					map.setMapType(G_HYBRID_MAP);
					marker = new GMarker(point, options)
					map.addOverlay(marker);
                    map.setCenter(new GLatLng(lat,long), 15);
                    map.addControl(new GSmallMapControl());
                    map.addControl(new GMapTypeControl());
  					marker.openInfoWindowHtml('<h3>' + title + '</h3>');
                }
            }
        }
    });
}
