$(document).ready(function(){var d=new Array(2);var g=0;var a=d.length;var c=0;var h=false;var d=[{txt:'<img width="620" height="220" alt="" src="http://static.nycgo.com/images/programs/rw/01_SRW09slide_extended.gif"/>'},{txt:'<img width="620" height="220" alt="" src="http://static.nycgo.com/images/programs/rw/02_SRW09slide_extended.gif"/>'},{txt:'<img width="620" height="220" alt="" src="http://static.nycgo.com/images/programs/rw/03_SRW09slide_extended.gif"/>'},{txt:'<img width="620" height="220" alt="" src="http://static.nycgo.com/images/programs/rw/04_SRW09slide_extended.gif"/>'},{txt:'<img width="620" height="220" alt="" src="http://static.nycgo.com/images/programs/rw/05_SRW09slide_extended.gif"/>'},{txt:'<img width="620" height="220" alt="" src="http://static.nycgo.com/images/programs/rw/06_SRW09slide_extended.gif"/>'}];function b(p,o,m){var l=p;var k=o;var n=m;if((k=="next")&&(g==l.length-1)){g=0}else{if((k=="next")&&(g<l.length-1)){g=g+1}else{if((k=="prev")&&(g===0)){g=l.length-1}else{if((k=="prev")&&(g>=0)){g=g-1}}}}var j=g;$("div#articleTopCarousel ul li div span").fadeOut(150,function(){$("div#articleTopCarousel ul li div span").html(l[j]["txt"]).fadeIn(150)})}function i(j){b(d,"next",1)}function e(j){b(d,"next",1);clearTimeout(c);c=setInterval(function(){i(1)},4000)}function f(j){h=!j;if(j===true){c=setInterval(function(){i(1)},4000)}else{clearInterval(c);c=null}}$(".topCarouselPrev").bind("click",function(j){b(d,"prev",1)});$(".topCarouselNext").bind("click",function(j){b(d,"next",1)});$("#cycler-toggle").click(function(){f(h);if(h){$("#cycler-toggle img").attr("src","http://static.nycgo.com/images/programs/rw/play_k.gif")}else{$("#cycler-toggle img").attr("src","http://static.nycgo.com/images/programs/rw/pause_c.gif")}});$("#cycler-toggle img").hover(function(){if(h){this.src="http://static.nycgo.com/images/programs/rw/play_c.gif"}else{this.src="http://static.nycgo.com/images/programs/rw/pause_c.gif"}},function(){if(h){this.src="http://static.nycgo.com/images/programs/rw/play_k.gif"}else{this.src="http://static.nycgo.com/images/programs/rw/pause_k.gif"}});c=setTimeout(function(){e(1)},10000)});