jQuery.noConflict();

function addDropShadow(){
	jQuery('#request').dropShadow();
	jQuery('#request').css('z-index','100000');
	jQuery('#request div.container').css('z-index','100000')
}
function initScrollers(){
	jQuery('.scrollpane').jScrollPane();
	jQuery('a[@href^="http://"]').addClass('external').attr('target', '_blank');	
	/*jQuery("div.top-fringe div.container a").click(function () {
		if (jQuery("#request").css("display") == 'none') {
			jQuery("#request").slideDown("slow");
			jQuery("div.top-fringe div.container a").html("Close");
			setTimeout("addDropShadow()", 550);
		} else {
			jQuery("#request").slideUp("slow").removeShadow();
			jQuery("div.top-fringe div.container a").html("Request Private Showing");
		}
		return false;
	});*/
}

function initSWF(){
	var flashvars = {
	};
	var params = {
		wmode:"transparent"
	};
	var attributes = {
	};
	
    swfobject.embedSWF("/assets/flash/home.swf", "home-swf", "850", "360", "9.0.0", "", flashvars, params, attributes);
    //swfobject.embedSWF("/assets/flash/pv_landing.swf", "panoramic-view-splash", "850", "360", "9.0.0", "", flashvars, params, attributes);
    //swfobject.embedSWF("/assets/flash/sc_landing.swf", "sea-crest-splash", "850", "360", "9.0.0", "", flashvars, params, attributes);
	//swfobject.embedSWF("/assets/flash/properties.swf", "properties-swf", "544", "270", "9.0.0", "", flashvars, params, attributes);
	swfobject.embedSWF("/assets/flash/pan_solo.swf", "panoramic-view-video", "544", "270", "9.0.0", "", flashvars, params, attributes);
	//swfobject.embedSWF("/assets/flash/pv_residences.swf", "panoramic-view-residences", "600", "300", "9.0.0", "", flashvars, params, attributes);
	//swfobject.embedSWF("/assets/flash/pv_resort.swf", "panoramic-view-resort", "600", "300", "9.0.0", "", flashvars, params, attributes);
	//swfobject.embedSWF("/assets/flash/bay_slide.swf", "baypointe-yacht-club", "600", "300", "9.0.0", "", flashvars, params, attributes);
	//swfobject.embedSWF("/assets/flash/sc_residences.swf", "sea-crest-residences", "600", "300", "9.0.0", "", flashvars, params, attributes);
	//swfobject.embedSWF("/assets/flash/sc_resort.swf", "sea-crest-resort", "600", "300", "9.0.0", "", flashvars, params, attributes);
	swfobject.embedSWF("/assets/floorplans/baypointe_floorplans/baypointe.swf", "baypointe-floorplan-swf", "625", "550", "9.0.0", "", flashvars, params, attributes);
	swfobject.embedSWF("/assets/floorplans/panoramic_floorplans/panoramic.swf", "panoramic-floorplan-swf", "1052", "550", "9.0.0", "", flashvars, params, attributes);

}
jQuery(document).ready( function() {

	DD_roundies.addRule('.rounded', '10px', true);
	jQuery('div.image-display').dropShadow({
		left:0,
		top:0,
		blur:6
	});
	DD_roundies.addRule('.dropShadow', '10px', true);
	jQuery('div.image-display').cycle();
	jQuery('div.main-image').cycle();
	
	setTimeout("initSWF()", 500);
		
	setTimeout("initScrollers()", 600);
	
	jQuery('.lightwindow').click(function(){
		 jQuery("#slideshow img").attr('src', jQuery(this).attr('href') );
		 jQuery(".gallery-description h2").html( jQuery(this).attr('title') );	
		 jQuery(".gallery-description .caption").html( jQuery(this).attr('caption') );
		 return false;
	 }).blur(); 
	
	jQuery('.gmap').each(function(){
		jQuery(this).css('width',  500);
		jQuery(this).css('height', 300);
		var ll   = jQuery(this).children('#ll').text().split(",");
		var sll  = jQuery(this).children('#sll').text().split(",");
		var sspn = jQuery(this).children('#sspn').text().split(",");
		var spn  = jQuery(this).children('#spn').text().split(",");
		var z = jQuery(this).children('#z').text();
        jQuery(this).jmap('init', {mapCenter:ll, mapZoom: 14}, function(el,options){
			jQuery(el).jmap('addMarker', {pointLatLng:ll});
		});
	});
	
	Cufon.replace('.incognito-meridies', {
		fontFamily:"IncognitoMeridies"
	});
	Cufon.replace('.incognito-occidens', {
		fontFamily:"IncognitoOccidens"
	});
});