(function(A){A.fn.RFUcarousel=function(C){settings=A.extend({},A.fn.RFUcarousel.defaults,C);if(!jQuery.browser.msie){A(".pagewrap").attr("id","js")}else{if(parseInt(jQuery.browser.version)<=7){A(".featured .contents").css({overflow:"hidden",padding:"19px 0",height:"90.5%"});A(".featured .contents ul").css({overflow:"hidden",height:"100%",zoom:"1",width:"100%"});A(".featured .contents p").css({width:"100%",cursor:"pointer",position:"absolute",left:"0","z-index":"100",height:"19px","line-height":"19px"});A(".featured .contents p a").css({height:"19px"});A("#uparrow").css({top:"0"});A("#downarrow").css({bottom:"-3px"});A(".featured .contents p img").css({visibility:"hidden","vertical-align":"middle"});A(".featured .article").css({display:"none"});A(".featured .sel").css({display:"block"})}else{A(".pagewrap").attr("id","js")}}A("#uparrow").mousedown(F);A("#downarrow").mousedown(E);A("#downarrow img").wrap('<a href="#"></a>');A("#uparrow img").wrap('<a href="#"></a>');A(".contents p a").click(function(){return false});return this.each(function(){this.contentArticle=A(this).attr("href");A(this).click(B)});function B(){A(".contents .selected").removeClass("selected");A(this).addClass("selected");var G=this.contentArticle;A(G).stop();A("#featured-viewer .sel").fadeOut(250,function(){A(G).focus().fadeIn(350).addClass("sel")}).removeClass("sel");return false}function F(){D("down")}function E(){D("up")}function D(M){var H=A(".contents ul").offset().top;var L=A(".contents ul").height()+H;var K=A(".contents ul").children();var G=K.length;for(i=1;i<=G;i++){var J=A(".contents ul li:nth-child("+i+")").offset().top;var I=A(".contents ul li:nth-child("+i+")").height()+J;if(M=="down"){if(J<H&&I>H){H=I}}else{if(J<L&&I>L){L=J}}}var N;if(M=="up"){N=(L-H)}else{N=(H-L)}A(".contents ul").animate({scrollTop:"+="+N+"px"},1000)}};A.fn.RFUcarousel.defaults={animate:""}})(jQuery);
