function delegate(B,A){return function(){return A.apply(B,arguments)
}
}function abbreviateString(B,A){B=B+"";
if(B.length>A){return B.substr(0,A-1)+" \u2026"
}return B
}function refreshCapture(B,A){document.getElementById(B).src=A+"?v="+Math.random();
return false
}function initializeFieldHighlight(){if($.browser.msie){$("input:text").focus(function(){$(this).addClass("iefocus")
}).blur(function(){$(this).removeClass("iefocus")
});
$("textarea").focus(function(){$(this).addClass("iefocus")
}).blur(function(){$(this).removeClass("iefocus")
})
}}function focusSearchInput(){if($(".search-text").val()==$(".search-placeholder").text()){$(".search-text").val("")
}$(".search-text").addClass("search-text-focus");
$(".search-box").addClass("focus")
}function blurSearchInput(){if($(".search-text").val().replace(/^\s*/,"").replace(/\s*$/,"").length==0){$(".search-text").val($(".search-placeholder").text())
}$(".search-text").removeClass("search-text-focus");
$(".search-box").removeClass("focus")
}function clearSearchBox(){if($(".search-text").val()==$(".search-placeholder").text()){$(".search-text").val("")
}}function initializeDatePicker(){var A=document.getElementById("datepicker-format");
$.datepicker.setDefaults({showOn:"button",buttonImage:$("img",A).attr("src"),buttonImageOnly:true,dateFormat:$("span",A).text()})
}function attacheDatePicker(){$(".date-field").datepicker()
}function showProviderFilledStatus(A){var B=document.getElementById("profile_skills_tab");
if(A.skillSectionFilled){$(B).removeClass("not-filled-section").addClass("filled-section")
}else{$(B).removeClass("filled-section").addClass("not-filled-section")
}var C=document.getElementById("profile_skills_link");
if(A.skillFilled){$(C).hide()
}else{$(C).show()
}C=document.getElementById("profile_languages_link");
if(A.spokenLanguageFilled){$(C).hide()
}else{$(C).show()
}B=document.getElementById("profile_licenses_tab");
C=document.getElementById("profile_licenses_link");
if(A.licenseSectionFilled){$(B).removeClass("not-filled-section").addClass("filled-section");
$(C).hide()
}else{$(B).removeClass("filled-section").addClass("not-filled-section");
$(C).show()
}B=document.getElementById("profile_portfolio_tab");
C=document.getElementById("profile_portfolio_link");
if(A.portfolioFilled){$(B).removeClass("not-filled-section").addClass("filled-section");
$(C).hide()
}else{$(B).removeClass("filled-section").addClass("not-filled-section");
$(C).show()
}B=document.getElementById("profile_please_enter");
if(A.percentage>99){$(B).hide();
$(document.getElementById("profile_filled")).show();
$(document.getElementById("profile_not_filled")).hide()
}else{$(B).show();
$(document.getElementById("profile_filled")).hide();
$(document.getElementById("profile_not_filled")).show()
}$("#profile-page div.progress-bar div.right-filled-segment").animate({width:A.percentage+"%"},500)
}function showCustomerFilledStatus(A){var B=document.getElementById("profile_general_tab");
var C=document.getElementById("profile_languages_link");
if(A.spokenLanguageFilled){$(B).removeClass("not-filled-section").addClass("filled-section");
$(C).hide()
}else{$(B).removeClass("filled-section").addClass("not-filled-section");
$(C).show()
}B=document.getElementById("profile_interests_tab");
C=document.getElementById("profile_interests_link");
if(A.interestsFilled){$(B).removeClass("not-filled-section").addClass("filled-section");
$(C).hide()
}else{$(B).removeClass("filled-section").addClass("not-filled-section");
$(C).show()
}B=document.getElementById("profile_please_enter");
if(A.percentage>99){$(B).hide();
$(document.getElementById("profile_filled")).show();
$(document.getElementById("profile_not_filled")).hide()
}else{$(B).show();
$(document.getElementById("profile_filled")).hide();
$(document.getElementById("profile_not_filled")).show()
}$("#profile-page div.progress-bar div.right-filled-segment").animate({width:A.percentage+"%"},500)
}function initializeSubmitter(A){$("form .submit",A).click(function(C){C.preventDefault();
var D=C.target;
if(D.tagName!="A"){D=D.parentNode
}var B=$(D).parents("form").get(0);
$(B).append('<input type="hidden" name="'+D.name+'" value="" />').submit()
})
}function initializeRadioButton(){$(".checked").attr("checked","checked")
}function addRelAttrToJobDescLinks(){$(".job-description a").attr("rel","nofollow")
}DATE_DIFF_FIELDS=[{divider:1000,fieldName:"second"},{divider:60000,fieldName:"minute"},{divider:3600000,fieldName:"hour"},{divider:86400000,fieldName:"day"},{divider:604800000,fieldName:"week"},{divider:2592000000,fieldName:"month"},{divider:31536000000,fieldName:"year"}];
function formatDateDiff(A,E){var D=E.getTime()-A.getTime();
var C=DATE_DIFF_FIELDS.length-1;
while(C>0&&DATE_DIFF_FIELDS[C].divider>D){C--
}D=Math.floor(D/DATE_DIFF_FIELDS[C].divider);
var B=$("#pattern_date_"+DATE_DIFF_FIELDS[C].fieldName+(D==1?"_ago":"s_ago")).text();
return B.replace("{0}",D)
}function targetBlank(A){A.preventDefault();
window.open(A.target.href)
}function limitChars(D,B,A){var E=$(D).val();
var C=E.replace(/\n/g,"\n\r").length;
if(C>A){E=E.replace(/\n/g,"\n\r");
E=E.substr(0,A);
$(D).val(E.replace(/\n\r/g,"\n"));
$(B).html(0);
$(B).parent().css("color","red");
return false
}else{if($(B).parent().css("color")=="red"){$(B).parent().css("color","gray")
}$(B).html(A-C);
if(A-C==0){$(B).parent().css("color","red")
}return true
}}$(document).ready(function(){$(".target_blank").click(targetBlank);
blurSearchInput();
$(".search-text").focus(focusSearchInput).blur(blurSearchInput);
$(".header-content .search .search-button").click(clearSearchBox);
initializeFieldHighlight();
initializeDatePicker();
attacheDatePicker();
initializeSubmitter(document.getElementById("main-content"));
initializeRadioButton();
addRelAttrToJobDescLinks();
$().ajaxSuccess(function(D,C,B){if(C.responseText=='{"result":"error","sessionExpired":true}'){var E="Sorry, your session has expired.";
var A=document.getElementById("ajax-config");
if(A!=null){E=$("span",A).text()
}B.complete=false;
alert(E);
window.location.reload(true)
}});
$(".feedbackRedirectTrigger").click(function(C){var A=$("title").html();
A=A.replace(/&nbsp;/g," ");
var B=C.target.href;
if(C.target.tagName!="A"){B=C.target.parentNode.href
}window.location=B+"/"+A;
C.preventDefault()
});
$(".locale-selector a").click(function(B){B.preventDefault();
var A=B.target.href;
if(B.target.tagName!="A"){A=B.target.parentNode.href
}if(A.indexOf("?")!=-1){A+="&"
}else{A+="?"
}window.location=A+$.param({"url":window.location.pathname+window.location.search,"changeLocale":""})
});
$("span.after-name-verification-icon").tooltip();
$("span.nda-icon-container").tooltip()
})
