// JavaScript Document



$(document).ready(function () {
									
	var sspXML = $('#ssp').html();
	//sspXML = '';
	
	// Check to see if there is a slide show
	if (sspXML.length < 10) {
		// hide the slide show and move the details over
		
		var homeDetailsContent = $('#details-lt-box').html();
		$('#details-right').html(homeDetailsContent);
		var result = $('#details-right').html();
		$('#details-right').css({'display' : 'block' });
		$('#details-right').css({'background-color' : '#2d2a2b','border' : '1px solid #106298', 'padding' : '6px', 'width' : '360px' });
		$('#details-lt-box').css({'display' : 'none'});
		//alert(result);
		
		
		
	} else {
		$('#details-lt-box').css({'display' : 'block'});
		var sspXMLSplit = Array();
		sspXMLSplit = sspXML.split("=");
		$('#gallery-tag').attr('href',"gallery.php?s="+sspXMLSplit[1]+"&listing="+location.pathname);
		
		var flashvars = {
	 xmlfile: sspXML,
	 xmlfiletype: "Director",
	//paramXMLPath: "param.xml",
	 initialURL: escape(document.location)
	}
	
	var params = { 
	 base: ".",
	 bgcolor: "#303030",
	 allowfullscreen: "true"
	
	}                
	
	var attributes = {}
	
	swfobject.embedSWF("http://www.beversrealestate.com/ssp_flash/slideshow-550.swf", "flashcontent", "550", "392", "9.0.0", false, flashvars, params, attributes);
	}
	
	
})


