var Banner=function(a){this._init(a)};Banner.prototype={_init:function(b){var a=this;if(typeof b=="undefined"||b==""||($.browser.msie&&$.browser.version<7&&!$(b).hasClass("rate_sprite"))){return true}$(b).each(function(){$(this).filter(".rate_sprite").find(".rate").each(function(){a.reflect($(this))})})},reflect:function(b){b.addClass("textrate");var f=b.find(".value").text();var e=$("<div class='value reflect'></div>");while(f.length>0){var c=f.substr(0,1);var a="digit"+c;if(c=="."){a="dot"}var d=$("<span class='digit'></span>").text(c).addClass(a);e.append(d);f=f.substr(1)}e.append("<span class='digit percent'>%</span>");b.find(".term").each(function(){var g=$.trim(b.siblings(".percent").text()+" "+b.siblings(".term").text()+" "+b.siblings(".title").text());$apy=$("<span class='digit'>"+g+"</span>").addClass("apy").addClass("apy"+b.find(".term").attr("title"));e.append($apy)});b.after($("<div class='rate generatedrate'></div>").append(e))}};var FlashBanner=function(a){this.flowplayerSrc="/files/pres/flowplayer/flowplayer-3.1.5.swf";this.flashRegretMessage='<div class="flash-regret wrapper-2-way noshadow">                                            <div class="box-t-r"></div><div class="box-t"></div>                                            <div class="box-c">                                                    <div class="box-c-r">                                                        <div class="inner">                                                            <h3>Get Adobe Flash Player</h3>                                                            <p>                                                                You must have the latest Flash player installed.                                                                You can <a href="http://get.adobe.com/flashplayer/" target="_blank">download it here</a>.                                                            </p>                                                        </div>                                                    </div><br clear="both"/>                                                </div>                                            <div class="box-b-r"></div><div class="box-b"></div>                                        </div>';this._init(a)};FlashBanner.prototype={_init:function(handle){var self=this;if(!$(handle).attr("rel")){return}var bWrp=$(handle).find(".noflash"),bId=handle.id,bClass=handle.className,bRel=$(handle).attr("rel"),hasReplacement=false,hasDims=false,optsArray=optsArray=bRel.split(";"),optsObj={flashvars:{},version:[9,45],w3c:true,wmode:"transparent",cachebusting:true},boxPadding={x:25,y:32},tuple,flashSrc,regretMsg;for(var i=0;i<=optsArray.length-1;i++){tuple=optsArray[i].split("=");if(tuple[0]=="flashvars"){eval("optsObj.flashvars = {"+tuple[1]+"}")}else{if(tuple[0]=="version"){eval("optsObj.version = ["+tuple[1]+"]")}else{optsObj[tuple[0]]=tuple[1]}}}if(typeof optsObj.width!="undefined"&&typeof optsObj.height!="undefined"){hasDims=true;dimsCss="width:"+optsObj.width+"px;height:"+optsObj.height+"px";if(hasDims){$(handle).attr("style",dimsCss)}}if($(bWrp).find(".flash").length>0){hasReplacement=true;var flashReplacement=$(bWrp).find(".flash");if(hasDims){$(flashReplacement).attr("style",dimsCss)}}if(bClass.indexOf("fp_video")>=0){flowplayer(bId,self.flowplayerSrc);return}else{if(bClass.indexOf("flash_video")>=0){flashSrc="/files/video/videoPlayer"}else{flashSrc=(optsObj.src.indexOf("/")>=0)?optsObj.src:"/files/pres/swf/"+optsObj.src}}if(typeof flashSrc!="undefined"){if($(bWrp).find(".flash-regret").length){regretMsg=$(bWrp).find(".flash-regret")}else{regretMsg=$(bWrp).append(self.flashRegretMessage).find(".flash-regret")}if(hasDims){innerDimsCss="width:"+(optsObj.width-boxPadding.x)+"px;height:"+(optsObj.height-boxPadding.y)+"px";regretMsg.find(".inner").attr("style",innerDimsCss);regretMsg.attr("style",dimsCss)}regretMsg.show();if(flashSrc.indexOf(".swf")<0){flashSrc=flashSrc+".swf"}flashembed(bId,{src:flashSrc,version:optsObj.version,w3c:optsObj.w3c,wmode:optsObj.wmode,cachebusting:optsObj.cachebusting,onFail:function(){bWrp.show();if(hasReplacement){var replaceTO=window.setTimeout(function(){regretMsg.hide();flashReplacement.fadeIn(400)},3000);$(regretMsg).bind("mouseenter",function(){clearTimeout(replaceTO)})}}},optsObj.flashvars)}else{if(hasReplacement){bWrp.show();flashReplacement.show()}}}};$(document).ready(function(){$(".banner, .rate_sprite").each(function(){new Banner(this)});$(".flash, .flash_banner, .flash_video, .fp_video").not(".initialized").each(function(){$(this).addClass("initialized");new FlashBanner(this)})});