var feed_widget_data=eval([{"id":"1243682","title":"Welcome to The Steve Wilkos Show's Web site","description":"www.SteveWilkos.com: The official Web site of The Steve Wilkos Show","link":{"0":"http:\/\/video.stevewilkos.com\/player\/?id=1243682&dst=rss|steve%20wilkos|"},"thumbnail":"http:\/\/video.nbcuni.com\/stevewilkos\/thumb\/63043ac3032c7e850089cc5e9c5ef37b_large.jpg","pub_date":"2010-08-11 17:00:00","pub_ms":1281560400000},{"id":"1175515","title":"The Steve Wilkos Show Goes Green","description":"See how Steve Wilkos goes green!","link":{"0":"http:\/\/video.stevewilkos.com\/player\/?id=1175515&dst=rss|steve%20wilkos|"},"thumbnail":"http:\/\/video.nbcuni.com\/stevewilkos\/thumb\/ef252ca0032c7e85003bc47316611a67_large.jpg","pub_date":"2010-04-23 15:00:00","pub_ms":1272049200000},{"id":"1142116","title":"Free Tickets To The Steve Wilkos Show!","description":"Get your free tickets to the show, now taping in Stamford, Connecticut!","link":{"0":"http:\/\/video.stevewilkos.com\/player\/?id=1142116&dst=rss|steve%20wilkos|"},"thumbnail":"http:\/\/video.nbcuni.com\/stevewilkos\/thumb\/e87cd349032c7e850164dbd588d7a1bc_large.jpg","pub_date":"2009-08-04 23:03:00","pub_ms":1249441380000},{"id":"217435","title":"Finger Eleven Rocks On!","description":"Finger Eleven delivers more melodic, edgy rock tunes from New York City. ","link":{"0":"http:\/\/video.stevewilkos.com\/player\/?id=217435&dst=rss|steve%20wilkos|"},"thumbnail":"http:\/\/video.nbcuni.com\/stevewilkos\/thumb\/64_E0623FDA_FED9D_C1184_BC000_3BA864B05_large.jpg","pub_date":"2008-02-13 09:53:06","pub_ms":1202914386000},{"id":"217436","title":"Finger Eleven - LIVE from Times Square","description":"Steve Wilkos teams up with Finger Eleven.","link":{"0":"http:\/\/video.stevewilkos.com\/player\/?id=217436&dst=rss|steve%20wilkos|"},"thumbnail":"http:\/\/video.nbcuni.com\/stevewilkos\/thumb\/64_00770846_FFD9D_C1184_DD000_3BA864B05_large.jpg","pub_date":"2008-02-13 09:53:06","pub_ms":1202914386000},{"id":"217377","title":"Steve Bids Farewell to NY!","description":"Steve Wilkos visits with his fans before he bidding farewell to New York.","link":{"0":"http:\/\/video.stevewilkos.com\/player\/?id=217377&dst=rss|steve%20wilkos|"},"thumbnail":"http:\/\/video.nbcuni.com\/stevewilkos\/thumb\/64_70C087D8_01DAD_C1185_42000_3BA864B05_large.jpg","pub_date":"2008-02-13 09:53:05","pub_ms":1202914385000},{"id":"217375","title":"Eric Durrance - LIVE from Times Square","description":"Steve welcomes his buddy Eric Durrance. ","link":{"0":"http:\/\/video.stevewilkos.com\/player\/?id=217375&dst=rss|steve%20wilkos|"},"thumbnail":"http:\/\/video.nbcuni.com\/stevewilkos\/thumb\/64_B01AF5AA_FFD9D_C1185_1F000_3BA864B05_large.jpg","pub_date":"2008-02-13 09:53:04","pub_ms":1202914384000},{"id":"217439","title":"The WRAP Party Begins!","description":"The Secret Is Out...","link":{"0":"http:\/\/video.stevewilkos.com\/player\/?id=217439&dst=rss|steve%20wilkos|"},"thumbnail":"http:\/\/video.nbcuni.com\/stevewilkos\/thumb\/64_50F5F2A2_07DAD_C1185_63000_3BA864B05_large.jpg","pub_date":"2008-02-13 09:39:17","pub_ms":1202913557000}]); var feed_widget_params={'div_id':'feed_fullpage_widget','type':'fullpage','width':500,'height':425,'start_id':1156911};function FeedWidget() { this.div_id='feed_widget'; this.feed_data=null; this.video_script_base='http://video.nbcuni.com/framework/'; this.video_script_name='FrameworkManager.js?include=EmbeddedPlayerManager'; this.video_width=330; this.video_height=300; this.widget_type='accordion'; this.timeouts=null; this.at_video_index=0; this.start_id=null; this.config_id=21008; var args=[]; if(typeof(arguments[0])=='object') { args=arguments[0]; } if(window.feed_widget_params) { args=window.feed_widget_params; } if(typeof(args)=='object') { for(var j in args) { var value=args[j]; switch(j) { case 'data': this.feed_data=value; break; case 'type': this.widget_type=value; break; case 'width': case 'height': var p=parseInt(value); if(p>0) { if(j=='width'){this.video_width=p;} else{this.video_height=p;} } break; case 'script': this.video_script=value; break; case 'script_name': this.video_script_name=value; break; case 'div_id': this.div_id=value; break; case 'start_id': this.start_id=parseInt(value); break; case 'config_id': this.config_id=value; break; } } } if(window.feed_widget_data && this.feed_data===null) { this.feed_data=window.feed_widget_data; } this.at_video_index=this.id_in_data(this.start_id); if(this.at_video_index===false) { this.start_id=this.feed_data[0].id; this.at_video_index=0; } this.add_video_script(); var self=this; $(document).ready(function(){ self.build_widget(); self.bind_links(); }); } FeedWidget.prototype.get_current_video_id = function() { var at=arguments[0]?arguments[0]:this.at_video_index; if(this.feed_data.length>at) { return this.feed_data[at].id; } else { return ''; } }; FeedWidget.prototype.bind_links = function() { var self=this; if(this.widget_type=='accordion') { $('#'+this.div_id+' ul li a.widget_button').unbind(); $('#'+this.div_id+' ul li a.watch_video_button').unbind(); $('#'+this.div_id+' ul li a.watch_video_button').bind('click',function(e){self.play_video(e);}); $('#'+this.div_id+' ul li a.widget_button').bind('click',function(e){self.show_video_data(e);}); } else if(this.widget_type=='fullpage') { $('#'+this.div_id+' ul.image_items_list li a').unbind(); $('#'+this.div_id+' #go_left').unbind(); $('#'+this.div_id+' #go_right').unbind(); $('#'+this.div_id+' ul.image_items_list li a').bind('click',function(e){self.play_video(e);}); $('#'+this.div_id+' #go_left').bind('click',function(e){self.move_list('left',1);}); $('#'+this.div_id+' #go_right').bind('click',function(e){self.move_list('right',1);}); } }; FeedWidget.prototype.move_list = function(direction,amount) { $('#'+this.div_id+' #go_left').removeClass('disabled'); $('#'+this.div_id+' #go_right').removeClass('disabled'); var width=parseInt($('#'+this.div_id+' ul.image_items_list li').width())+parseInt($('#'+this.div_id+' ul.image_items_list li').css('margin-left'))+parseInt($('#'+this.div_id+' ul.image_items_list li').css('margin-right')); var moved=width*amount; var pos=parseInt($('#'+this.div_id+' ul.image_items_list').css('left')); var container_width=parseInt($('#'+this.div_id+' div#image_list').width()); var num=this.feed_data.length; var max_pos=(num*width)-container_width; var newpos=0; if(direction=='left') { newpos=pos-moved; } else { newpos=pos+moved; } if(newpos<-max_pos) { newpos=-(max_pos); //disable left $('#'+this.div_id+' #go_left').addClass('disabled'); } if(newpos>=0) { newpos=0; $('#'+this.div_id+' #go_right').addClass('disabled'); } $('#'+this.div_id+' ul.image_items_list').animate({'left':newpos}); }; FeedWidget.prototype._get_event_id = function(e) { var id=''; if(typeof(e)=='object') { if($.browser.msie) { id=e.target.id; } else { id=e.currentTarget.id; } } else { id=e; } return id; }; FeedWidget.prototype.show_video_data = function(e) { var id=this._get_event_id(e).replace(/\D/g,''); this.bind_links(); $('#show_'+id).unbind(); $('#'+this.div_id+' dd').slideUp(); var self=this; $('#desc_'+id).slideDown(function(){ $('#'+self.div_id+' a.widget_button').removeClass('selected'); $('#show_'+id).addClass('selected'); }); }; FeedWidget.prototype.play_video = function(e) { var link_id=''; var video_id=''; link_id=this._get_event_id(e); video_id=link_id.replace(/\D/g,''); embeddedPlayerManager.getPlayer().playVideo(video_id); this.at_video_index=this.id_in_data(video_id); if($('#video_description').length > 0) { $('#video_description').html(this.feed_data[this.at_video_index].description); } /*if($('#video_date').length > 0) { $('#video_date').html(this.format_date(this.feed_data[this.at_video_index].pub_ms)); }*/ if($('#video_title').length > 0) { $('#video_title').html(this.feed_data[this.at_video_index].title); } }; FeedWidget.prototype.format_date = function(ms) { var d=new Date(); d.setTime(ms); var h=d.getHours(); var ampm='AM'; if(h===0) { h=12; } else if(h>12) { h-=12; ampm='PM'; } return d.getMonth()+'/'+d.getDay()+'/'+d.getFullYear()+' '+h+':'+d.getMinutes()+' '+ampm; }; FeedWidget.prototype.set_width_height = function() { if(arguments.length==2) { this.video_width=arguments[0]; this.video_height=arguments[1]; } else if(arguments.length==1) { this.video_width=parseInt(arguments[0].replace(/^.*w:(\d+).*$/,'$1')); this.video_height=parseInt(arguments[0].replace(/^.*h:(\d+).*$/,'$1')); } }; FeedWidget.prototype.build_widget = function() { switch(this.widget_type) { case 'accordion': this.build_accordion_widget(); break; case 'fullpage': this.build_fullpage_widget(); break; } }; FeedWidget.prototype.build_fullpage_widget = function() { $('#'+this.div_id).html('
<>