jQuery.fn.slideshow = function(options) {
		var o = jQuery.extend({
			swf:'/common/slideshows/slideshow.swf',
			width:'100%',
			height:'100%',
			bgColor:'#FFFFFF',
			redirect:'',
			usePreloader:'true',
			preventCache:'true',
			disableMultipleXML:'false',
			wmode:null
		}, options);

		return this.each( function() {

			this.innerHTML = 'Please <a href="http://www.adobe.com/go/getflashplayer/">upgrade your Flash Player</a> in order to view this slideshow.';

			var initXML = '%3C?xml%20version=%221.0%22%20encoding=%22utf-8%22?%3E%3Cslideshow%20version=%223%22%3E%0A%20%20%3Cstyles%3E%0A%20%20%20%20%3CPreloader%20label=%22Loading%20%7BN%7D%2525%22%20iconColor=%22#FFFFFF%22%20iconAlpha=%2270%22%20iconWidth=%2250%22/%3E%0A%20%20%20%20%3CPreloaderLabel%20font=%22Verdana%22%20size=%2210%22%20color=%22#FFFFFF%22%20bold=%22false%22/%3E%0A%20%20%20%20%3CBackground%20backgroundColor=%22#C5CFD3%22%20backgroundAlpha=%22100%22%20bevelColor=%22#FFFFFF%22%20bevelStrength=%220%22%20borderWidth=%220%22%20borderColor=%22#FF6600%22/%3E%0A%20%20%20%20%3CLoaderAnimation%20type=%22circle%22%20color=%22#FFFFFF%22%20alphaBackground=%2220%22%20alphaInner=%2240%22%20frameWidth=%222%22%20width=%2230%22%20height=%2230%22/%3E%0A%20%20%20%20%3CDataLoader%20useAnimation=%22true%22%20useLabel=%22true%22%20labelPlacement=%22bottom%22%20fadeOutDuration=%22400%22%20textFormat=%22loader_text%22/%3E%0A%20%20%3C/styles%3E%0A%20%20%3Clocalization%3E%0A%20%20%20%20%3Ctext%20orig=%22Loading%20Data...%22%20local=%22Loading%20Data...%22%20desc=%22The%20label%20displayed%20while%20data%20file(s)%20are%20being%20loaded%22/%3E%0A%20%20%3C/localization%3E%0A%20%20%3Cfonts%3E%0A%20%20%20%20%3Cfont%20id=%22loader_text%22%20name=%22Pixelade%22%20embed=%22true%22%20size=%2213%22%20color=%22#FFFFFF%22%20bold=%22false%22%20selectable=%22false%22%20align=%22left%22/%3E%0A%20%20%3C/fonts%3E%0A%3C/slideshow%3E';

			var so = new SWFObject(o.swf, this.id, o.width, o.height, '7', o.bgColor);
			so.addVariable('usePreloader', o.usePreloader);
			so.addVariable('xml', escape(o.xml));
			so.addVariable('preventCache', o.preventCache);
			so.addVariable('disableMultipleXML', o.disableMultipleXML);
			so.addVariable('initXML', initXML);
			if (o.wmode != null) { so.addParam('wmode', o.wmode); }
			so.write(this.id);

		});
}
