/* jQuery vimeo widget application that builds embeddable vimeo widget by passing variables into the VWidget object. Can control what parts are user-configurable.

Modeled after http://www.publicradio.org/columns/feed_widget/feed_widget_class.js by Ari Koinuma.

Anne Breckbill November 2008
Dependency: jquery 1.2.6
*/

/*######################################### Global Variables (constants, really) #############################*/
//tracking variables
var _rsCI="us-mpr";
var _rsCG="vwidget-user";
var _rsDN="//secure-us.imrworldwide.com/";
var _rsPLfl=0;
var _rsSE=1;
var _rsSM=1.0;
var _rsCL=1;

//logo codes
var mkpLogo = '<a href="http://www.marketplace.org?refid=0" title="Marketplace from American Public Media" style="border: none;" class="logoLink"><img src="http://www.americanpublicmedia.org/standard/images/apm001/widgets/apm_mkp.gif" alt="Marketplace Logo" border="0" align="left" style="margin:2px"></a>';


/*######### The main object ##############*/

//vimeo widget object. 
function VWidget(widgetId, vimUser, vimStream, vimId, logoCode, formURL, buttonURL){
	//properties
	this.widgetId = widgetId; //the name of this widget converted to text.  Naturally, it has to be identical to what this VWidget object is called. 
	this.vimUser = vimUser; //the vimeo user name or number
	this.vimStream = vimStream; //usually 'album'
	this.vimId = vimId; //if stream=album, this is the album id #
	this.logoCode = logoCode; //identifies with logoVar above to use
	this.formURL = formURL; //where public "get widget" code is
	this.buttonURL = buttonURL; //where public "get widget" graphic is
	this.targetId = this.widgetId + 'Div'; //the Id of the div where the widget will be embedded.  
	this.showGetButton; //user defined - default is true
	this.width; //user defined
	this.height; //user defined
	this.autoSlide; //user defined - default is true
	this.backColor; //user defined
	this.borderColor; //user defined (same as backColor but includes #)
	this.txtColor; //user defined
}
