function confirmExternalLink(a){confirm("If you would like to view this website, you may click on this link. It is important to note that by clicking on this link you will be leaving this website and the information viewed there is not the property of Claymore Investments, Inc.")==true&&window.open(a);return false}function confirmExternalVideoLink(b){var a=$(b).attr("href");confirm("The opinions expressed in the video are those of the participants and are subject to change at any time due to changes in market or economic conditions. The comments should not be construed as a recommendation of individual holdings or market sectors, but as an illustration of broader themes. The opinions in this video are not necessarily those of Claymore Investments or any of its affiliates and are not intended to be a forecast or guarantee of performance. Information in this video is not meant as a solicitation for any product. All investing involves risk and it is possible to lose money on an investment.")==true&&window.open(a);return false}function redirectFromRelativeUrl(a){if(a[0]!="/")a="/"+a;var b=location.href,e=b.indexOf("/",0),c=b.indexOf("/",e+1),d=b.indexOf("/",c+1);location.href=b.substring(0,d)+a}(function(a){a.fn.clayNavProductList=function(b){var d={linkMinusSrc:"/Common/Images/GreenDash.png",linkPlusSrc:"/Common/Images/GreenCross.png",checkForCurrentItem:false},b=a.extend(d,b),c=function(){var a=location.href,c=a.indexOf("//",0),b=a.indexOf("/",c+2);return a.substring(b)};return this.each(function(){var d=a(this);if(b.checkForCurrentItem){var g=c(),e=d.find("a[href='"+g+"']");if(e.length>0){e.css("background-color","#e0e0e0");var f=e.parent("li").parent("ul");f.show();f.parent().find("img").attr("src",b.linkMinusSrc)}}d.find("li a").click(function(){var e=a(this),f=e.find("img"),c=e.next();if(c.is("ul")&&c.is(":visible")){c.slideUp("normal");f.attr("src",b.linkPlusSrc);return false}if(c.is("ul")&&!c.is(":visible")){d.find("ul:visible").prev().find("img").attr("src",b.linkPlusSrc);d.find("ul:visible").slideUp("normal");f.attr("src",b.linkMinusSrc);c.slideDown("normal",function(){var b=a(".WebDisclaim");b.hide();b.show()});return false}})})}})(jQuery);(function(a){a(document).ready(function(){a(".etf-edu-side-menu").clayNavProductList({checkForCurrentItem:true})})})(jQuery);(function(a){a.fn.educationProfileSection=function(){}})(jQuery);(function(a){a.fn.etfMainProductList=function(b){var l={topTabCssClass:"etf-prodlist-toptab",subTabCssClass:"etf-prodlist-subtab",subTabActiveCssClass:"etf-prodlist-subtab-active",sectionHeaderCssClass:"prodlst-sctn-head",productListBodyCssClass:"prdlist-body",sectionCssClass:"prodlst-sctn",imagesRoot:"/common/images/",hasDataClass:"hasData",serviceUrl:"/WebService/EtfProductListService.asmx/GetEtfProductList",loadingImageUrl:"/common/images/loading.gif",expandAllCssClass:"etf-prodlist-expandall",collapseAllCssClass:"etf-prodlist-collapseall",currentTabHiddenId:"hdnCurrentTabId",topTabs:[{tabId:"etf-prices-tab",cssGroup:"etf-prodlist-toptab",contentId:"etf-prodlist-prices",contentCssGroup:"etf-prodlist-content",parentBackgroundImage:"ETF-productlist-prices-table-top.jpg",defaultChildContentId:"etf-prodlist-prices-common"},{tabId:"etf-performance-tab",cssGroup:"etf-prodlist-toptab",contentId:"etf-prodlist-perf",contentCssGroup:"etf-prodlist-content",parentBackgroundImage:"ETF-productlist-peform-table-top.jpg",defaultChildContentId:"etf-prodlist-perf-common"}],subTabs:[{tabId:"etf-prices-common-tab",cssGroup:"etf-prodlist-subtab",contentId:"etf-prodlist-prices-common",contentCssGroup:"prdlist-body"},{tabId:"etf-prices-advisor-tab",cssGroup:"etf-prodlist-subtab",contentId:"etf-prodlist-prices-advisor",contentCssGroup:"prdlist-body"},{tabId:"etf-perf-common-tab",cssGroup:"etf-prodlist-subtab",contentId:"etf-prodlist-perf-common",contentCssGroup:"prdlist-body"},{tabId:"etf-perf-advisor-tab",cssGroup:"etf-prodlist-subtab",contentId:"etf-prodlist-perf-advisor",contentCssGroup:"prdlist-body"}]},b=a.extend(l,b),c=function(){var b=a(".WebDisclaim");b.hide();b.show()},e=function(d){var e=d.attr("id");d.html('<div><img src="'+b.loadingImageUrl+'" /> Loading...</div>');a.ajax({type:"POST",url:b.serviceUrl,data:JSON.stringify({contentDivId:e}),contentType:"application/json; charset=utf-8",dataType:"json",success:function(a){var e=typeof a.d=="string"?eval("("+a.d+")"):a.d;d.html(e.Html);d.addClass(b.hasDataClass);c()}})},g=function(d,b){for(var c=null,a=0;a<b.length&&c==null;a++)if(b[a].tabId==d)c=b[a];return c},f=function(c){a("#"+b.currentTabHiddenId).val(c)},i=function(k){var i=a(k.target),h=g(i.attr("id"),b.subTabs);if(h){var d=a("#"+h.contentId);if(!d.is(":visible")){d.siblings("."+h.contentCssGroup).hide();!d.hasClass(b.hasDataClass)&&e(d);d.show();f(h.contentId);var j=b.subTabActiveCssClass;i.addClass(j);i.siblings("."+h.cssGroup).removeClass(j);c()}}},j=function(k){var j=a(k.target),d=g(j.attr("id"),b.topTabs);if(d){var i=a("#"+d.contentId);if(!i.is(":visible")){i.siblings("."+d.contentCssGroup).hide();var h=a("#"+d.defaultChildContentId);h.length>0&&!h.hasClass(b.hasDataClass)&&e(h);f(d.defaultChildContentId);i.show();j.parent().css("background","url('"+b.imagesRoot+d.parentBackgroundImage+"')");c()}}},h=function(b){var a=b.next();if(a.is("div"))if(a.is(":visible"))a.slideUp("normal",function(){c()});else a.slideDown("normal",function(){c()})},d=function(f,e,d){var a=e.find("."+b.productListBodyCssClass+":visible ."+b.sectionCssClass);if(d)a.show("normal",function(){c()});else a.hide("normal",function(){c()});f.preventDefault()},k=function(d){var c=a(d.target);if(c.is("h3")&&c.hasClass(b.sectionHeaderCssClass)){h(c);return false}};return this.each(function(){var c=a(this);c.find("."+b.topTabCssClass).click(function(a){j(a)});c.find("."+b.subTabCssClass).click(function(a){i(a)});c.find("."+b.expandAllCssClass).click(function(a){d(a,c,true)});c.find("."+b.collapseAllCssClass).click(function(a){d(a,c,false)});c.click(k)})};a.fn.cefMainProductList=function(b){var i={sortLinkCssClass:"prodlst-sort",sortAjaxUrl:"/WebService/CefProductListService.asmx/GetCefProductList",defaultSortedColumnIndex:0,defaultSortDirection:"DESC",productListBodyCssClass:"prdlist-body"},b=a.extend(i,b),d=b.defaultSortedColumnIndex,e=b.defaultSortDirection,c,f=function(f){var c=f.parent();if(c.length>0){var h=c[0].cellIndex;a.ajax({type:"POST",url:b.sortAjaxUrl,data:JSON.stringify({newSortColumnIndex:h,previousSortColumnIndex:d,currentSortDirection:e}),contentType:"application/json; charset=utf-8",dataType:"json",success:g})}},g=function(a){var f=typeof a.d=="string"?eval("("+a.d+")"):a.d;d=f.SortColumnIndex;e=f.SortDirection;c.find("."+b.productListBodyCssClass).html(f.Html)},h=function(e){var c=a(e.target);if(c.is("a")&&c.hasClass(b.sortLinkCssClass)){f(c);return false}else if(c.is("img")){var d=c.parent();if(d.is("a")&&d.hasClass(b.sortLinkCssClass)){f(d);return false}}};return this.each(function(){c=a(this);c.click(h)})}})(jQuery);(function(a){a.fn.fundProfileSection=function(b){var c={headerCssClass:"fund-summary-header",headerToggleCssClass:"fund-summary-header-toggle",bodyCssClass:"fund-summary-body",linkMinusHtml:"[ - ]",linkPlusHtml:"[ + ]",contentCssClass:"etf-fund-content-control"},b=a.extend(c,b);return this.each(function(){var d=a(this),c=null,e=d.next();if(e.hasClass(b.contentCssClass))c=e;d.find("."+b.headerCssClass+" ."+b.headerToggleCssClass+" a").click(function(){var e=d.find("."+b.bodyCssClass),f=a(this);if(e.is(":visible")){e.slideUp("normal");c!=null&&c.hide();f.html(b.linkPlusHtml)}else{e.slideDown("normal");c!=null&&c.show();f.html(b.linkMinusHtml)}return false})})}})(jQuery);(function(a){a.fn.peopleProfileSection=function(b){var c={headerCssClass:"people-summary-header",headerToggleCssClass:"people-summary-header-toggle",bodyCssClass:"people-summary-body",linkMinusHtml:"<img src='/Common/Images/BlueArrow-Down.png'/>",linkPlusHtml:"<img src='/Common/Images/BlueArrow.png'/>",contentCssClass:"etf-people-content-control"},b=a.extend(c,b);return this.each(function(){var d=a(this),c=null,e=d.next();if(e.hasClass(b.contentCssClass))c=e;d.find("."+b.headerCssClass+" ."+b.headerToggleCssClass+" a").click(function(){var e=d.find("."+b.bodyCssClass),f=a(this);if(e.is(":visible")){e.slideUp("normal");c!=null&&c.hide();f.html(b.linkPlusHtml)}else{e.slideDown("normal");c!=null&&c.show();f.html(b.linkMinusHtml)}return false})})}})(jQuery);(function(a){a.fn.etfcentralProfileSection=function(b){var c={headerCssClass:"etfcentral-summary-header",headerToggleCssClass:"etfcentral-summary-header-toggle",bodyCssClass:"etfcentral-summary-body",linkMinusHtml:"<img src='/Common/Images/GreenDash.png'/>",linkPlusHtml:"<img src='/Common/Images/GreenCross.png'/>",contentCssClass:"etf-etfcentral-content-control"},b=a.extend(c,b);return this.each(function(){var d=a(this),c=null,e=d.next();if(e.hasClass(b.contentCssClass))c=e;d.find("."+b.headerCssClass+" ."+b.headerToggleCssClass+" a").click(function(){var e=d.find("."+b.bodyCssClass),f=a(this);if(e.is(":visible")){e.slideUp("normal");c!=null&&c.hide();f.html(b.linkPlusHtml)}else{e.slideDown("normal");c!=null&&c.show();f.html(b.linkMinusHtml)}return false})})}})(jQuery);(function(a){a.fn.cefPerformancePage=function(){return this.each(function(){var b=a(this),e=b.find(".cef-performance-tabs"),c=b.find("#cef-perf-tab-qtr"),d=b.find("#cef-perf-tab-mon");b.find("#QuatPerform-Tab").click(function(){if(!c.is(":visible")){d.hide();c.show()}e.removeClass("CEF-Perform-Top-Month")});b.find("#MonthPerform-Tab").click(function(){if(!d.is(":visible")){d.show();c.hide()}e.addClass("CEF-Perform-Top-Month")});b.find(".CEF-table-nav li").click(function(){var c=a(this),d=a("#"+c.attr("rel"));if(!d.is(":visible")){d.siblings().hide();d.show();var e=b.find("#"+c.attr("hdr"));e.find(".CEF-table-title").html(c.html());e.find("li.slctd").removeClass("slctd");c.addClass("slctd")}return false})})}})(jQuery);(function(a){a.fn.askTheCeo=function(b){var c={nameCssClass:"AskTheCEOName",emailCssClass:"AskTheCEOEmail",feedbackCssClass:"AskTheCEOFeedback",submitCssClass:"AskCEOSubmit",statusAreaCssClass:"AskCEOStatusArea",invalidCssClass:"invalid",successCssClass:"AsktheCEOSuccess",errorMessage:"All fields are required",serviceUrl:"/WebService/AskTheCeoService.asmx/SendEmail"},b=a.extend(c,b);return this.each(function(){var c=a(this),j=c.find("."+b.nameCssClass),i=c.find("."+b.emailCssClass),h=c.find("."+b.feedbackCssClass),f=c.find("."+b.submitCssClass),k=function(){var a=false,c=e(j),d=e(i),f=e(h);if(c&&d&&f)a=true;else alert(b.errorMessage);return a},g=false,d=function(e,d){if(!g){c.append("<div class='"+b.statusAreaCssClass+" "+d+"'>"+e+"</div>");g=true}else{var a=c.find("."+b.statusAreaCssClass);a.attr("class",b.statusAreaCssClass);a.html(e);a.addClass(d)}},e=function(c){var d=true,e=c.val();if(a.trim(e).length==0){d=false;c.addClass(b.invalidCssClass)}else c.removeClass(b.invalidCssClass);return d};f.click(function(){if(k()){f.hide();d("<img src='/common/images/loading.gif' />","");a.ajax({type:"POST",url:b.serviceUrl,data:JSON.stringify({name:j.val(),email:i.val(),feedback:h.val()}),contentType:"application/json; charset=utf-8",dataType:"json",success:function(c){var a=c.d;if(a.Success)d(a.ResponseMessage,b.successCssClass);else{alert(a.ResponseMessage);d("","");f.show()}}})}})})}})(jQuery);(function(a){a.fn.clayFeedback=function(b){var g={serviceUrl:"/WebService/FeedbackService.asmx",headerCss:"feedback-side-header",feedbackSubmitCss:"feedback-side-form-submit",feedbackNameCss:"feedback-side-form-name",feedbackEmailCss:"feedback-side-form-email",feedbackFeedbackCss:"feedback-side-form-feedback",feedbackFormCss:"feedback-side-form",invalidCssClass:"invalid",errorMessage:"All fields are required",feedbackCancelCss:"feedback-side-form-cancel"},b=a.extend(g,b),f=function(e,j){var g=a(this),i=e.find("."+b.feedbackNameCss),h=e.find("."+b.feedbackEmailCss),f=e.find("."+b.feedbackFeedbackCss),k=d(i),l=d(h),m=d(f);if(k&&l&&m){g.attr("disabled","true");a.ajax({type:"POST",url:b.serviceUrl+"/SendEmail",data:JSON.stringify({name:i.val(),email:h.val(),feedback:f.val()}),contentType:"application/json; charset=utf-8",dataType:"json",success:function(b){var a=b.d;alert(a.ResponseMessage);a.Success&&c(e,j);g.attr("disabled","false")}})}else alert(b.errorMessage)},d=function(c){var d=true,e=c.val();if(a.trim(e).length==0){d=false;c.addClass(b.invalidCssClass)}else c.removeClass(b.invalidCssClass);return d},e=function(e,a){var c=e.find("."+b.feedbackFormCss),d=c.position();a.css("top",d.top+"px");a.css("left",c.width()+30+"px")},c=function(a,c){a.find("."+b.feedbackFormCss).hide();c.css("left","0px")};return this.each(function(){var d=a(this),g=d.find("."+b.headerCss),i=false,h=false;g.click(function(){if(!h)if(!i){h=true;a.ajax({type:"POST",url:b.serviceUrl+"/GetFeedbackForm",contentType:"application/json; charset=utf-8",dataType:"json",success:function(i){var a=i.d;g.before(a.FormHtml);b.errorMessage=a.InvalidFieldsText;e(d,g);d.find("."+b.feedbackSubmitCss).click(function(){f(d,g)});d.find("."+b.feedbackCancelCss).click(function(){c(d,g);return false});h=false}});i=true}else if(d.find("."+b.feedbackFormCss).is(":visible"))c(d,g);else{d.find("."+b.feedbackNameCss).val("");d.find("."+b.feedbackEmailCss).val("");d.find("."+b.feedbackFeedbackCss).val("");d.find("."+b.feedbackFormCss).show();e(d,g)}})})};a(".feedback-side-wrapper").clayFeedback()})(jQuery);(function(a){var b="clayDefaultText-initial",d="clayDefaultText-novalcss",c={init:function(e){var j={noValueCss:"default-text-no-val"},e=a.extend(j,e),c=a(this),f=c.val();c.data(b,f);c.data(d,e.noValueCss);var i=function(a){a&&a.length>0&&!c.hasClass(a)&&c.addClass(a)},g=function(a){a&&a.length>0&&c.hasClass(a)&&c.removeClass(a)},h=function(){var d=false,b=c.val();if(a.trim(b).length==0||b==f){c.val(f);i(e.noValueCss)}else g(e.noValueCss)};if(f.length>0){i(e.noValueCss);c.focus(function(){if(c.val()==f){c.val("");g(e.noValueCss);c.removeClass(e.noValueCss)}});c.blur(h);c.change(h)}},reset:function(){var c=a(this);c.val(c.data(b));c.addClass(c.data(d))},hasValueChanged:function(){var d=a(this),e=d.data(b),c=d.val();return c.length>0&&c!=e}};a.fn.clayDefaultText=function(b){if(c[b])return c[b].apply(this,Array.prototype.slice.call(arguments,1));else if(typeof b==="object"||!b)return c.init.apply(this,arguments);else a.error("Method "+b+" does not exist on jQuery.tooltip")}})(jQuery);(function(a){a.fn.etfPerfCharts=function(b){var l={dollarGrowthContainerId:"etf-fund-performance-chart-dollargrowth",dollarGrowthAsOfId:"etf-fund-performance-chartdollargrowth-asof",historicalGrowthContainerId:"etf-fund-performance-chart-historicalgrowth",historicalGrowthAsOfId:"etf-fund-performance-chart-historicalgrowth-asof",currentFundSecurityId:-1,benchmarkListId:"",performanceAjaxUrl:"/WebService/EtfPerformanceChartService.asmx",dollarGrowthChartTitle:"Hypothetical Growth of $10,000",chartColors:["#518736","#E39538","#6A757C","#000000"],fundSearchTextBoxCss:"etf-fund-performance-compare-fundsearch",textFontFamily:"Arial, sans-serif",langOptions:null,tooltipCss:"etf-perf-charts-compare-help",tooltipDialogId:"perform-lightbox-panel",tooltipDialogCss:"etf-perf-charts-compare-tooltip"},b=a.extend(l,b),c=null,d=null;function i(a){return new Date(parseInt(a.substr(6)))}var e=function(){c&&c.showLoading();var e=[];a("."+b.fundSearchTextBoxCss).each(function(){var b=a(this).val();b&&b.length>0&&e.push(b)});var f=null,d=a("#"+b.benchmarkListId).val();if(d.length>0)f=d;a.ajax({type:"POST",url:b.performanceAjaxUrl+"/GetPerformanceData",data:JSON.stringify({currentFundSecurityId:b.currentFundSecurityId,otherFundTickers:e,indexId:f}),contentType:"application/json; charset=utf-8",dataType:"json",success:function(a){j(a.d)}})},j=function(e){c&&c.destroy();d&&d.destroy();for(var n=[],o=[],s=e.DataList,j=0;j<s.length;j++){for(var k=s[j],r=[],l=0;l<k.DollarGrowthList.length;l++){var t=k.DollarGrowthList[l];r.push({x:i(t.DateTimeValue),y:Math.round(t.DecimalValue)})}n.push({type:j==0?"area":"line",name:k.Name,data:r});for(var p=[],m=0;m<k.HistoricReturnList.length;m++)p.push(k.HistoricReturnList[m].ReturnAmount);o.push({name:k.Name,data:p})}c=new Highcharts.StockChart({credits:{enabled:false},chart:{renderTo:b.dollarGrowthContainerId,type:"area",spacingLeft:0},colors:b.chartColors,yAxis:{labels:{formatter:function(){return g(this.value)},x:-3,align:"right"}},xAxis:{maxZoom:120*24*3600*1e3},tooltip:{formatter:function(){var b=Highcharts.dateFormat("%B %Y",this.x);a.each(this.points,function(c,a){b+='<br/><span style="color:'+a.series.color+'">'+a.series.name+"</span>: <b>"+g(a.y)+"</b>"});return b}},rangeSelector:h(),navigator:{series:{color:b.chartColors[0],lineColor:b.chartColors[0]}},series:n});for(var q=[],j=0;j<e.TimePeriods.length;j++)q.push(e.TimePeriods[j].Description);d=new Highcharts.Chart({chart:{renderTo:b.historicalGrowthContainerId,type:"column"},credits:{enabled:false},title:{text:null},colors:b.chartColors,rangeSelector:{enabled:false},xAxis:{categories:q},yAxis:{min:e.MinHistoricalReturnValue,max:e.MaxHistoricalReturnValue,title:{text:null},labels:{formatter:function(){return f(this.value,0)}}},tooltip:{formatter:function(){var a=f(this.y,2),b=this.x+'<br/><span style="color:'+this.series.color+'">'+this.series.name+": </span><b>"+a+"</b>";return b}},series:o});a("#"+b.historicalGrowthAsOfId).html(e.EndDateDisplay);a("#"+b.dollarGrowthAsOfId).html(e.EndDateDisplay)},g=function(d){var a="$",c="";if(b.langOptions){a=b.langOptions.DollarAmountPrefix;c=b.langOptions.DollarAmountSuffix}return a+Highcharts.numberFormat(d,0,",")+c},f=function(b,a){return Highcharts.numberFormat(b,a)+" %"},h=function(){return{buttons:[{type:"all",text:"All"},{count:3,type:"month",text:"3m"},{count:6,type:"month",text:"6m"},{type:"ytd",text:"YTD"},{count:1,type:"year",text:"1y"},{count:3,type:"year",text:"3y"},{count:5,type:"year",text:"5y"}],inputEnabled:false,selected:0,buttonTheme:{style:{width:"100px"}}}},k=function(g){var d=false,c=false,e=g.attr("id")+"-perftooltip",f=null,h=function(h){g.append("<div id='"+e+"' style='display:none'>"+h.TooltipHtml+"</div>");f=a("#"+e).dialog({modal:true,width:940,height:375,resizable:false,draggable:false,title:h.TitleText,dialogClass:b.tooltipDialogCss,buttons:[{text:h.CloseWindowText,click:function(){a(this).dialog("close")}}]});d=true;c=false};a("."+b.tooltipCss).click(function(){if(!c)if(d)f.dialog("open");else{c=true;a.ajax({type:"POST",url:b.performanceAjaxUrl+"/GetTooltip",contentType:"application/json; charset=utf-8",dataType:"json",success:function(a){h(a.d)}})}})};return this.each(function(){var c=a(this);if(typeof Highcharts!=="undefined"){b.langOptions&&Highcharts.setOptions({lang:{thousandsSep:b.langOptions.ThousandsSeparator,decimalPoint:b.langOptions.DecimalPoint,months:b.langOptions.Months}});Highcharts.setOptions({chart:{style:{fontFamily:b.textFontFamily}}});b.currentFundSecurityId>0&&e();a("#"+b.benchmarkListId).change(function(){e()});k(c);a("."+b.fundSearchTextBoxCss).each(function(){var c=a(this);c.change(function(){e()});c.autocomplete({delay:500,minLength:2,source:function(f,e){var d=c.val();a.ajax({type:"POST",url:b.performanceAjaxUrl+"/GetFundSearchAutocompleteResults",data:JSON.stringify({text:d}),contentType:"application/json; charset=utf-8",dataType:"json",success:function(b){e(a.map(b.d,function(a){return{label:a.Ticker+" - "+a.Name,value:a.Ticker,id:a.SecurityId}}))}})},select:function(b,a){c.val(a.item.value);c.change();return a.item.value},focus:function(a){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault()}})})}})}})(jQuery);(function(a){var b=false,c=a("#footer_content").height();a("#footer_button").click(function(){var f=a(document).height(),e=a(window).height(),d=f-e+c;a("#footer_content").animate({height:"toggle"},1e3);if(b==false){if(a.browser.opera)a("html").animate({scrollTop:d+"px"},1e3);else a("html, body").animate({scrollTop:d+"px"},1e3);b=true}else b=false})})(jQuery);(function(a){a(document).ready(function(){var c=function(){var b=a(this).children("ul");b.css("visibility","visible")},b=function(){var b=a(this).children("ul");b.css("visibility","hidden")},d={interval:200,over:c,out:b};jQuery().hoverIntent&&a("#mainmenu ul.dropdown > li").each(function(){var b=a(this);b.hoverIntent(d)})})})(jQuery);(function(a){var b="CAAWindow";a.fn.clayAdvisorLoginLink=function(){var c=function(b,d){var c=b;if(d){var a=location.href;if(a.indexOf("http://")>=0){var h=a.indexOf("/",0),e=a.indexOf("/",h+1),f=a.indexOf("/",e+1);if(f>0){var g=a.substring(e+1,f);c=(d?"https":"http")+"://"+g+b}}}return c};return this.each(function(){var d=a(this);d.click(function(f){var e=d.attr("uhttps"),a=c(d.attr("href"),e=="true");window.open(a,b);f.preventDefault();return false})})};a.fn.clayAdvisorLogoutLink=function(b){var c={logoutUrl:"/common/aspx/AdvisorLogout.aspx"},b=a.extend(c,b);return this.each(function(){var c=a(this);c.click(function(a){location.href=b.logoutUrl;a.preventDefault();return false})})};a.fn.clayAdvisorMicrositeLogoutLink=function(b){var c={logoutUrl:"/common/aspx/AdvisorLogout.aspx"},b=a.extend(c,b);return this.each(function(){var c=a(this);c.click(function(){a("<div />").html("Logging out...").dialog({modal:true});a.ajax({url:b.logoutUrl,data:"doRedirect=false",success:function(){window.close()}})})})};a.fn.clayAdvisorNewWindowLink=function(){return this.each(function(){var c=a(this);c.click(function(a){window.open(c.attr("href"),b);a.preventDefault();return false})})};a.fn.clayAdvisorRegisterButton=function(b){var c={agreeCheckBoxId:"chkAgree",agreeWarningId:"spanAgree"},b=a.extend(c,b);return this.each(function(){var c=a(this);c.click(function(d){var c=a("#"+b.agreeWarningId);if(a("#"+b.agreeCheckBoxId).is(":checked")){c.hide();return true}else{c.show();d.preventDefault();return false}})})};a("#lnkAdvisorStatus__Login").clayAdvisorLoginLink();a("#lnkAdvisorStatus__Logout").clayAdvisorLogoutLink();a("#lnkAdvisorStatus__LogoutMicrosite").clayAdvisorMicrositeLogoutLink();a("#lnkAdvisorStatus__BackToHome").clayAdvisorNewWindowLink();a("#lnkAdvisorStatus__Profile").clayAdvisorNewWindowLink();a("#lnkAdvisorStatus__Register").clayAdvisorNewWindowLink()})(jQuery);(function(a){a.fn.claySearchBox=function(b){var c={NoInputWarning:"Please input text into the Search box",SearchResultsUrl:"/search-results",SearchParameter:"s",SiteSearchServiceUrl:"/WebService/SiteSearchService.asmx/GetAutoCompleteResults"},b=a.extend(c,b);return this.each(function(){var c=a(this),d=c.val(),e=function(){var e=c.val();if(e===""||e===d||a.trim(e).length==0)alert(b.NoInputWarning);else location.href=b.SearchResultsUrl+"?"+b.SearchParameter+"="+escape(e)};c.focus(function(){if(c.val()===d){c.css("color","#000000");c.val("")}});c.blur(function(){if(c.val()===""){c.val(d);c.css("color","#999999")}});c.keypress(function(a){var b=a.keyCode?a.keyCode:a.which;if(b===13){e();a.preventDefault();return false}});jQuery().autocomplete&&c.autocomplete({source:function(f,e){var d=c.val();if(d.length>0&&d.indexOf(" ")<0)a.ajax({type:"POST",url:b.SiteSearchServiceUrl,data:'{text: "'+d+'"}',contentType:"application/json; charset=utf-8",dataType:"json",success:function(a){e(a.d)}});else e([])},select:function(b,a){if(a.item.value.length>0){c.val(a.item.value);e()}},focus:function(a){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault()}})})}})(jQuery);if(!this.JSON)this.JSON={};(function(){function c(a){return a<10?"0"+a:a}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+c(this.getUTCMonth()+1)+"-"+c(this.getUTCDate())+"T"+c(this.getUTCHours())+":"+c(this.getUTCMinutes())+":"+c(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var h=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a,d,i={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},b;function g(a){f.lastIndex=0;return f.test(a)?'"'+a.replace(f,function(a){var b=i[a];return typeof b==="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function e(m,n){var i,j,h,k,l=a,f,c=n[m];if(c&&typeof c==="object"&&typeof c.toJSON==="function")c=c.toJSON(m);if(typeof b==="function")c=b.call(n,m,c);switch(typeof c){case"string":return g(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";a+=d;f=[];if(Object.prototype.toString.apply(c)==="[object Array]"){k=c.length;for(i=0;i<k;i+=1)f[i]=e(i,c)||"null";h=f.length===0?"[]":a?"[\n"+a+f.join(",\n"+a)+"\n"+l+"]":"["+f.join(",")+"]";a=l;return h}if(b&&typeof b==="object"){k=b.length;for(i=0;i<k;i+=1){j=b[i];if(typeof j==="string"){h=e(j,c);h&&f.push(g(j)+(a?": ":":")+h)}}}else for(j in c)if(Object.hasOwnProperty.call(c,j)){h=e(j,c);h&&f.push(g(j)+(a?": ":":")+h)}h=f.length===0?"{}":a?"{\n"+a+f.join(",\n"+a)+"\n"+l+"}":"{"+f.join(",")+"}";a=l;return h}}if(typeof JSON.stringify!=="function")JSON.stringify=function(h,c,f){var g;a="";d="";if(typeof f==="number")for(g=0;g<f;g+=1)d+=" ";else if(typeof f==="string")d=f;b=c;if(c&&typeof c!=="function"&&(typeof c!=="object"||typeof c.length!=="number"))throw new Error("JSON.stringify");return e("",{"":h})};if(typeof JSON.parse!=="function")JSON.parse=function(a,c){var b;function d(f,g){var b,e,a=f[g];if(a&&typeof a==="object")for(b in a)if(Object.hasOwnProperty.call(a,b)){e=d(a,b);if(e!==undefined)a[b]=e;else delete a[b]}return c.call(f,g,a)}a=String(a);h.lastIndex=0;if(h.test(a))a=a.replace(h,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){b=eval("("+a+")");return typeof c==="function"?d({"":b},""):b}throw new SyntaxError("JSON.parse");}})();(function(a){a.fn.easyTooltip=function(b){var d={xOffset:10,yOffset:25,tooltipId:"easyTooltip",clickRemove:false,content:"",useElement:"",tooltipCssClass:"clayEasyTooltip"},b=a.extend(d,b),c;this.each(function(){var d=a(this).attr("title");a(this).hover(function(e){c=b.content!=""?b.content:d;c=b.useElement!=""?a("#"+b.useElement).html():c;a(this).attr("title","");if(c!=""&&c!=undefined){a("body").append("<div id='"+b.tooltipId+"' class='"+b.tooltipCssClass+"'>"+c+"</div>");a("#"+b.tooltipId).css("position","absolute").css("top",e.pageY-b.yOffset+"px").css("left",e.pageX+b.xOffset+"px").css("display","none").fadeIn("fast")}},function(){a("#"+b.tooltipId).remove();a(this).attr("title",d)});a(this).mousemove(function(c){a("#"+b.tooltipId).css("top",c.pageY-b.yOffset+"px").css("left",c.pageX+b.xOffset+"px")});b.clickRemove&&a(this).mousedown(function(){a("#"+b.tooltipId).remove();a(this).attr("title",d)})})}})(jQuery);(function(a){var c=a.browser.msie&&parseInt(a.browser.version)===6&&typeof window.XMLHttpRequest!=="object",e=a.browser.msie&&parseInt(a.browser.version)===7,d=null,b=[];a.modal=function(b,c){return a.modal.impl.init(b,c)};a.modal.close=function(){a.modal.impl.close()};a.modal.focus=function(b){a.modal.impl.focus(b)};a.modal.setContainerDimensions=function(){a.modal.impl.setContainerDimensions()};a.modal.setPosition=function(){a.modal.impl.setPosition()};a.modal.update=function(b,c){a.modal.impl.update(b,c)};a.fn.modal=function(b){return a.modal.impl.init(this,b)};a.modal.defaults={appendTo:"body",focus:true,opacity:50,overlayId:"simplemodal-overlay",overlayCss:{},containerId:"simplemodal-container",containerCss:{},dataId:"simplemodal-data",dataCss:{},minHeight:null,minWidth:null,maxHeight:null,maxWidth:null,autoResize:false,autoPosition:true,zIndex:1e3,close:true,closeHTML:'<a class="modalCloseImg" title="Close"></a>',closeClass:"simplemodal-close",escClose:true,overlayClose:false,position:null,persist:false,modal:true,onOpen:null,onShow:null,onClose:null};a.modal.impl={d:{},init:function(c,e){var b=this;if(b.d.data)return false;d=a.browser.msie&&!a.boxModel;b.o=a.extend({},a.modal.defaults,e);b.zIndex=b.o.zIndex;b.occb=false;if(typeof c==="object"){c=c instanceof jQuery?c:a(c);b.d.placeholder=false;if(c.parent().parent().size()>0){c.before(a("<span></span>").attr("id","simplemodal-placeholder").css({display:"none"}));b.d.placeholder=true;b.display=c.css("display");if(!b.o.persist)b.d.orig=c.clone(true)}}else if(typeof c==="string"||typeof c==="number")c=a("<div></div>").html(c);else{alert("SimpleModal Error: Unsupported data type: "+typeof c);return b}b.create(c);b.open();a.isFunction(b.o.onShow)&&b.o.onShow.apply(b,[b.d]);return b},create:function(f){var e=this;b=e.getDimensions();if(e.o.modal&&c)e.d.iframe=a('<iframe src="javascript:false;"></iframe>').css(a.extend(e.o.iframeCss,{display:"none",opacity:0,position:"fixed",height:b[0],width:b[1],zIndex:e.o.zIndex,top:0,left:0})).appendTo(e.o.appendTo);e.d.overlay=a("<div></div>").attr("id",e.o.overlayId).addClass("simplemodal-overlay").css(a.extend(e.o.overlayCss,{display:"none",opacity:e.o.opacity/100,height:e.o.modal?b[0]:0,width:e.o.modal?b[1]:0,position:"fixed",left:0,top:0,zIndex:e.o.zIndex+1})).appendTo(e.o.appendTo);e.d.container=a("<div></div>").attr("id",e.o.containerId).addClass("simplemodal-container").css(a.extend(e.o.containerCss,{display:"none",position:"fixed",zIndex:e.o.zIndex+2})).append(e.o.close&&e.o.closeHTML?a(e.o.closeHTML).addClass(e.o.closeClass):"").appendTo(e.o.appendTo);e.d.wrap=a("<div></div>").attr("tabIndex",-1).addClass("simplemodal-wrap").css({height:"100%",outline:0,width:"100%"}).appendTo(e.d.container);e.d.data=f.attr("id",f.attr("id")||e.o.dataId).addClass("simplemodal-data").css(a.extend(e.o.dataCss,{display:"none"})).appendTo("body");e.setContainerDimensions();e.d.data.appendTo(e.d.wrap);(c||d)&&e.fixIE()},bindEvents:function(){var e=this;a("."+e.o.closeClass).bind("click.simplemodal",function(a){a.preventDefault();e.close()});e.o.modal&&e.o.close&&e.o.overlayClose&&e.d.overlay.bind("click.simplemodal",function(a){a.preventDefault();e.close()});a(document).bind("keydown.simplemodal",function(a){if(e.o.modal&&a.keyCode===9)e.watchTab(a);else if(e.o.close&&e.o.escClose&&a.keyCode===27){a.preventDefault();e.close()}});a(window).bind("resize.simplemodal",function(){b=e.getDimensions();e.o.autoResize?e.setContainerDimensions():e.o.autoPosition&&e.setPosition();if(c||d)e.fixIE();else if(e.o.modal){e.d.iframe&&e.d.iframe.css({height:b[0],width:b[1]});e.d.overlay.css({height:b[0],width:b[1]})}})},unbindEvents:function(){a("."+this.o.closeClass).unbind("click.simplemodal");a(document).unbind("keydown.simplemodal");a(window).unbind("resize.simplemodal");this.d.overlay.unbind("click.simplemodal")},fixIE:function(){var c=this,b=c.o.position;a.each([c.d.iframe||null,!c.o.modal?null:c.d.overlay,c.d.container],function(c,e){if(e){var a=e[0].style;a.position="absolute";if(c<2){a.removeExpression("height");a.removeExpression("width");a.setExpression("height",'document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight + "px"');a.setExpression("width",'document.body.scrollWidth > document.body.clientWidth ? document.body.scrollWidth : document.body.clientWidth + "px"')}else{var d;if(b&&b.constructor===Array){c=b[0]?typeof b[0]==="number"?b[0].toString():b[0].replace(/px/,""):e.css("top").replace(/px/,"");c=c.indexOf("%")===-1?c+' + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"':parseInt(c.replace(/%/,""))+' * ((document.documentElement.clientHeight || document.body.clientHeight) / 100) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"';if(b[1]){d=typeof b[1]==="number"?b[1].toString():b[1].replace(/px/,"");d=d.indexOf("%")===-1?d+' + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"':parseInt(d.replace(/%/,""))+' * ((document.documentElement.clientWidth || document.body.clientWidth) / 100) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"'}}else{c='(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"';d='(document.documentElement.clientWidth || document.body.clientWidth) / 2 - (this.offsetWidth / 2) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"'}a.removeExpression("top");a.removeExpression("left");a.setExpression("top",c);a.setExpression("left",d)}}})},focus:function(b){var c=this;b=b&&a.inArray(b,["first","last"])!==-1?b:"first";var d=a(":input:enabled:visible:"+b,c.d.wrap);setTimeout(function(){d.length>0?d.focus():c.d.wrap.focus()},10)},getDimensions:function(){var b=a(window);return[a.browser.opera&&a.browser.version>"9.5"&&a.fn.jquery<"1.3"||a.browser.opera&&a.browser.version<"9.5"&&a.fn.jquery>"1.2.6"?b[0].innerHeight:b.height(),b.width()]},getVal:function(a,c){return a?typeof a==="number"?a:a==="auto"?0:a.indexOf("%")>0?parseInt(a.replace(/%/,""))/100*(c==="h"?b[0]:b[1]):parseInt(a.replace(/px/,"")):null},update:function(b,c){var a=this;if(!a.d.data)return false;a.d.origHeight=a.getVal(b,"h");a.d.origWidth=a.getVal(c,"w");a.d.data.hide();b&&a.d.container.css("height",b);c&&a.d.container.css("width",c);a.setContainerDimensions();a.d.data.show();a.o.focus&&a.focus();a.unbindEvents();a.bindEvents()},setContainerDimensions:function(){var d=this,g=c||e,h=d.d.origHeight?d.d.origHeight:a.browser.opera?d.d.container.height():d.getVal(g?d.d.container[0].currentStyle.height:d.d.container.css("height"),"h");g=d.d.origWidth?d.d.origWidth:a.browser.opera?d.d.container.width():d.getVal(g?d.d.container[0].currentStyle.width:d.d.container.css("width"),"w");var l=d.d.data.outerHeight(true),k=d.d.data.outerWidth(true);d.d.origHeight=d.d.origHeight||h;d.d.origWidth=d.d.origWidth||g;var f=d.o.maxHeight?d.getVal(d.o.maxHeight,"h"):null,i=d.o.maxWidth?d.getVal(d.o.maxWidth,"w"):null;f=f&&f<b[0]?f:b[0];i=i&&i<b[1]?i:b[1];var j=d.o.minHeight?d.getVal(d.o.minHeight,"h"):"auto";h=h?d.o.autoResize&&h>f?f:h<j?j:h:l?l>f?f:d.o.minHeight&&j!=="auto"&&l<j?j:l:j;f=d.o.minWidth?d.getVal(d.o.minWidth,"w"):"auto";g=g?d.o.autoResize&&g>i?i:g<f?f:g:k?k>i?i:d.o.minWidth&&f!=="auto"&&k<f?f:k:f;d.d.container.css({height:h,width:g});d.d.wrap.css({overflow:l>h||k>g?"auto":"visible"});d.o.autoPosition&&d.setPosition()},setPosition:function(){var a=this,c,d;c=b[0]/2-a.d.container.outerHeight(true)/2;d=b[1]/2-a.d.container.outerWidth(true)/2;if(a.o.position&&Object.prototype.toString.call(a.o.position)==="[object Array]"){c=a.o.position[0]||c;d=a.o.position[1]||d}else{c=c;d=d}a.d.container.css({left:d,top:c})},watchTab:function(b){var c=this;if(a(b.target).parents(".simplemodal-container").length>0){c.inputs=a(":input:enabled:visible:first, :input:enabled:visible:last",c.d.data[0]);if(!b.shiftKey&&b.target===c.inputs[c.inputs.length-1]||b.shiftKey&&b.target===c.inputs[0]||c.inputs.length===0){b.preventDefault();c.focus(b.shiftKey?"last":"first")}}else{b.preventDefault();c.focus()}},open:function(){var b=this;b.d.iframe&&b.d.iframe.show();if(a.isFunction(b.o.onOpen))b.o.onOpen.apply(b,[b.d]);else{b.d.overlay.show();b.d.container.show();b.d.data.show()}b.o.focus&&b.focus();b.bindEvents()},close:function(){var b=this;if(!b.d.data)return false;b.unbindEvents();if(a.isFunction(b.o.onClose)&&!b.occb){b.occb=true;b.o.onClose.apply(b,[b.d])}else{if(b.d.placeholder){var c=a("#simplemodal-placeholder");if(b.o.persist)c.replaceWith(b.d.data.removeClass("simplemodal-data").css("display",b.display));else{b.d.data.hide().remove();c.replaceWith(b.d.orig)}}else b.d.data.hide().remove();b.d.container.hide().remove();b.d.overlay.hide();b.d.iframe&&b.d.iframe.hide().remove();setTimeout(function(){b.d.overlay.remove();b.d={}},10)}}}})(jQuery);(function(a){a.fn.clayLanguageSelector=function(){return this.each(function(){var b=a(this);b.change(function(){var a=b.children("option:selected").attr("url");if(a){b.attr("disabled","disabled");document.location.href=a}})})}})(jQuery);(function(a){a.fn.hoverIntent=function(j,k){var b={sensitivity:7,interval:100,timeout:0};b=a.extend(b,k?{over:j,out:k}:j);var d,e,f,g,c=function(a){d=a.pageX;e=a.pageY},i=function(j,h){h.hoverIntent_t=clearTimeout(h.hoverIntent_t);if(Math.abs(f-d)+Math.abs(g-e)<b.sensitivity){a(h).unbind("mousemove",c);h.hoverIntent_s=1;return b.over.apply(h,[j])}else{f=d;g=e;h.hoverIntent_t=setTimeout(function(){i(j,h)},b.interval)}},l=function(c,a){a.hoverIntent_t=clearTimeout(a.hoverIntent_t);a.hoverIntent_s=0;return b.out.apply(a,[c])},h=function(e){var h=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(h&&h!=this)try{h=h.parentNode}catch(e){h=this}if(h==this)return false;var j=jQuery.extend({},e),d=this;if(d.hoverIntent_t)d.hoverIntent_t=clearTimeout(d.hoverIntent_t);if(e.type=="mouseover"){f=j.pageX;g=j.pageY;a(d).bind("mousemove",c);if(d.hoverIntent_s!=1)d.hoverIntent_t=setTimeout(function(){i(j,d)},b.interval)}else{a(d).unbind("mousemove",c);if(d.hoverIntent_s==1)d.hoverIntent_t=setTimeout(function(){l(j,d)},b.timeout)}};return this.mouseover(h).mouseout(h)}})(jQuery);
