/**
 * FringeGallery: Handles behaviour for the Fringe Flash Gallery
 * @namespace
 */
var Featured = function(){
	/* global FoxFlash, HashHelper, Cookies, Ajax */

	var _instance;
	var _campaignId; // hardcoded value to internal campaign name

	var self = /** @scope FringeGallery */{

		/**
	     * Setup the Gallery flash movie
	     * @param {DOMid} Id of the flash holder element
		 * @param {hash} options
		 * @config {path} swf_path Path to the swf file
		 * @config {path} xml_path Path to the xml file
	     */
	    setup: function(holderId, options) {
			// set defaults
			options.width = options.width || '985';
			options.height = options.height || '450';
			options.required_version = options.required_version || '9';
			options.background_color = options.background_color || '#000000';

			_instance = FoxFlash.create(holderId, options, {
											setFlashVars: self.setFlashVars
										});
			FoxFlash.embed(_instance);
		},
		getMovie: function() {
			return FoxFlash.getMovie(_instance);
		},
		/**
		 * Set flash vars for the movie, before it's embedded
		 * @param {SWFObject} so
		 */
		
		setFlashVars: function(so) {
			so.addVariable('xmlPath', _instance.options.xml_path);
            so.addParam("wmode", "transparent");
		}
		
	};
	return self;
}();
