String.prototype.supplant=function(o){return this.replace(/{([^{}]*)}/g,function(a,b){return(typeof(o[b])!=="undefined"&&o[b]!==null)?o[b].toString():""})};var WEBLINC={};WEBLINC.ModalContent={DefaultWidth:600,LoadingImagePath:"",CloseLinkClass:"",CloseLinkHtml:"Close",ErrorHtml:"<h2>Error!</h2><p>Sorry, there was an error loading this content.</p>",Init:function(){var c=jQuery("a.modal");jQuery("<div id=\"modal-content\" class=\"jqmWindow\"><img id=\"loading\" src=\""+WEBLINC.ModalContent.LoadingImagePath+"\" alt=\"Loading\" /><div id=\"modal-flash-content\"></div><div id=\"modal-body\"></div><a id=\"modal-close-link\" class=\""+WEBLINC.ModalContent.CloseLinkClass+"\" href=\"#\">"+WEBLINC.ModalContent.CloseLinkHtml+"</a></div>").appendTo("body").hide().css("textAlign","center").jqm({trigger:c,onShow:function(b){jQuery("embed,object").css("visibility","hidden");jQuery("#modal-body",b.w).empty();jQuery("#modal-flash-content",b.w).empty();jQuery("#modal-close-link",b.w).bind("click",function(a){a.preventDefault();jQuery(b.w).jqm().jqmHide()});jQuery(b.w).css("textAlign","center");jQuery("img#loading",b.w).show();WEBLINC.ModalContent.LoadContent(jQuery.event.fix({type:"click",target:b.t}),b.w);b.o.fadeIn('normal',function(){b.w.slideDown('fast')})},onHide:function(a){a.w.slideUp('fast',function(){a.o.fadeOut('fast',function(){jQuery("embed,object").css("visibility","visible");jQuery("#modal-body",a.w).empty();jQuery("#modal-flash-content",a.w).empty();a.w.css("width",parseInt(WEBLINC.ModalContent.DefaultWidth)+"px").css("marginLeft",((WEBLINC.ModalContent.DefaultWidth/2)-WEBLINC.ModalContent.DefaultWidth)+"px")})})}})},LoadContent:function(d,e){d.preventDefault();jQuery("img#loading",e).show();jQuery("#modal-body",e).empty();jQuery("#modal-flash-content",e).hide().empty();e.slideUp("fast").css({textAlign:"center",top:jQuery(window).scrollTop()+100}).slideDown("fast");var f=(d.target.href&&(d.target.href.indexOf("modalContent")>=0||d.target.href.indexOf("sendFriendEmailForm")>=0))?d.target.href:jQuery(d.target).parent("a.modal[href*=modalContent]").get(0).href;if(!f){return false}if(WEBLINC.Domain.indexOf(document.domain)===-1){f+="&jsoncallback=?"}jQuery.ajax({dataType:"jsonp",jsonp:"jsoncallback",url:f,data:{async:1},complete:function(a,b){jQuery("img#loading",e).hide();e.css("textAlign","left")},success:function(b){if(b.error){jQuery("#modal-body",e).html(b.error)}else{e.append(b.straightToPage);var c=(b.width)?b.width:WEBLINC.ModalContent.DefaultWidth;e.animate({width:parseInt(c,10)+"px",marginLeft:((c/2)-c)+"px"},"fast",function(){if(b.flashSource&&b.flashType){jQuery("#modal-flash-content",e).show();new WEBLINC.FlashContent(jQuery("#modal-flash-content",e),b.flashSource,{type:b.flashType,wmode:"window",modal:true})}jQuery("#modal-body",e).html(b.body).find("a.modal").bind("click",function(a){WEBLINC.ModalContent.LoadContent(a,e)})})}},error:function(a,b,c){jQuery("#modal-body",e).html(WEBLINC.ModalContent.ErrorHtml)}})}};WEBLINC.FlashContent=function(b,c,d){var d=(d==null)?{}:d;d.type=(d.type==null)?"standard":d.type;d.flashvars=(d.flashvars==null)?{}:d.flashvars;d.modal=(d.modal==null)?false:d.modal;jQuery(document).ready(function(){var a,srcFile;if(jQuery(b).get(0)){a=jQuery(b)}else if(jQuery("#"+b.toString()).get(0)){a=jQuery("#"+b.toString())}if(!a)return;if(d.type==="video"){srcFile=WEBLINC.FlashContent.VideoPlayer;d.flashvars.fileName=c;d.flashvars.skinName=WEBLINC.FlashContent.SkinName;d.wmode=d.wmode||"transparent";if(d.modal){d.width=d.height="100%";a.css("height",WEBLINC.FlashContent.VideoPlayerHeight);a.css("width",WEBLINC.FlashContent.VideoPlayerWidth)}}else{srcFile=c}a.empty().flash({src:srcFile,width:d.width||"100%",height:d.height||"100%",flashvars:d.flashvars,wmode:d.wmode})})};