$(document).ready(function(){$("div[class^='but']").hover(function(){if($(this).attr("class").indexOf("disabled")==-1){var bt_bg=$(this).children(".bdy");var bt_end=$(this).children(".end");if($(this).hasClass('sml')){var bt_bg_img=bt_bg.css({backgroundPosition:'0px -28px'});var bt_end_img=bt_end.css({backgroundPosition:'0px -28px'});}else{var bt_bg_img=bt_bg.css({backgroundPosition:'0px -34px'});var bt_end_img=bt_end.css({backgroundPosition:'0px -34px'});}}},function(){if($(this).attr("class").indexOf("disabled")==-1){var bt_bg=$(this).children(".bdy");var bt_end=$(this).children(".end");var bt_bg_img=bt_bg.css({backgroundPosition:'0px 0px'});var bt_end_img=bt_end.css({backgroundPosition:'0px 0px'});}});$("div[class^='but']").each(function(){if($(this).attr("class").indexOf("disabled")==-1){$(this).css("cursor","pointer");}});if($.browser.safari){$("div[class^='but'][class*='sml'] input").removeClass('label').addClass('labelSafari');}var dl_Timeout=10000,dl_Timer,dl_Counter=0,dl_Array=new Array();var dl_Length=$('.dynamic_list').children("li").size();$('.dynamic_list li').each(function(i){dl_Array.push(this);if(dl_Counter!=(dl_Length-1)){dl_Counter++;}else{dl_Counter=0;$('.dynamic_list li:first').addClass("active");$('.dynamic_list .active p').slideDown("slow",function(){var theNewsImage=$(this).parents(".active").attr("image");var updImg=new Image();$(updImg).load(function(){$('.latest_news_img').empty().append(this).animate({"opacity":"1"},500);}).error(function(){}).attr('src',theNewsImage);});}});if(dl_Length>1){dl_Timer=setInterval(animate_dl,dl_Timeout);}function animate_dl(){if(dl_Counter!=(dl_Length-1)){dl_Counter++;}else{dl_Counter=0;}var thisItem=$('.dynamic_list .active:first p');var nextItem=$('.dynamic_list .active:first').next().children("p");$('.latest_news_img').animate({"opacity":"0"},500);thisItem.slideUp("slow",function(){$(dl_Array[dl_Counter]).addClass("active");$(this).parents("li").removeClass("active");$('.dynamic_list .active p').slideDown("slow",function(){var nextNewsImage=$(this).parents("li").attr("image");var updImg=new Image();$(updImg).load(function(){$('.latest_news_img').empty().append(this);$('.latest_news_img').animate({"opacity":"1"},500);}).error(function(){}).attr('src',nextNewsImage);});});}$('.ta_page .portal .primary .module_categories .main .categories li[class^="active"]').css({cursor:"pointer"});$('.ta_page .portal .primary .module_categories .main .categories li[class^="active"]').hover(function(){var cat_description=$(this).children('.frame_overlay').attr("alt");var frm_ovly=$(this).children('.frame_overlay');var frm_hvr_img="url(../Skin/images/default/modules/cat_select.png)";frm_ovly.css({backgroundImage:frm_hvr_img}).ifixpng();if(($.browser.msie)&&(parseInt($.browser.version)==6)){$(this).css({backgroundImage:"url(../Skin/images/default/modules/cat_select_hov.gif)",color:"#ffffff"});}else{$(this).css({backgroundImage:"url(../Skin/images/default/modules/cat_select_hov.png)",color:"#ffffff"});}},function(){$(this).css({backgroundImage:"none",color:"#ded9c2"});var frm_ovly=$(this).children('.frame_overlay');var frm_hvr_img="none";frm_ovly.css({backgroundImage:frm_hvr_img});});$('.xlink').each(function(i){var thislink=$(this);var theuri=thislink.attr("href");var altmsg=thislink.text();thislink.before('<img class="xlink_img" src="images/default/xlink.gif" width="12" height="12" alt="'+altmsg+' " />');thislink.prev('.xlink_img').css({paddingRight:'4px',cursor:'pointer'});thislink.prev('.xlink_img').hover(function(){window.status=theuri;},function(){});thislink.hover(function(){},function(){});thislink.prev('.xlink_img').click(function(){window.location=theuri;});});$('.favourites').click(function(){var fav_pos=$(this).position();var fav_margin=parseInt($(this).css("margin-top"));var fav_x=(fav_pos.left+$(this).width())-($('#favourites').width()+14);var fav_y=((fav_pos.top+$(this).height())-2)+fav_margin;$('#favourites').css({top:fav_y,left:fav_x});$('#favourites').fadeIn("slow");$(this).attr("class","favourites favon");});$('#favourites').hover(function(){var nullObject=null;},function(){$(this).fadeOut("fast");$('.favourites').attr("class","favourites");});$('.socialNet_links img').mouseover(function(){$(this).addClass('arrow');var altTXT=$(this).attr('hoverText');$(this).parent('.socialNet_links').children('.addrLink').html(altTXT);}).mouseout(function(){$(this).removeClass('arrow');$(this).parent('.socialNet_links').children('.addrLink').empty();});$('.fit_show_bio').click(function(){var left_arrow="link_arr_lft";var down_arrow="link_arr_dwn";var currImg=$(this).css("background-image").split("/");var currImgName=currImg[currImg.length-1].split(".");var newImg;if(currImgName[0]==left_arrow){newImg=$(this).css("background-image").replace(left_arrow,down_arrow);$(this).css({backgroundImage:newImg,marginRight:"36px"});}else if(currImgName[0]==down_arrow){newImg=$(this).css("background-image").replace(down_arrow,left_arrow);$(this).css({backgroundImage:newImg,marginRight:"0px"});}$(this).parents('.fit_opts').next('.fit_bio').slideToggle("slow");});$("ul.nav_list li:has(ul)").addClass('hasChildClosed').children('ul').hide();$("ul.nav_list li:has(ul)").each(function(){if(($(this).children('a').attr('href').indexOf('#')==-1)){}else{$(this).children('a').attr('href','javascript:void(0);').click(function(){$(this).parent('li').children('ul').addClass('doNotClose');$("ul.nav_list li:has(ul)").each(function(){if($(this).children('ul').hasClass('doNotClose')==false){}else{$(this).children('ul').removeClass('doNotClose')}});$(this).parent('li').children('ul').slideToggle(300);$(this).blur();});}if($(this).children('a').hasClass('openGroup')){$(this).children('ul').slideToggle(300);}});function openFirstPanel(){var panel=$('.collapse:first');var arrImg;panel.children('.main').slideToggle("slow");}$('.collapse .head').click(function(){var arrImg;if($(this).children('img').length>0){arrImg=$(this).children('img').css("background-image");if($(this).next('.main').css("display")=="none"){arrImg=arrImg.replace("clps_arr_rt","clps_arr_dn");}else{arrImg=arrImg.replace("clps_arr_dn","clps_arr_rt");}$(this).children('img').css({backgroundImage:arrImg});}$(this).next('.main').slideToggle("slow",function(){sIFR.replace(Sans_SLT,{selector:'.specialist .primary .article .main .col_hd h4, .premier .primary .article .main .col_hd h4',wmode:'transparent',css:['.sIFR-root { text-align: left; color:#003366; kerning: true; letter-spacing: -0.5; font-size: 18px; }']});});});$('.agentsOnlineLink').append('<hr class="jkl"></div>');$('.agentsOnlineLink hr.jkl').addClass('clr');$('.agentsOnlineLink hr.jkl').addClass('clr micro');var barWidthCent=parseInt($('.ta_page .module .primary .main .mod_score strong').html());var barColour;switch(true){case barWidthCent<20:barColour="red";break;case(barWidthCent>=20)&&(barWidthCent<50):barColour="amb";break;case(barWidthCent>=50)&&(barWidthCent<85):barColour="yel";break;case barWidthCent>=85:barColour="grn";break;}var cItems=$('.ta_page .primary .myMods-bounds .myMods-modSel .myMods-modList .myMods-Module').length;var cItemWidth=152;var cVisible=4;var cTrack=cVisible;var barHandle=$('.ta_page .primary .myMods-bounds .myMods-modSel .myMods-modList .myMods-barHandle');var barSingle=barHandle.width()/cItems;$('.ta_page .primary .myMods-bounds .myMods-modSel .myMods-modList .myMods-mods').width(cItemWidth*cItems);if(cItems>cVisible){$(barHandle).width(barHandle.width()-(barSingle*(cItems-cVisible)));}if(cItems<=cVisible){$('.ta_page .primary .myMods-bounds .myMods-modSel .myMods-pushLeft a').css({backgroundPosition:'-40px 0px'});$('.ta_page .primary .myMods-bounds .myMods-modSel .myMods-pushRight a').css({backgroundPosition:'-40px 0px'});}if(cItems>cVisible){$('.ta_page .primary .myMods-bounds .myMods-modSel .myMods-pushLeft a').css({backgroundPosition:'-40px 0px'});}$('.ta_page .primary .myMods-bounds .myMods-modSel .myMods-pushRight a').click(function(){carouselUpd('RT');$(this).blur();}).attr('href','javascript:void(0);');$('.ta_page .primary .myMods-bounds .myMods-modSel .myMods-pushLeft a').click(function(){carouselUpd('LT');$(this).blur();}).attr('href','javascript:void(0);');function carouselUpd(dir){if((dir=='RT')&&(cTrack<cItems)){cTrack=cTrack+1;}else if((dir=='LT')&&(cTrack>cVisible)){cTrack=cTrack-1;}var rePosX=(cVisible-cTrack)*cItemWidth;var rePosHandle=(cTrack-cVisible)*barSingle;$(barHandle).animate({left:rePosHandle+"px"},400);$('.ta_page .primary .myMods-bounds .myMods-modSel .myMods-modList .myMods-mods').animate({left:rePosX+"px"},400,function(){if(cTrack==cItems){$('.ta_page .primary .myMods-bounds .myMods-modSel .myMods-pushRight a').css({backgroundPosition:'-40px 0px'});}else{$('.ta_page .primary .myMods-bounds .myMods-modSel .myMods-pushRight a').css({backgroundPosition:'0px 0px'});}if(cTrack==cVisible){$('.ta_page .primary .myMods-bounds .myMods-modSel .myMods-pushLeft a').css({backgroundPosition:'-40px 0px'});}else{$('.ta_page .primary .myMods-bounds .myMods-modSel .myMods-pushLeft a').css({backgroundPosition:'0px 0px'});}});}myModsHover();var barBgImg="url(/Skin/images/default/modules/mod_score_bar_"+barColour+".gif)";$('.ta_page .module .primary .main .mod_score .msbar .bar').css({backgroundImage:barBgImg,width:barWidthCent+"%"});updateRoo();});function update_sIFR_mods(theStr){var sIFRLen=sIFR.replacements.length;var flagSIFR=false;var i=0;var theElID=$('.ta_page .primary .myMods-bounds .myMods-modInfo .myMods-modIntro h5 *').eq(0).attr('id');do{if(sIFR.replacements[i].id==theElID){sIFR.replacements[i].replaceText(theStr);flagSIFR=true;}i++;}while((flagSIFR==false)||(i<sIFRLen));}function myModsRemoveHover(){$(".ta_page .primary .myMods-bounds .myMods-modSel .myMods-modList .myMods-Module:not(.current-Mod) input").unbind('mouseenter mouseleave');}function myModsHover(){if(($.browser.msie)&&(parseInt($.browser.version.substr(0,1))<="6")){$('.trainee .primary .myMods-bounds .myMods-modSel .myMods-modList .myMods-Module:not(.current-Mod) input').hover(function(){$(this).parent('.myMods-Module:not(.current-Mod)').css({backgroundColor:'#894040'});},function(){$(this).parent('.myMods-Module:not(.current-Mod)').css({backgroundColor:'transparent'});});$('.specialist .primary .myMods-bounds .myMods-modSel .myMods-modList .myMods-Module:not(.current-Mod) input').hover(function(){$(this).parent('.myMods-Module:not(.current-Mod)').css({backgroundColor:'#37a4ca'});},function(){$(this).parent('.myMods-Module:not(.current-Mod)').css({backgroundColor:'transparent'});});$('.premier .primary .myMods-bounds .myMods-modSel .myMods-modList .myMods-Module:not(.current-Mod) input').hover(function(){$(this).parent('.myMods-Module:not(.current-Mod)').css({backgroundColor:'#40658b'});},function(){$(this).parent('.myMods-Module:not(.current-Mod)').css({backgroundColor:'transparent'});});}else{$('.ta_page .primary .myMods-bounds .myMods-modSel .myMods-modList .myMods-Module:not(.current-Mod) input').hover(function(){$(this).prev('div.Module-frame').css({backgroundPosition:'-146px 0px'}).nextAll('span').css({opacity:'1'});},function(){$(this).prev('div.Module-frame').css({backgroundPosition:'0px 0px'}).nextAll('span').css({opacity:'0.7'});});}}function postbackPNGfix(){$('.agents_online .agentsOnlineLink img').ifixpng();}function updateRoo(){var theRoo=$(".ta_page .module .primary .article .head .progress .roo, .ta_page .primary .myMods-bounds .myMods-activity .myMods-activity-progress .roo");var theBar=$(".ta_page .module .primary .article .head .progress .bar, .ta_page .primary .myMods-bounds .myMods-activity .myMods-activity-progress .bar");var rooXpos=(parseInt(theBar.width())-(parseInt(theRoo.width())/2))-3;theRoo.css({left:rooXpos.toString()+"px"});}