;_g.namespace("_s.imonster").userWidget={IsAdShow:"False",channelID:null,userState:true,widgetAttrids:{closed:"1",edit:"2"},widgetID:null,allWidgets:{profile:"1",careergoals:"2",resumes:"3",recommendedjobs:"4",savedsearches:"5",recentactivity:"6",savedjobslist:"7",applyhistorylist:"8",topcompanies:"9",topindustries:"10",jobprofiles:"11",savedcompanies:"12",benchmark:"13",reccareerpath:"14"},widgetChannel:{US:58},donotDisplayWidgets:null,wdgAvailOnWdgWellPage:0,sortedList:true,sortableCols:null,setCookieNames:null,setCookieExpiry:7,wdgListGroup:new Array(),doRedirect:function(){window.location.reload(true);},addWidget:function(e){if(_g.security.getUserLevel()=='3'){_s.imonster.userWidget.widgetID=$(this).attr("id");_s.services.post("ImonsterWidgets/AddWidget",{'widgetID':$(this).attr("id")},_s.imonster.userWidget.addWidgetSuccess);}
else{_g.security.call(_g.security.level.high,function(){});}},addWidgetSuccess:function(result){$("#"+_s.imonster.userWidget.widgetID).unbind('mousedown',_s.imonster.userWidget.addWidget).text(IMonsterMesasges.widgetAdded);$('#confirmDialog').modal({width:350,persist:false,onOpen:function(modal){modal.overlay.fadeIn('slow');modal.data.show();modal.container.fadeIn('slow');$('#confirmHeading').text(IMonsterMesasges.addWidgetConfirmMessage);if(result.Status!=-1)
$('#confirmText').text(IMonsterMesasges.addWidgetMessage);else{$('#confirmText').text(result.Message);$('a.globalButton.gbGreenButton').bind('mousedown',_s.imonster.userWidget.addWidget);}
$('#'+idMap.btOk).click(function(e){window.location.href='home.aspx';$.modal.close();});$('#'+idMap.btClose).click(function(e){var targetContent=$("#div"+_s.imonster.userWidget.widgetID);targetContent.slideUp(300);_s.imonster.userWidget.wdgAvailOnWdgWellPage--;if(_s.imonster.userWidget.wdgAvailOnWdgWellPage==0){$("#divNoWidgets").show();};$.modal.close();});}});},removeWidget:function(){var targetContent=$("#"+_s.imonster.userWidget.widgetID+" h1:first").html();$('#confirmDialog').modal({width:350,persist:true,onOpen:function(modal){modal.overlay.fadeIn('slow');modal.data.show();modal.container.fadeIn('slow');$('#confirmHeading').text(IMonsterMesasges.removeWidgetConfirmMessage);$('#confirmText').html(IMonsterMesasges.removeWidgetMessage+'<strong>'+targetContent+'</strong>');$('#'+idMap.btOk).click(function(e){_s.services.post("ImonsterWidgets/RemoveWidget",{'widgetID':_s.imonster.userWidget.widgetID},_s.imonster.userWidget.removeWidgetSuccess);$.modal.close();var wdgName=_s.imonster.userWidget.getWTWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.widgetID);var domain=window.location.host;dcsMultiTrack('DCS.dcsuri',domain+'_Widget.evt','DCSext.en',wdgName,'DCSext.k','D');});$('#'+idMap.btClose).click(function(e){$.modal.close();});}});},removeWidgetSuccess:function(result){$("#"+_s.imonster.userWidget.widgetID).slideUp(300);},removeWidgetFailure:function(result){},layoutModify:function(){_s.services.post("ImonsterWidgets/UpdateUserWidgetPositions",{},_s.imonster.userWidget.layoutModifySuccess);},layoutModifySuccess:function(result){},layoutModifyFailure:function(result)
{},getExcludeWidgetList:function(){_s.services.post("ImonsterWidgets/GetExcludeWidgetList",{},_s.imonster.userWidget.getExcludeWidgetListSuccess);},getExcludeWidgetListSuccess:function(result){if(result.Status!=-1){_s.imonster.userWidget.donotDisplayWidgets=result.ExcludeWidgetIDs;_s.imonster.userWidget.setWidgetLayoutCookies();_s.imonster.userWidget.widgetList();}
else{}},widgetList:function(){_s.services.post("ImonsterWidgets/GetUserWidgetList",{},_s.imonster.userWidget.isWidgetListSuccess);},isWidgetListSuccess:function(result){var wdgGroup=[];if(result.Status==0&&result.WidgetIdList!=""){var wids=result.WidgetIdList.split(",");for(var i=0;i<wids.length;i++){$("div#"+wids[i]).css("display","block");if($("div#"+wids[i]+" div.widgetContent").css("display").toUpperCase()=="NONE"){$("div#"+wids[i]+" a.closeEl").toggleClass("openEl");}
switch(wids[i]){case _s.imonster.userWidget.allWidgets.profile:if(_s.imonster.userWidget.widgetDoNotShow(_s.imonster.userWidget.allWidgets.profile)){_s.imonster.userWidget.wdgListGroup.push({"id":_s.imonster.userWidget.allWidgets.profile,"name":_s.imonster.userWidget.getWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.allWidgets.profile),"ctrlClientName":idMap.profileLoader,"props":_s.imonster.userWidget.getWdgProps(idMap.profileLoader)});}
break;case _s.imonster.userWidget.allWidgets.careergoals:if(_s.imonster.userWidget.widgetDoNotShow(_s.imonster.userWidget.allWidgets.careergoals)){_s.imonster.userWidget.wdgListGroup.push({"id":_s.imonster.userWidget.allWidgets.careergoals,"name":_s.imonster.userWidget.getWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.allWidgets.careergoals),"ctrlClientName":idMap.careerGoalsLoader,"props":_s.imonster.userWidget.getWdgProps(idMap.careerGoalsLoader)});}
break;case _s.imonster.userWidget.allWidgets.resumes:if(_s.imonster.userWidget.widgetDoNotShow(_s.imonster.userWidget.allWidgets.resumes)){_s.imonster.userWidget.wdgListGroup.push({"id":_s.imonster.userWidget.allWidgets.resumes,"name":_s.imonster.userWidget.getWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.allWidgets.resumes),"ctrlClientName":idMap.resumeLoader,"props":_s.imonster.userWidget.getWdgProps(idMap.resumeLoader)});}
break;case _s.imonster.userWidget.allWidgets.recommendedjobs:if(_s.imonster.userWidget.widgetDoNotShow(_s.imonster.userWidget.allWidgets.recommendedjobs)){_s.imonster.userWidget.wdgListGroup.push({"id":_s.imonster.userWidget.allWidgets.recommendedjobs,"name":_s.imonster.userWidget.getWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.allWidgets.recommendedjobs),"ctrlClientName":idMap.recJobsLoader,"props":_s.imonster.userWidget.getWdgProps(idMap.recJobsLoader)});}
break;case _s.imonster.userWidget.allWidgets.savedsearches:if(_s.imonster.userWidget.widgetDoNotShow(_s.imonster.userWidget.allWidgets.savedsearches)){_s.imonster.userWidget.wdgListGroup.push({"id":_s.imonster.userWidget.allWidgets.savedsearches,"name":_s.imonster.userWidget.getWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.allWidgets.savedsearches),"ctrlClientName":idMap.savedSearchesLoader,"props":_s.imonster.userWidget.getWdgProps(idMap.savedSearchesLoader)});}
break;case _s.imonster.userWidget.allWidgets.recentactivity:if(_s.imonster.userWidget.widgetDoNotShow(_s.imonster.userWidget.allWidgets.recentactivity)){_s.imonster.userWidget.wdgListGroup.push({"id":_s.imonster.userWidget.allWidgets.recentactivity,"name":_s.imonster.userWidget.getWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.allWidgets.recentactivity),"ctrlClientName":idMap.recentLoader,"props":_s.imonster.userWidget.getWdgProps(idMap.recentLoader)});}
break;case _s.imonster.userWidget.allWidgets.savedjobslist:if(_s.imonster.userWidget.widgetDoNotShow(_s.imonster.userWidget.allWidgets.savedjobslist)){_s.imonster.userWidget.wdgListGroup.push({"id":_s.imonster.userWidget.allWidgets.savedjobslist,"name":_s.imonster.userWidget.getWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.allWidgets.savedjobslist),"ctrlClientName":idMap.savedJobsLoader,"props":_s.imonster.userWidget.getWdgProps(idMap.savedJobsLoader)});}
break;case _s.imonster.userWidget.allWidgets.applyhistorylist:if(_s.imonster.userWidget.widgetDoNotShow(_s.imonster.userWidget.allWidgets.applyhistorylist)){_s.imonster.userWidget.wdgListGroup.push({"id":_s.imonster.userWidget.allWidgets.applyhistorylist,"name":_s.imonster.userWidget.getWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.allWidgets.applyhistorylist),"ctrlClientName":idMap.applyHistoryLoader,"props":_s.imonster.userWidget.getWdgProps(idMap.applyHistoryLoader)});}
break;case _s.imonster.userWidget.allWidgets.topcompanies:if(_s.imonster.userWidget.widgetDoNotShow(_s.imonster.userWidget.allWidgets.topcompanies)){_s.imonster.userWidget.wdgListGroup.push({"id":_s.imonster.userWidget.allWidgets.topcompanies,"name":_s.imonster.userWidget.getWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.allWidgets.topcompanies),"ctrlClientName":idMap.topCompaniesLoader,"props":_s.imonster.userWidget.getWdgProps(idMap.topCompaniesLoader)});}
break;case _s.imonster.userWidget.allWidgets.topindustries:if(_s.imonster.userWidget.widgetDoNotShow(_s.imonster.userWidget.allWidgets.topindustries)){_s.imonster.userWidget.wdgListGroup.push({"id":_s.imonster.userWidget.allWidgets.topindustries,"name":_s.imonster.userWidget.getWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.allWidgets.topindustries),"ctrlClientName":idMap.topIndusLoader,"props":_s.imonster.userWidget.getWdgProps(idMap.topIndusLoader)});}
break;case _s.imonster.userWidget.allWidgets.jobprofiles:if(_s.imonster.userWidget.widgetDoNotShow(_s.imonster.userWidget.allWidgets.jobprofiles)){_s.imonster.userWidget.wdgListGroup.push({"id":_s.imonster.userWidget.allWidgets.jobprofiles,"name":_s.imonster.userWidget.getWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.allWidgets.jobprofiles),"ctrlClientName":idMap.recOccuProfiles,"props":_s.imonster.userWidget.getWdgProps(idMap.recOccuProfiles)});}
break;case _s.imonster.userWidget.allWidgets.savedcompanies:if(_s.imonster.userWidget.widgetDoNotShow(_s.imonster.userWidget.allWidgets.savedcompanies)){_s.imonster.userWidget.wdgListGroup.push({"id":_s.imonster.userWidget.allWidgets.savedcompanies,"name":_s.imonster.userWidget.getWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.allWidgets.savedcompanies),"ctrlClientName":idMap.savedCompaniesLoader,"props":_s.imonster.userWidget.getWdgProps(idMap.savedCompaniesLoader)});}
break;case _s.imonster.userWidget.allWidgets.benchmark:if(_s.imonster.userWidget.widgetDoNotShow(_s.imonster.userWidget.allWidgets.benchmark)){_s.imonster.userWidget.wdgListGroup.push({"id":_s.imonster.userWidget.allWidgets.benchmark,"name":_s.imonster.userWidget.getWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.allWidgets.benchmark),"ctrlClientName":idMap.benchMarkLoader,"props":_s.imonster.userWidget.getWdgProps(idMap.benchMarkLoader)});}
break;case _s.imonster.userWidget.allWidgets.reccareerpath:if(_s.imonster.userWidget.widgetDoNotShow(_s.imonster.userWidget.allWidgets.reccareerpath)){_s.imonster.userWidget.wdgListGroup.push({"id":_s.imonster.userWidget.allWidgets.reccareerpath,"name":_s.imonster.userWidget.getWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.allWidgets.reccareerpath),"ctrlClientName":idMap.recCareerPathLoader,"props":_s.imonster.userWidget.getWdgProps(idMap.recCareerPathLoader)});}
break;default:break;}}
_s.imonster.userWidget.restoreSortableOrder();_s.imonster.userWidget.updateGroup(_s.imonster.userWidget.wdgListGroup);}
else{}},widgetDoNotShow:function(widgerID){if(_s.imonster.userWidget.donotDisplayWidgets!=null&&jQuery.inArray(widgerID.toString(),_s.imonster.userWidget.donotDisplayWidgets)!=-1){$('div[id$="'+widgerID+'"]:first').css("display","none");return false;}
return true;},userWidgetAttrUpdate:function(wdgAttrID,selected){_s.services.post("ImonsterWidgets/UpdateUserWidgetAttribute",{'wdgId':_s.imonster.userWidget.widgetID,'wdgAttrId':wdgAttrID,'collapsed':selected},_s.imonster.userWidget.userWidgetAttrUpdateSuccess);},userWidgetAttrUpdateSuccess:function(result){},userWidgetAttrUpdateFailure:function(result){},getUserWdgAttr:function(wdgID,wdgAttrID,oS,oF){if(oS==null)
oS=_s.imonster.userWidget.getUserWdgAttrSuccess;if(oF==null)
oF=_s.imonster.userWidget.getUserWdgAttrFailure;_s.services.post("ImonsterWidgets/GetUserWidgetAttribute",{'wdgId':wdgID,'wdgAttrId':wdgAttrID},oS,null,{error:oF});},getUserWdgAttrSuccess:function(result){},getUserWdgAttrFailure:function(result){},setWidgetLayoutCookies:function(){_s.services.post("ImonsterWidgets/GetUserWidgetPositions",{},_s.imonster.userWidget.getUserWidgetPositionsSuccess);},getUserWidgetPositionsSuccess:function(result){$.cookie(_s.imonster.userWidget.setCookieNames[0],result.LeftDisplay,{expires:_s.imonster.userWidget.setCookieExpiry,path:"/"});$.cookie(_s.imonster.userWidget.setCookieNames[1],result.CenterDisplay,{expires:_s.imonster.userWidget.setCookieExpiry,path:"/"});$.cookie(_s.imonster.userWidget.setCookieNames[2],result.RightDisplay,{expires:_s.imonster.userWidget.setCookieExpiry,path:"/"});},removeElement:function(e){if(_g.security.getUserLevel()=='3'){var targetContent=$(this.parentNode.parentNode.parentNode);_s.imonster.userWidget.getSortablesOrder();_s.imonster.userWidget.widgetID=$(targetContent).attr("id");_s.imonster.userWidget.removeWidget();return false;}
else{_g.security.call(_g.security.level.high,function(){});}},loginSuccess:function(e){_g.login.onSuccess().bind(function(){_g.security.call(_g.security.level.high,function(){_s.imonster.userWidget.doRedirect();});});},toggleContent:function(e){if(_g.security.getUserLevel()=='3'){var targetContent=$('div.widgetContent',this.parentNode.parentNode.parentNode);var targetContentFooter=$('div.widgetFooter',this.parentNode.parentNode.parentNode);var targetHader=$('div.widgetHeaderIcon',this.parentNode.parentNode.parentNode);var targerContentHeader=$('div.widgetHeader',this.parentNode.parentNode.parentNode);_s.imonster.userWidget.widgetID=$(this.parentNode.parentNode.parentNode).attr("id");var selected=(targetContent.css('display')=='none')?true:false;var wdgAttrid=1;_s.imonster.userWidget.userWidgetAttrUpdate(wdgAttrid,selected);if(targetContent.css('display')=='none'){targetContent.slideDown(300);targetContentFooter.slideDown(300);targerContentHeader.animate({height:"36px"},300);$(this).removeClass('openEl');$(this).addClass('closeEl');var wdgName=_s.imonster.userWidget.getWTWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.widgetID);var domain=window.location.host;dcsMultiTrack('DCS.dcsuri',domain+'_Widget.evt','DCSext.en',wdgName,'DCSext.k','Exp');}
else{targetContent.slideUp(300);targetContentFooter.slideUp(300);targerContentHeader.animate({height:"39px"},300);$(this).removeClass('closeEl');$(this).addClass('openEl');var wdgName=_s.imonster.userWidget.getWTWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.widgetID);var domain=window.location.host;dcsMultiTrack('DCS.dcsuri',domain+'_Widget.evt','DCSext.en',wdgName,'DCSext.k','Clps');}
return false;}
else{_g.security.call(_g.security.level.high,function(){});}},toggleEdit:function(e){if(_g.security.getUserLevel()=='3'){var targetContent=$('div.editWidget',this.parentNode.parentNode.parentNode);var largerTargetContent=$('div.widgetContent',this.parentNode.parentNode.parentNode);var largerTargetContentFooter=$('div.widgetFooter',this.parentNode.parentNode.parentNode);var largerTargetHader=$('div.widgetHeaderIcon',this.parentNode.parentNode.parentNode);var largerTargetContentHeader=$('div.widgetHeader',this.parentNode.parentNode.parentNode);_s.imonster.userWidget.widgetID=$(this.parentNode.parentNode.parentNode).attr("id");if(targetContent.css('display')=='none'){if(largerTargetContent.css('display')=='none'){largerTargetContent.slideDown(300);largerTargetContentFooter.slideDown(300);largerTargetContentHeader.animate({height:"36px"},300);$(this).siblings('.openEl').addClass('closeEl');$(this).siblings('.closeEl').removeClass('openEl');var wdgName=_s.imonster.userWidget.getWTWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.widgetID);var domain=window.location.host;dcsMultiTrack('DCS.dcsuri',domain+'_Widget.evt','DCSext.en',wdgName,'DCSext.k','Exp');}
targetContent.slideDown(300);}else{if(largerTargetContent.css('display')=='none'){largerTargetContent.slideDown(300);largerTargetContentFooter.slideDown(300);largerTargetContentHeader.animate({height:"36px"},300);$(this).siblings('.openEl').addClass('closeEl');$(this).siblings('.closeEl').removeClass('openEl');var wdgName=_s.imonster.userWidget.getWTWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.widgetID);var domain=window.location.host;dcsMultiTrack('DCS.dcsuri',domain+'_Widget.evt','DCSext.en',wdgName,'DCSext.k','Exp');}
else{targetContent.slideUp(300);}}
var wdgName=_s.imonster.userWidget.getWTWdgName(_s.imonster.userWidget.allWidgets,_s.imonster.userWidget.widgetID);var domain=window.location.host;dcsMultiTrack('DCS.dcsuri',domain+'_Widget.evt','DCSext.en',wdgName,'DCSext.k','E');return false;}
else{_g.security.call(_g.security.level.high,function(){});}},getWTWdgName:function(obj,value){for(var p in obj){if(obj[p]==value){return"Wdg_"+p;}}},getWdgName:function(obj,value){for(var p in obj){if(obj[p]==value){return p;}}},getWdgProps:function(wdgI){var props=eval($('#inp_props_'+wdgI).val());if(props==undefined)
props='';return props;},Sortables:function(els){$revert=true;if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var ieversion=new Number(RegExp.$1);if(ieversion>=3)$revert=false;}
$(els.toString()).sortable({accept:$(els.toString()),containment:'#mcWorkArea',helper:'sortHelper',handle:'div.widgetHeader',cursor:'move',appendTo:'body',connectWith:$(els.toString()),placeholder:'sortHelper2',tolerance:'pointer',opacity:0,scroll:true,revert:$revert,update:function(e,ui){},sort:function(e,ui){},change:function(e,ui){var w=ui.helper.height();ui.placeholder.height(w);},start:function(e,ui){var ht=ui.helper.height();ui.placeholder.height(ht);var w=ui.helper.width();ui.placeholder.width(w-10);},stop:function(e,ui){var ieversion=0;if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ieversion=new Number(RegExp.$1);}
if(ieversion>=3){if($(ui.item).attr('id')==_s.imonster.userWidget.allWidgets.reccareerpath){_s.controlLoader.update(idMap.recCareerPathLoader);}}
$(_s.imonster.userWidget.sortableCols.toString()).sortable("refresh");_s.imonster.userWidget.getSortablesOrder();_s.imonster.userWidget.layoutModify(_s.imonster.userWidget.layoutModifySuccess,_s.imonster.userWidget.layoutModifyFailure);$(_s.imonster.userWidget.sortableCols.toString()).sortable("refresh");}});},getSortablesOrder:function(){$.cookie(_s.imonster.userWidget.setCookieNames[0],$("div#userWidgetWellCol1").sortable("toArray"),{expires:_s.imonster.userWidget.setCookieExpiry,path:"/"});$.cookie(_s.imonster.userWidget.setCookieNames[1],$("div#userWidgetWellCol2").sortable("toArray"),{expires:_s.imonster.userWidget.setCookieExpiry,path:"/"});$.cookie(_s.imonster.userWidget.setCookieNames[2],$("div#userWidgetWellCol3").sortable("toArray"),{expires:_s.imonster.userWidget.setCookieExpiry,path:"/"});},restoreSortableOrder:function(){var $els=$(_s.imonster.userWidget.sortableCols.toString());_s.imonster.userWidget.Sortables(_s.imonster.userWidget.sortableCols.toString());var finalList=$els.sortable("toArray");if(finalList==null)return;var rebuild=new Array();for(var v=0,len=finalList.length;v<len;v++){rebuild[finalList[v]]=finalList[v];}
var clonelist=$("div#"+$els[0].id+".ui-sortable").clone(true);for(var i=0,n=_s.imonster.userWidget.setCookieNames.length;i<n;i++){var cookie=$.cookie(_s.imonster.userWidget.setCookieNames[i]);if(!cookie)continue;if($els[i]!=null){var IDs=cookie.split(",");for(var j=0,m=IDs.length;j<m;j++){var itemID=IDs[j];if(itemID in rebuild){var item=rebuild[itemID];var child=$("div.ui-sortable").children("#"+item);var savedOrd=$("div.ui-sortable").children("#"+itemID).clone();child.remove();savedOrd.appendTo($("div#"+$els[i].id+".ui-sortable"));}}}}
$('a.closeEl').bind('mousedown',_s.imonster.userWidget.toggleContent);$('a.removeEl').bind('mousedown',_s.imonster.userWidget.removeElement);$('a.editEl').bind('mousedown',_s.imonster.userWidget.toggleEdit);$(_s.imonster.userWidget.sortableCols.toString()).sortable("refresh");},wdgUpdVal:function(){var controlNames=new Array();for(var i=0;i<_s.imonster.userWidget.wdgListGroup.length;i++){controlNames[i]=$('#inp_name_'+_s.imonster.userWidget.wdgListGroup[i].ctrlClientName).val();if(controlNames[i]!=_s.imonster.userWidget.wdgListGroup[i].name){controlNames[i]=_s.imonster.userWidget.wdgListGroup[i].name;}
if(_s.imonster.userWidget.wdgListGroup[i].props==""){$('#inp_props_'+_s.imonster.userWidget.wdgListGroup[i].ctrlClientName).val(_s.imonster.userWidget.wdgListGroup[i].props);}
else{$('#inp_props_'+_s.imonster.userWidget.wdgListGroup[i].ctrlClientName).val(JSON.stringify(_s.imonster.userWidget.wdgListGroup[i].props));}}},updateGroup:function(controlIDs){if(controlIDs.length!=undefined&&controlIDs.length>0){var elementIDs=new Array();var controlNames=new Array();var properties=new Array();for(var i=0;i<controlIDs.length;i++){elementIDs[i]='div_'+controlIDs[i].ctrlClientName;controlNames[i]=$('#inp_name_'+controlIDs[i].ctrlClientName).val();if(controlNames[i]!=controlIDs[i].name){controlNames[i]=controlIDs[i].name;}
var props=eval($('#inp_props_'+controlIDs[i].ctrlClientName).val());if(props==undefined)
props=null;properties[i]=props;}
_s.services.post('ControlBuilder/GetControlsGroup',{'names':controlNames,'properties':properties},function(result){_s.imonster.userWidget.getGroupResult(result,elementIDs);});}},getGroupResult:function(result,elementIDs){for(var i=0;i<elementIDs.length;i++){$('#'+elementIDs[i]).html(result.data[i].html);}
_s.imonster.userWidget.wdgTransitionEnd();$(_s.imonster.userWidget.sortableCols.toString()).sortable("refresh");if(this.IsAdShow=="False"){$('.AdText').css('display','none');}},wdgTransition:function(){$('div#wdgTransition').hide();$('div#wdgTransitionText').empty();$('div#wdgTransitionText').append(IMonsterMesasges.wdgLoadingMessage);$('.wdgSortCols').add("#widgetsRightColumn").fadeTo("fast",0.2,function(){$('div#wdgTransition').show();});},wdgTransitionEnd:function(){$('.wdgSortCols').add("#widgetsRightColumn").fadeTo("fast",1,function(){$('div#wdgTransition').hide("fast");});},wdgLoadingModal:{close:function(){$.modal.close(true);},open:function(){$('#wdgLoadingHead1').text(IMonsterMesasges.wdgLoadingMessage);$('#LoadingText1').html('<div id="wdgLoading" class="wdgLoading"></div>');$("#widgetLoadingDialog1").modal({width:350,persist:true,close:false,position:"fixed",onOpen:function(dialog){dialog.overlay.fadeIn('slow');dialog.data.show();dialog.container.fadeIn('slow');}});}}};
;
;_g.namespace("_s.imonsterWidgets").Resume={changeStatus:function(resumeValue,redirectDomain){var resumeStatusDropdownId='#'+resumeValue;var resumeStatus=$(resumeStatusDropdownId).val();if(resumeStatus>=0&&resumeStatus<=2){_s.services.post('Resume/changeStatusResume',{'resumeValue':resumeValue,'resumeStatus':resumeStatus},function(res){if(resumeStatus=="0"||resumeStatus=="1"){window.location='http://'+redirectDomain+'/resume/Visibility.aspx?resumevalue='+resumeValue;}});}}};
;

_g.namespace('_s.widgets').wdgSavedSearch={init:function(id)
{if($(".wdgSavedSearchContent").length>0)
{$(".wdgSavedSearchContent").parent().parent().parent().find("a.editEl").css("display","none");}
var toggle=id;if(toggle==1){$("#savedSearchMyCarousel").jCarouselLite({btnNext:".nextSS",btnPrev:".prevSS",visible:1});$('.wdgSSHeadingName').hide();$('.wdgSSHeadingEmail').hide();$('.wdgSSRightColumn').hide();$('#savedSeachCarousel').css({marginTop:'-18px'});}else if(toggle==0){$("#savedSearchMyCarousel").find('.wdgRightBtn').hide();$("#savedSearchMyCarousel").find('.wdgLeftBtn').hide();$('.wdgSSHeadingEmail').hide();$('.wdgSSHeadingName').hide();$('.wdgSSRightColumn').hide();$('.savedSearchItem').toggleClass('savedSearchItemToggle');}}};_g.namespace('_s.widgets').wdgCareerGoals={init:function(id)
{if($(".wdgCarrerGoalsContentWrapper").length>0)
{$(".wdgCarrerGoalsContentWrapper").parent().parent().parent().parent().find("a.editEl").css("display","none");}
var toggle=id;if(toggle==1){$("#wdgCareerGoalsCarousel").jCarouselLite({btnNext:".next",btnPrev:".prev",visible:1});$('#carrerGoalsCarousel').css({marginTop:'-18px'});}else if(toggle==0){$('#wdgCareerGoalsCarousel').find('.wdgRightBtn').hide();$('#wdgCareerGoalsCarousel').find('.wdgLeftBtn').hide();$('.careerGoalTitle').toggleClass('carrerGoalsItemToggle');$('#carrerGoalsCarousel').toggleClass('carouselUlToggle');}}};_g.namespace('_s.widgets').wdgCompanies={init:function(id)
{if($(".wdgSavedCompaniesContentWrapper").length>0)
{$(".wdgSavedCompaniesContentWrapper").parent().parent().parent().parent().find("a.editEl").css("display","none");}
var toggle=id;if(toggle==1){$("#wdgCompaniesCarousel").jCarouselLite({btnNext:".nextSC",btnPrev:".prevSC",visible:1});$('#companiesCarousel').css({marginTop:'-18px'});$('#wdgCompaniesCarousel').find('.wdgCompaniesLinks').show();}else if(toggle==0){$('#wdgCompaniesCarousel').find('.wdgRightBtn').hide();$('#wdgCompaniesCarousel').find('.wdgLeftBtn').hide();$('.savedCompanyTitle').toggleClass('savedCompaniesItemToggle');$('#companiesCarousel').toggleClass('carouselUlToggle');$('.wdgCompaniesLinks').hide();}}};
;

_g.namespace("_s.imonster").recommendedJobs={init:function(){var ctx=$("#divRecommendedJobs");buttonJQ=ctx.find(".recommendedJobsControls a.glbBtn"),batchApplyClearSelected=$(".batchApplyClearSelected a"),newBatchApplyFeature=$(".newBatchApplyFeature"),firstSpanJQ=$(".batchApplyClearSelected:first"),clearSelectedBlock=$(".batchApplyClearSelected"),ulJQ=ctx.find(".ulRecommendedJobs");var handleCheckboxChanged=function(){var len=ulJQ.find('input:checked').length,text=firstSpanJQ.text(),newText=text.replace(/\(\d+/,"("+len);if(len>0){buttonJQ.removeClass("glbBtnDisabled");newBatchApplyFeature.css("display","none");clearSelectedBlock.css("display","inline");}
else{buttonJQ.addClass("glbBtnDisabled");newBatchApplyFeature.css("display","inline");clearSelectedBlock.css("display","none");}
batchApplyClearSelected.text(newText);};handleCheckboxChanged();ulJQ.delegate("input:checkbox","change",handleCheckboxChanged);buttonJQ.click(function(e){var cbs=ulJQ.find('input:checked');if(cbs.length==0){return false;}
if(cbs.length==1){jQuery.each(cbs,function(){var jobViewLink=$(this).parent().next().children(":first").children(":first");window.location=$(jobViewLink).attr("href");});return false;}});batchApplyClearSelected.click(function(e){clearSelections();return false;});var clearSelections=function(){ctx.find('input:checked').attr('checked',false);handleCheckboxChanged();};var tooltipJQ=$("#divRecommendedJobsTooltip"),windowJQ=$(window),contentJQ=tooltipJQ.find(".divContent"),footerContentJQ=tooltipJQ.find(".divFooterContent"),linkViewDescriptionJQ=tooltipJQ.find(".linkViewDescription");tooltipJQ.appendTo("body");var showTimeout,hideTimeout;ulJQ.delegate("a.linkTitle","mouseover",function(e){var self=this;clearTimeout(hideTimeout);showTimeout=setTimeout(function(){var aJQ=$(self),liJQ=aJQ.closest("li"),divJQ=liJQ.find(".divHiddenDescription").first(),divFooterJQ=liJQ.find(".divHiddenFooter").first();divFooterJQ.find("li:empty").remove();contentJQ.html($.trim(divJQ.html())+"&hellip;");footerContentJQ.html(divFooterJQ.html());linkViewDescriptionJQ.attr("href",aJQ.attr("href"));var linkOffset=aJQ.offset(),linkHeight=aJQ.outerHeight(),windowHeight=windowJQ.height(),windowScrollTop=windowJQ.scrollTop(),toolTipHeight=tooltipJQ.height(),toolTipTop=linkOffset.top+linkHeight+3;if(toolTipTop+toolTipHeight>windowHeight+windowScrollTop){toolTipTop=linkOffset.top-toolTipHeight-10;}
tooltipJQ.css({top:toolTipTop,left:linkOffset.left});tooltipJQ.show();},350);});ulJQ.delegate("a.linkTitle","mouseout",function(e){clearTimeout(showTimeout);hideTimeout=setTimeout(function(){tooltipJQ.hide();},75);});tooltipJQ.bind("mouseover",function(e){clearTimeout(hideTimeout);});tooltipJQ.bind("mouseout",function(e){hideTimeout=setTimeout(function(){tooltipJQ.hide();},75);});}};
;

