/*
HTTP Host: static.ak.fbcdn.net
Generated: March 17th 2010 11:15:31 PM PDT
Machine: 10.16.140.107
Locale: nu_ll
Path: js/connect_widget/connect_widget_wizard_controller.js
*/

if (window.CavalryLogger) { CavalryLogger.start_js(["js\/connect_widget\/connect_widget_wizard_controller.js"]); }

function ConnectWidgetWizardController(c,a,b){this.wizard=$(c);this.markup_filterlist=a;this.widget_filterlist=b;this.selected_wizard=null;this.selected_wizard_id=null;this.app_id='';this.app_data={};this.connectscript='';}ConnectWidgetWizardController.prototype.getWizard=function(){return this.wizard;};ConnectWidgetWizardController.prototype.go=function(){this.appselector=$('selected_app');this.appselector.listen('change',function(b){var c=this.appselector.options[this.appselector.selectedIndex].value;var a=window.location;var d=a.protocol+'//'+a.host+a.pathname+'?connect_wizard&wizard='+this.selected_wizard_id+'&app_id='+c;window.location=d;}.bind(this));this.refresh();return this;};ConnectWidgetWizardController.prototype.refresh=function(){var a=this.markup_filterlist.getSelectedItem();a=a?a.data:this.widget_filterlist.getSelectedItem().data;if(a!=this.selected_wizard_id){this.selected_wizard_id=a;switch(this.selected_wizard_id){case 'share':this.selected_wizard=new ConnectShareWizard(this);break;case 'comments':this.selected_wizard=new ConnectCommentsWizard(this);break;case 'fan':this.selected_wizard=new ConnectFanWizard(this);break;case 'livestream':this.selected_wizard=new ConnectLiveStreamWidgetWizard(this);break;case 'stream_publish':this.selected_wizard=new ConnectStreamPublishWizard(this);break;case 'social_markup':this.selected_wizard=new ConnectSocialMarkupWizard(this);break;}if(this.selected_wizard)this.selected_wizard.showWizard();}};ConnectWidgetWizardController.prototype.setConnectScript=function(a){this.connectscript=a;return this;};ConnectWidgetWizardController.prototype.getConnectScript=function(){return this.connectscript;};ConnectWidgetWizardController.prototype.setCurrentApp=function(a){this.app_id=a;return this;};ConnectWidgetWizardController.prototype.setAppData=function(a){this.app_data=a;return this;};ConnectWidgetWizardController.prototype.getAppData=function(){return this.app_data;};ConnectWidgetWizardController.prototype.getAppId=function(){return this.app_id;};

if (window.Bootloader) { Bootloader.done(["js\/connect_widget\/connect_widget_wizard_controller.js"]); }