/* oop */
(function(){var i=false,fnTest=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(e){var f=this.prototype;i=true;var g=new this();i=false;for(var h in e){g[h]=typeof e[h]=="function"&&typeof f[h]=="function"&&fnTest.test(e[h])?(function(c,d){return function(){var a=this._super;this._super=f[c];var b=d.apply(this,arguments);this._super=a;return b}})(h,e[h]):e[h]}function Class(){if(!i&&this.init)this.init.apply(this,arguments)}Class.prototype=g;Class.constructor=Class;Class.extend=arguments.callee;return Class}})();
/* utilities */
var Utilities=Class.extend({init:function(){}});Utilities.contains=function(a,b){while(b.parentNode){if((b=b.parentNode)==a){return true}}return false};
/* beRecruited */
(function(){var i=false,fnTest=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(e){var f=this.prototype;i=true;var g=new this();i=false;for(var h in e){g[h]=typeof e[h]=="function"&&typeof f[h]=="function"&&fnTest.test(e[h])?(function(c,d){return function(){var a=this._super;this._super=f[c];var b=d.apply(this,arguments);this._super=a;return b}})(h,e[h]):e[h]}function Class(){if(!i&&this.init)this.init.apply(this,arguments)}Class.prototype=g;Class.constructor=Class;Class.extend=arguments.callee;return Class}})();var Utilities=Class.extend({init:function(){}});Utilities.contains=function(a,b){while(b.parentNode){if((b=b.parentNode)==a){return true}}return false};var beRecruited=Class.extend({init:function(){this._sportDashboardHTML={};this.fixPng();this.attachEvents();this.initializePulse();this.setUpSuckerFishNavigation();this.loadMediaGallery()}});beRecruited.prototype.attachEvents=function(){var a=this;$("#promotabs li a").bind("click",this.hdlTabClick);$(".inputRadio").bind("click",this.selectRadioBtn);$("#signupBody input[type='text']").bind("focus",this.clearRegisterDetails);$("#signupBody input[type='text']").bind("keydown",this.showRegisterDetails);$("#signupBody select[name='sport'], #partnerVerify select[name='sport']").bind("change",this.showRunningDetails);$("#cancelRegistrationDetails").bind("click",this.hideRegisterDetails);$("#deluxeIcoLarge").bind("mouseover",this.showInnerModal);$("#innerModal").bind("mouseout",this.hideInnerModal);$("#closeInnerModal").bind("click",this.closeInnerModal);$("#selectSport a").bind("click",{classRef:a},this.hdlSportClick);$("#featuredLeft,#featuredRight").bind("click",{classRef:a},this.hdlFeaturedClick);$("#signupBody #signupBottom #resendVerify").bind("click",this.setResendVerifyLink);$("#signupBody #signupBottom #forgotPassword").bind("click",this.setForgotPasswordLink);$(window).bind('load',this.setPromoFeaturedAthleteSize);$('#featuredAthleteImg img').bind('load',this.setPromoFeaturedAthleteSize);$("#navTitle select[name='sport'], #findAthletesPanel select[name='state'],#findCollegesPanel select[name='state'], #searchColleges select[name='sport'], #searchHighschools select[name='sport']").bind("change",this.jumpToPage);$(".beBoxJumpMenu select").bind("change",this.jumpToPage);$("#contactusBtn").bind("click",{classRef:a},this.processContactusForm);$("#reportissueBtn").bind("click",{classRef:a},this.processReportissueForm);$("#beBoxBodyFaq a").bind("click",this.toggleFaq);$("#findCollegesPanel #searchCollegesTabs li, #findAthletesPanel #searchTabs li").bind("click",this.toggleTabs);$(".formFu select[name='state']").bind("change",this.toggleCountryFields);$(".formFu select[name='state']").bind("change",this.loadHighSchools);$(".formFu select[name='high_school']").bind("change",this.toggleHighSchoolFields);$(".formFu select[name='major_category']").bind("change",this.loadCollegeMajors);$(".formFu input[name='cc_number']").bind("keyup",this.selectCardType);$(".formFu input[name='cc_expire_month']").bind("focus",{defaultValue:'mm'},this.clearDefault);$(".formFu input[name='cc_expire_year']").bind("focus",{defaultValue:'yy'},this.clearDefault);$(".formFu a[name='submit_link']").bind("click",this.submitForm);$(".formFu a[name='csc_link']").bind("click",this.openSecurityWin);$(".formFu a[name='no_thanks_link']").bind("click",this.hdlNoThanksLink);$(".formFu input[name='GetStarted']").bind("click",this.submitCoreg);$(".formFu input[name='submit_paypal']").bind("click",this.setPayPal);$("#paymentForm input.submit").bind("click",this.disableFormSubmit);$(".searchResultsNav select").bind("change",this.doSiteSearch);$(".searchLinks a").bind("click",this.doSiteSearch);$("#siteSearchForm input[type='text']").bind("focus",{defaultValue:'Search beRecruited...'},this.clearDefault);$("#siteSearchForm input[type='image']").bind("click",this.doSiteSearch);$(".highSchools #sortOptionMenu a.show_menu, .highSchools a.learn_menu").bind("click",this.showMenu);$(".highSchools #sortOptionMenu a.close_menu, .highSchools #notListedBox a.close_menu").bind("click",this.hideMenu);$(".mediaPanel .photoTab, .mediaPanel .videoTab, .mediaPanel .photoTab a, .mediaPanel .videoTab a").bind("click",this.toggleMediaTabs);$(".mediaPanel #videoSampleCaption a.hideCaption").bind("click",{classRef:a},this.hideVideoSampleCaption);$(".mediaPanel #videoFrame").bind("load",{classRef:a},this.showVideoSampleCaption);$(".mediaPanel #videoThumbs div.sampleVideo").bind("click",this.playVideo);$(".mediaPanel #videoThumbs li a").bind("click",this.playVideo);$("#stack_iframe").bind("load",this.trackIframeView);$("#loginForm input[name='login_btn']").bind("click",{"caller":"login_btn"},this.doFBLogin);$("#beIntOffer input.checkrequired").bind("click",this.checkRequiredFields);$("#beIntOffer a.externaloffer").bind("click",this.openExternalOffer);$(".trackerDiv .ctItem").bind("mouseenter mouseover",this.showCollegeTrackerOptions);$(".trackerDiv .ctItem").bind("mouseleave mouseout",this.hideCollegeTrackerOptions);$(".trackerDiv .ctItem a.ajaxLink").bind("click",{"classRef":a},this.collegeTrackerAjax);$(".trackerDiv a.helpLink").bind("click",this.showTrackerHelp);$(".trackerHelpDiv a.helpClose").bind("click",this.hideTrackerHelp);$(".trackerDiv a.defsLink").bind("click",this.showTrackerDefs);$(".trackerDefsDiv a.defsClose").bind("click",this.hideTrackerDefs);$("div.profilePhotoDiv").bind("mouseenter mouseover",this.showEditPhotoLink);$("div.profilePhotoDiv").bind("mouseleave mouseout",this.hideEditPhotoLink);return};beRecruited.prototype.getGallerifficTabId=function(e){var f=e.data.classRef;var g=f.gallery;if(window.event){var h=this}else{var h=e.currentTarget}var j=h.id;if(j=='thePhotoTab'){if(!g.interval){g.toggleSlideshow()}$("#theVideoList").hide();$("#latestVideos").hide();$("#latestVideosStats").hide();$("#latestPhotos").show();$("#latestPhotosStats").show();$("#jsGallery").show();$("#jsGalleryNavigation").show();$("#thePhotoList").hide()}if(j=='theVideoTab'){if(g.interval){g.toggleSlideshow()}$("#jsGallery").hide();$("#jsGalleryNavigation").hide();$("#thePhotoList").hide();$("#latestPhotos").hide();$("#latestPhotosStats").hide();$("#latestVideos").show();$("#latestVideosStats").show();$("#theVideoList").show();$("#videoGalleryNavigation ul li").bind("click",function(b){if(window.event){var c=this}else{var c=b.currentTarget}var d=c.id.split("_");$(document).ready(function(){$("#videoSlideshow").empty();$("#videoGalleryNavigation").find('ul.thumbs li.selected').removeClass('selected');$("#avideo_"+d[1]).addClass('selected');var a=$("#video_"+d[1]+" > *").clone();$(a).children().each(function(i,o){if(o.name=="flashvars"){o.value=o.value.replace("autoplay=0","autoplay=1")}if(o.name=="player"){o.setAttribute('flashvars',o.getAttribute('flashvars').replace("autoplay=0","autoplay=1"))}});$(a).clone().appendTo($("#videoSlideshow"))});return false})}return false};beRecruited.prototype.toggleMediaTabs=function(){var a=this.name;if(!a){a=$(this).children('a').attr("name")}if(!a){return false}var b=$('.mediaPanel #subnav .selected a').attr("name");if(a==b){return}if(a=='photoTab'){var c=$(".mediaPanel #videoFrame").clone();$(".mediaPanel #videoPlayer .videoContainer").empty();var d=$(c).attr("src");var e=d.replace('autoplay=1','autoplay=0');if(d!=e){$(c).attr({src:e})}$(".mediaPanel #videoPlayer .videoContainer").append(c)}var f='photoPanel';if(a=='videoTab'){f='videoPanel'}var g='photoTab';var h='photoPanel';if(a=='photoTab'){g='videoTab';h='videoPanel'}$('.mediaPanel .'+g).removeClass("selected");$('.mediaPanel .'+a).addClass("selected");$('.mediaPanel #'+h).hide();$('.mediaPanel #'+f).show();return false};beRecruited.prototype.playVideo=function(){$(".mediaPanel #videoThumbs li.selected").fadeTo('fast',0.67);$(".mediaPanel #videoThumbs li.selected").removeClass('selected');$(this).parent("li").addClass('selected');var a=this.name;if(!a&&this.tagName=='DIV'){a=$(this).next().find('a').attr("name")}var b=a.split('-');var c='';var d='';if(b.length>1){var e=b[0];if(e=='SAMPLE'){c='Y'}if(e=='PROMO'){d='Y'}a=b[1]}var f=$("#videoFrame").width();var g=$("#videoFrame").height();var h='/high-schools/video-player?id='+a+'&width='+f+'&height='+g+'&autoplay=1&sample='+c+'&promo='+d;$(".mediaPanel #videoFrame").attr({src:h});return false};beRecruited.prototype.loadMediaGallery=function(){if(!$("#jsGallery").length){return}var c=0.67;$('#jsGalleryThumbs ul.thumbs li, #videoThumbs ul.thumbs li').not('.selected').css('opacity',c);$('#jsGalleryThumbs ul.thumbs li, #videoThumbs ul.thumbs li').hover(function(){$(this).not('.selected').fadeTo('fast',1.0)},function(){$(this).not('.selected').fadeTo('fast',c)});var d=$('#jsGallery').galleriffic('#jsGalleryThumbs',{delay:7000,numThumbs:20,preloadAhead:5,enableTopPager:false,enableBottomPager:true,imageContainerSel:'#jsGallerySlideshow',controlsContainerSel:'',captionContainerSel:'#jsGalleryCaption',loadingContainerSel:'#jsGalleryLoading',renderSSControls:false,renderNavControls:false,imageMaxWidth:347,imageMaxHeight:272,playLinkText:'Play',playLinkHtml:'<img src="'+static_path+'/imgs/play_btn.gif" width="23" height="22" border="0" alt="Play"/>',pauseLinkText:'Pause',pauseLinkHtml:'<img src="'+static_path+'/imgs/pause_btn.gif" width="23" height="22" border="0" alt="Pause"/>',prevLinkText:'Prev',prevLinkHtml:'<img src="'+static_path+'/imgs/prev_btn.gif" width="23" height="22" border="0" alt="Prev"/>',nextLinkText:'Next',nextLinkHtml:'<img src="'+static_path+'/imgs/next_btn.gif" width="23" height="22" border="0" alt="Next"/>',nextPageLinkText:'Next &rsaquo;',prevPageLinkText:'&lsaquo; Prev',enableHistory:false,autoStart:true,onChange:function(a,b){$('#jsGalleryThumbs ul.thumbs').children().eq(a).fadeTo('fast',c).end().eq(b).fadeTo('fast',1.0)},onTransitionOut:function(a){$('#jsGallerySlideshow, #jsGalleryCaption').fadeOut('fast',a)},onTransitionIn:function(){if(d.hidePhotoSampleCaption){$(".mediaPanel #photoSampleCaption").hide()}$('#jsGallerySlideshow, #jsGalleryCaption').fadeIn('fast');$('#jsGalleryCaption').fadeTo('fast',0.8)},onPageTransitionOut:function(a){$('#jsGalleryThumbs ul.thumbs').fadeOut('fast',a)},onPageTransitionIn:function(){$('#jsGalleryThumbs ul.thumbs').fadeIn('fast')}});$(".mediaPanel #photoSampleCaption a.hideCaption").live("click",function(){$(".mediaPanel #photoSampleCaption").hide();d.hidePhotoSampleCaption=true;return false});d.$controlsContainerSel="#jsGalleryControls";d.$controlsContainer=$(d.$controlsContainerSel);d.$controlsContainer.find('div.ss-controls a').click(function(e){d.toggleSlideshow();e.preventDefault();return false});d.$controlsContainer.find('div.nav-controls a.prev').click(function(e){d.clickHandler(e,d,this)});d.$controlsContainer.find('div.nav-controls a.next').click(function(e){d.clickHandler(e,d,this)});d.$thumbsContainer.find('div.samplePhoto').click(function(e){$(this).next().find('a.thumb').click()});if(d.settings.autoStart){d.$controlsContainer.find('div.ss-controls a').removeClass().addClass('pause').attr('title',d.settings.pauseLinkText).attr('href','#pause').html(d.settings.pauseLinkHtml)}};beRecruited.prototype.toggleTabs=function(a){if(window.event){tabObj=this}else{tabObj=a.currentTarget}var b=tabObj.id.split("_")[1];var c=0;while($("#"+tabObj.id.split("_")[0]+"Div_"+ ++c).length>0){$("#"+tabObj.id.split("_")[0]+"Div_"+c).hide()}$("#"+tabObj.id.split("_")[0]+"Div_"+b).show();return false};beRecruited.prototype.toggleFaq=function(a){if(window.event){submitObj=this}else{submitObj=a.currentTarget}var b=submitObj.id.split("_")[1];if($("#divFaqA_"+b).css("display")=="none"){$("#divFaqA_"+b).show()}else{$("#divFaqA_"+b).hide()}return false};beRecruited.prototype.jsSubmitForm=function(a){var b=a.data.classRef;if(window.event){submitObj=this}else{submitObj=a.currentTarget}submitObjId=submitObj.id;var c=b.getFormId();$("#"+c).submit()};beRecruited.prototype.processContactusForm=function(a){var b=a.data.classRef;if(window.event){submitObj=this}else{submitObj=a.currentTarget}submitObjId=submitObj.id;var c=b.getFormId();if(c){if(b.checkRequired(c)){b.ajaxProcessForm(c,"/contact-us","contactusFormBodyText")}}};beRecruited.prototype.processReportissueForm=function(a){var b=a.data.classRef;if(window.event){submitObj=this}else{submitObj=a.currentTarget}submitObjId=submitObj.id;var c=b.getFormId();if(c){if(b.checkRequired(c)){b.ajaxProcessForm(c,"/report-issue","reportissueFormBodyText")}}};beRecruited.prototype.getFormId=function(){var a=this;var b;if(submitObjId){$("#"+submitObjId).parents().each(function(i,o){if(o.nodeName.toLowerCase()=="form"){b=o.id;return false}})}return b};beRecruited.prototype.checkRequired=function(a){var b=this;var a=a;if(a||a!=''){var c=0;var d;$("#"+a+" :input").each(function(i,o){if(o.name.search(/^r_/)!=-1&&$("#"+a+" :input:eq("+i+")").val()==''||(o.name.search(/email/)!=-1&&$("#"+a+" :input:eq("+i+")").val()!=''&&b.validateEmail($("#"+a+" :input:eq("+i+")").val())==false)){if(o.name.search(/email/)!=-1&&$("#"+a+" :input:eq("+i+")").val()!=''&&b.validateEmail($("#"+a+" :input:eq("+i+")").val())==false){theErrorMsg="You filled in an invalid email address."}else{theErrorMsg="You forgot to fill in the "+$("#"+a+" :input:eq("+i+")").attr("name").replace(/^r_/,'')+" field."}$("#"+a).children().each(function(i,o){if(o.id.search(/^errorMsg/)!=-1){theErrorMsgSpanId=o.id;return c=1}});if(c){$("#"+theErrorMsgSpanId).html(theErrorMsg+"<br />")}else{alert(theErrorMsg)}d=false;return false}})}if(d!=false){d=true}return d};beRecruited.prototype.validateEmail=function(a){var b=this;if(a.search(/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/)!=-1){return true}else{return false}};beRecruited.prototype.ajaxProcessForm=function(c,d,e){var f=this;var g={};if(c){$("#"+c+" :input").each(function(i,o){g[$("#"+c+" :input").eq(i).attr("name")]=$("#"+c+" :input").eq(i).val()});$.post(d,g,function(a){var b=eval('('+a+')');if(b.success){$("#"+e).hide();$("#contactMessage").show()}})}};beRecruited.prototype.hdlTabClick=function(){var a=$("#promotabs").children('.selected');var b=$("#promotabs ul li").children('.selected').removeClass('selected');$(this).addClass('selected');var c="#promoPhoto"+$(b).attr('name');var d="#promoPhoto"+this.name;$(d).css({'background-image':'url('+eval(this.name+'Image')+')'});$(c).fadeOut(250,function(){$(d).fadeIn(250)});return false};beRecruited.prototype.selectRadioBtn=function(e){$("#registerAsRadioBtnGroup .column").children(".inputRadio").removeClass("btnSelected");$(this).addClass("btnSelected");$(this).children("input[name='type']").attr({checked:"checked"});var a=$(this).children("input[name='type'] :checked").val();if(a!='A'){$("#runnerDetails input[name='cross_country']").attr({checked:""});$("#runnerDetails input[name='indoor_track']").attr({checked:""});$("#runnerDetails input[name='outdoor_track']").attr({checked:""});$("#runnerDetails").slideUp()}};beRecruited.prototype.initializePulse=function(){var t=setTimeout(function(){$("ul#ticker01").show();$("ul#ticker01").liScroll({travelocity:0.035});$("ul#ticker01").children("li").show()},500)};beRecruited.prototype.showRegisterDetails=function(){$("#newAccountDetails").slideDown();$("#cancelRegistrationDetails").show()};beRecruited.prototype.clearRegisterDetails=function(e){var a=this.value;if(a=="First Name"||a=="Last Name"||a=="you@somewhere.com"){$(this).css({color:"#000000"});$(this).attr({value:""})}};beRecruited.prototype.hideRegisterDetails=function(){$("#newAccountDetails").slideUp();$("#cancelRegistrationDetails").hide();$("#signupBody input[type='text']").css({color:"#CCCCCC"});$("#signupBody input[name='first_name']").attr({value:"First Name"});$("#signupBody input[name='last_name']").attr({value:"Last Name"});$("#signupBody input[name='email']").attr({value:"you@somewhere.com"})};beRecruited.prototype.showInnerModal=function(a){var b=$(this).offset();var c=0;var d=0;if($.browser.msie){c=140;d=200}else{c=140;d=750}$("#innerModal").css({top:parseInt(b.top)-c,left:parseInt(b.left)-d});$("#innerModal").fadeIn()};beRecruited.prototype.hideInnerModal=function(a){var b,related;if(window.event){b=this;related=window.event.toElement}else{b=a.currentTarget;related=a.relatedTarget}if(b!=related&&!Utilities.contains(b,related)){$("#innerModal").fadeOut()}};beRecruited.prototype.closeInnerModal=function(a){$("#innerModal").fadeOut()};beRecruited.prototype.hdlSportClick=function(b){var c=b.data.classRef;var d=$("#sportDashBoard");if(!$(this).hasClass('selected')){$("#selectSport ul li").children('.selected').removeClass('selected');$(this).addClass('selected');var e=this.name;var f=$("#pleaseWait_template").clone().removeClass("displayNone");var g="/dashboard/html/"+e+"/";if(!c._sportDashboardHTML[e]){$("#sportDashBoard").html("").html(f);$.get(g,{},function(a){c._sportDashboardHTML[e]=a;c.unBindSportDashBoardEvents();var t=setTimeout(function(){$('#sportDashBoard').html(a).show();c.bindSportDashBoardEvents();c.fixPng()},1000)})}else{c.unBindSportDashBoardEvents();$("#sportDashBoard").html("").html(f);var h=setTimeout(function(){$('#sportDashBoard').html(c._sportDashboardHTML[e]).show();c.bindSportDashBoardEvents();c.fixPng()},1000)}}return false};beRecruited.prototype.hdlFeaturedClick=function(d){var e=d.data.classRef;var f;$("#featuredAthlete").fadeOut(500,function(){if(!f){e.unBindSportDashBoardEvents();$("#featuredAthlete").html('<div style="height: 220px; padding-top: 25px;" class="T7">Please Wait...</div>');$("#featuredAthlete").show()}else{e.unBindSportDashBoardEvents();$("#featuredAthlete").html(f);e.bindSportDashBoardEvents();var a=$("#featuredAthleteName a").attr('name');$("#featuredLeft,#featuredRight").attr({name:a});$("#featuredAthlete").fadeIn(500);var b=setTimeout(function(){e.fixPng()},500)}});var g="/featured_athlete/html/"+this.name+"/";$.get(g,{},function(a){f=a;if(!$("#featuredAthlete").is(':animated')){$("#featuredAthlete").hide();e.unBindSportDashBoardEvents();$("#featuredAthlete").html(f);e.bindSportDashBoardEvents();var b=$("#featuredAthleteName a").attr('name');$("#featuredLeft,#featuredRight").attr({name:b});$("#featuredAthlete").fadeIn(500);var c=setTimeout(function(){e.fixPng()},500)}});return false};beRecruited.prototype.fixPng=function(){if($.browser.msie&&($.browser.version==6)){$("img[src$=png], #container").pngfix({sizingMethod:"scale"})}};beRecruited.prototype.unBindSportDashBoardEvents=function(){var a=this;$("#deluxeIcoLarge").unbind("mouseover",this.showInnerModal);$("#innerModal").unbind("mouseout",this.hideInnerModal);$("#selectSport a").unbind("click",{classRef:a},this.hdlSportClick);$("#featuredLeft,#featuredRight").unbind("click",{classRef:a},this.hdlFeaturedClick);$('#featuredAthleteImg img').unbind('load',this.setPromoFeaturedAthleteSize)};beRecruited.prototype.bindSportDashBoardEvents=function(){var a=this;$("#deluxeIcoLarge").bind("mouseover",this.showInnerModal);$("#innerModal").bind("mouseout",this.hideInnerModal);$("#selectSport a").bind("click",{classRef:a},this.hdlSportClick);$("#featuredLeft,#featuredRight").bind("click",{classRef:a},this.hdlFeaturedClick);$('#featuredAthleteImg img').bind('load',this.setPromoFeaturedAthleteSize)};beRecruited.prototype.showRunningDetails=function(a){var b=$("#signupBody #registerAsRadioBtnGroup input[name='type']:checked").val();var c=0;if(!b){c=$("#partnerVerify").length}if((b=='A'||c>0)&&(this.value==10||this.value==48)){$("#runnerDetails").slideDown();if(this.value==10){$("#runnerDetails input[name='cross_country']").attr({checked:"checked"});$("#runnerDetails input[name='indoor_track']").attr({checked:""});$("#runnerDetails input[name='outdoor_track']").attr({checked:""})}else{$("#runnerDetails input[name='cross_country']").attr({checked:""});$("#runnerDetails input[name='indoor_track']").attr({checked:"checked"});$("#runnerDetails input[name='outdoor_track']").attr({checked:"checked"})}}else{$("#runnerDetails input[name='cross_country']").attr({checked:""});$("#runnerDetails input[name='indoor_track']").attr({checked:""});$("#runnerDetails input[name='outdoor_track']").attr({checked:""});$("#runnerDetails").slideUp()}};beRecruited.prototype.setResendVerifyLink=function(a){var b=$("#signupBody input[name='email']").attr('value');this.href=this.href+'?email='+b};beRecruited.prototype.setForgotPasswordLink=function(a){var b=$("#signupBody input[name='username']").attr('value');this.href=this.href+'?email='+b};beRecruited.prototype.jumpToPage=function(a){if(this.value){location.href=this.value}};beRecruited.prototype.setUpSuckerFishNavigation=function(){$.fn.mainHoverClass=function(c){return this.each(function(){$(this).hover(function(){$(this).addClass(c);$('.form_input_menu').hide()},function(){$(this).removeClass(c);$('.form_input_menu').show()})})};$.fn.subHoverClass=function(c){return this.each(function(){$(this).hover(function(){$(this).addClass(c)},function(){$(this).removeClass(c)})})};$("#mainnav li").hover(function(){$("ul",this).fadeIn("fast")},function(){});$("#subnav li").hover(function(){$("ul",this).fadeIn("fast")},function(){});if(document.all){$("#mainnav li").mainHoverClass("sfHover");$("#subnav li").subHoverClass("sfHover")}};beRecruited.prototype.setPromoFeaturedAthleteSize=function(){var a=parseInt($('#featuredAthletePhoto #featuredAthleteImg img').width());var b=parseInt($('#featuredAthletePhoto #featuredAthleteImg img').height());if(a&&b){if(b>130){b=130}$('#featuredAthletePhoto #featuredAthleteImg').css("width",a+"px");$('#featuredAthletePhoto #featuredAthleteImg').css("height",b+"px");$('#featuredAthletePhoto #featuredAthleteImg').addClass('photoFrame');a+=20;b+=30;$('#featuredAthletePhoto').css("width",a+"px");$('#featuredAthletePhoto').css("height",b+"px");$('#featuredAthletePhoto #deluxeIcoLarge').css("display","block")}};beRecruited.prototype.toggleHighSchoolFields=function(){if(this.value==10000000){$('#hsExtra').slideDown()}else{$('#hsExtra').slideUp()}};beRecruited.prototype.toggleCountryFields=function(){if(this.value=="--"){$('#countryExtra').slideDown()}else{$('#countryExtra').slideUp()}};beRecruited.prototype.loadCollegeMajors=function(){var d=$(".formFu select[name='major']");var e=d.children().get(0);d.empty();d.append(e);if(this.value&&this.value!=50){var f=$("#majorCatSelect .loading");if(!f.attr('className')){$('#majorCatSelect').append('<div class="loading">Loading...</div>');f=$("#majorCatSelect .loading")}$('#majorExtra').hide();f.slideDown();var g="/formfu/json/load_data?type=majors&category_id="+this.value+"&jsoncallback=?";$.getJSON(g,{},function(c){$.each(c.majors,function(i,a){var b=document.createElement("option");b.value=a.id;$(b).append(a.description);d.append(b)});var t=setTimeout(function(){f.hide();$('#majorExtra').slideDown()},1000)})}else{$('#majorExtra').slideUp()}return};beRecruited.prototype.loadHighSchools=function(){var f=$("#hsSelect select[name='high_school']");var g=f.children();var h=g.get(0);var j=g.get(g.length-1);f.empty();f.append(h);if(this.value&&this.value!='--'){var k=$("#hsSelect .loading");if(!k.attr('className')){f.after('<div class="loading">Loading...</div>');k=$("#hsSelect .loading")}$("#hsExtra").slideUp();$("#hsSelect").show();f.hide();k.slideDown();var l="/formfu/json/load_data?type=high_schools&state="+this.value+"&jsoncallback=?";$.getJSON(l,{},function(e){$.each(e.high_schools,function(i,c){var d=document.createElement("optgroup");d.label=c.label;$.each(c.group,function(i,a){var b=document.createElement("option");b.value=a.value;$(b).append(a.label);$(d).append(b)});f.append(d)});var t=setTimeout(function(){k.hide();f.slideDown()},1000)})}else{f.append(j);f.value=10000000;$("#hsSelect").hide();$("#hsExtra").slideDown()}return};beRecruited.prototype.selectCardType=function(){var c=this;var d=c.value;var e={3:'A',4:'V',5:'M',6:'D'};var f;if(d.length>0){f=e[d.charAt(0)]}if(!f){$(".formFu input[name='cc_type']:checked").attr({checked:""})}var g=$(".formFu input[name='cc_type']:checked").val();if(f&&f!=g){$(".formFu input[name='cc_type'][value="+f+"]").attr({checked:"checked"})}var h=$(".formFu input[name='cc_type']");$.each(h,function(i,a){var b=$(a).next("label");if(b.length>0){if(!f||d.length<1||a.checked){if(b.hasClass("hide_label")){b.removeClass("hide_label")}}else{if(!b.hasClass("hide_label")){b.addClass("hide_label")}}}});return};beRecruited.prototype.clearDefault=function(a){var b=a.data.defaultValue;if(this.value==b){this.value=''}if($(this).hasClass("default")){$(this).removeClass("default")}return};beRecruited.prototype.submitForm=function(a){$(this).parents("form").submit();return false};beRecruited.prototype.hdlNoThanksLink=function(a){var b=location.pathname;var c;if(b=='/register/payment/upgrade'){c=home_path}else{c="/register/thankyou";var d=$(this).parents("form").children("input[name='offer_id']").val();if(d){c+="?offer_id="+d}}this.href=c;return true};beRecruited.prototype.openSecurityWin=function(a){window.open('/register/security-code/three-digit',"csc_win","menubar=0,toolbar=0,location=0,directories=0,scrollbars=0,resizable=1,width=450,height=360");return false};beRecruited.prototype.submitCoreg=function(a){$("form[name='coreg']").find("input[name='submitted']").val("Y");var b=$("#oi_coreg_placement");if(b.length>0){return sendOptIns(this)}var c=$("#kaplan_coreg_placement");if(c.length>0){var d=c.find("#coreg-slot").children("div.syndicatecoreg").attr("id");var e;if(d){var f=c.find("table.syndicateform input.submit_y");var g=c.find("table.syndicateform input.submit_n");if(f.length>0&&g.length>0){e=f.get(0).form}}if(d&&e){var h=c.find("input[name='subscribe']:checked").attr("value");if(h=='Y'){AdSyndicate.submit(e,d,'coreg-slot','Y')}else{AdSyndicate.submit(e,d,'coreg-slot','N')}setTimeout(function(){e.submit()},1000);return false}}return true};beRecruited.prototype.doSiteSearch=function(a){var b=$('#siteSearchForm');var c=this.name;if(c=='prev'||c=='next'||c=='page'){var d=b.children("input[name='cp']").val();if(c=='prev'){d--}else if(c=='next'){d++}else{d=this.innerHTML}b.children("input[name='p']").val(d)}else if(c!='submit'){b.children("input[name='"+this.name+"']").val(this.value)}else{}if(c!='f'&&c!='submit'){var e=b.children("input[name='cf']").val();if(e){b.children("input[name='f']").val(e)}}var f=b.children("input[name='q']");if(f.val()=='Search beRecruited...'){f.attr({'value':''});f.removeClass("default")}b.submit();return false};beRecruited.prototype.trackIframeView=function(){if(this.tagName=='IFRAME'&&this.id=='stack_iframe'){var c=this.contentDocument;if(!c){c=this.contentWindow}if(c){$(c).ready(function(){var a=this.location.pathname+c.location.pathname;var b=/Default\.aspx$/i;if(!(a.match(b))){if(pageTracker){pageTracker._trackPageview(a)}}})}}return};beRecruited.prototype.showMenu=function(){var a=this.name;$("#"+a).show();return false};beRecruited.prototype.hideMenu=function(){var a=this.name;$("#"+a).hide();return false};beRecruited.prototype.showVideoSampleCaption=function(a){var b=a.data.classRef;if(b.hideVideoSampleCaptionFlag){return}var t=setTimeout(function(){$(".mediaPanel #videoSampleCaption").show()},1000);return false};beRecruited.prototype.hideVideoSampleCaption=function(a){var b=a.data.classRef;$(".mediaPanel #videoSampleCaption").hide();b.hideVideoSampleCaptionFlag=true;return false};beRecruited.prototype.setPayPal=function(a){var b=$(this).parents("form").children("input[name='use_paypal']");if(b.length>0){b.val(1)}return true};beRecruited.prototype.doFBLogin=function(b){var c;if(b){c=b.data.caller}var d=FB.Facebook.apiClient;var e=d.get_session();var f=false;if(e){f=true}if(c=='login_btn'){var g=$("#loginForm input[name='fb_user_id']").val();if(!g){f=false}}var h=true;if(f){h=false;helper.showFBLoading();var g=e.uid;var i=e.session_key;var j=new FB.BatchSequencer();var k=d.users_hasAppPermission('offline_access',j);var l=d.users_hasAppPermission('publish_stream',j);j.execute(function(){var a=new Array();if(!k.result){a.push('offline_access')}if(!l.result){a.push('publish_stream')}if(a.length>0){FB.Connect.showPermissionDialog(a.join(','),function(){helper.initFBConnect(d,g,i,c)})}else{helper.initFBConnect(d,g,i,c)}})}return h};beRecruited.prototype.initFBConnect=function(l,m,n,o){var p=$("#loginForm");if(p.length>0){$.getJSON("/facebook/get-connect-data",{"fb_user_id":m,"fb_session_key":n},function(d){if(d.result||o=='login_btn'){var e=['publish_stream','read_stream','email','offline_access'];var f=new FB.BatchSequencer();var g={};for(i=0;i<e.length;i++){g[e[i]]=l.users_hasAppPermission(e[i],f)}var h=l.users_isAppUser(f);var j=l.users_getInfo([m],['uid','email_hashes'],f);var k={"fb_user_id":m,"fb_session_key":n};f.execute(function(){for(property in g){if(g[property].result){k["cache_"+property]=1}}var b;if(d.result){b=d.connect.email_hash}if(b&&j.result){var c=j.result[0].email_hashes;if(c){for(x in c){if(c[x]==b){k['cache_email_match']=1;break}}}}if(!d.result&&o=='login_btn'){k['username']=$("#loginForm input[name='username']").val();k['password']=$("#loginForm input[name='password']").val();$.post("/facebook/register-user",k,function(a){helper.submitFBLogin(m,n)},"json")}else{k['fb_crypt_key']=d.fb_crypt_key;$.post("/facebook/update-cache",k,function(a){helper.submitFBLogin(m,n,d.fb_crypt_key)},"json")}})}else{helper.showFBConnectMsg(m,n,o)}})}return};beRecruited.prototype.submitFBLogin=function(a,b,c){var d=$("#loginForm");if(d.length>0){if(a){$("#loginForm input[name='fb_user_id']").val(a)}if(b){$("#loginForm input[name='fb_session_key']").val(b)}if(c){$("#loginForm input[name='fb_crypt_key']").val(c)}$("#loginForm").submit()}return};beRecruited.prototype.showFBConnectMsg=function(a,b,c){var d=$("#loginForm");if(d.length>0){$("#loginForm input[name='fb_user_id']").val(a);$("#loginForm input[name='fb_session_key']").val(b);var e="You need to connect your accounts the first time you sign in with Facebook. Please enter your beRecruited email and password above and click sign in. Don't have an account? "+'<a class="L4" href="/register">Sign up Now!</a>';$("#fbLogin").html('<div class="T8">'+e+'</div>')}return};beRecruited.prototype.showFBLoading=function(){var a=$("#fbLogin");if(a.length>0){$("#fbLogin").html('<div style="text-align: center;">'+'<img src="'+static_path+'/imgs/fb_loading.gif" width="32" height="32" alt="" border="0"/>'+'</div>')}return};beRecruited.prototype.checkRequiredFields=function(){var d=$(this).parents("form").find(":input[name^='r_']");var e;$.each(d,function(i,a){var b=$(a).attr("name");var c=$(a).val();if(!c||c==''){e=a;return false}});var f=true;if(e){var g=$(e).attr("name");var h=g.substring(2,g.length).toUpperCase();h=h.replace('_',' ');alert("The "+h+" field is required.");f=false}return f};beRecruited.prototype.openExternalOffer=function(){setTimeout(function(){var a=$("#beIntOffer a.externaloffer").attr("name");var b=base_path+'/cgi-bin/offers.pl?action=Clicked&offer='+a;location.href=b},1000);return true};beRecruited.prototype.showCollegeTrackerOptions=function(){$(this).find(".ctOptions:hidden").show()};beRecruited.prototype.hideCollegeTrackerOptions=function(){$(this).find(".ctOptions:visible").hide()};beRecruited.prototype.collegeTrackerAjax=function(f){var g=f.data.classRef;var h=$(this).parents(".ctItem");var i=$(this).parents(".ctItem").clone(true);var j=h.attr("width");h.html('<div style="padding: 10px;">'+'<div style="margin-bottom: 5px;">'+'<img src="'+static_path+'/imgs/ajax-loader2.gif" border="0" alt=""/>'+'</div>'+'<div>'+'One Moment Please...'+'</div>'+'</div>');var k=$(this).attr("href");k+="&nocache="+new Date().getTime();var l=$(this).parent("span").attr("class");l=l.replace("Link","");$.getJSON(k,{},function(a){var b=a.result;var c=a.message;var d;if(b){d='<b>Success!</b>';i.find("."+l+"Icon").removeClass("displayNone");i.find("span."+l+"Link").remove()}else{d='<b>Error!</b>'}d+=' '+c;h.html('<div class="T6 black" style="padding: 10px;">'+d+'</div>');i.addClass("displayNone");var e=h.parents("div.trackerDiv");e.find(".ctOptions a").unbind("click");e.find(".ctOptions a").bind("click",function(){return false});var t=setTimeout(function(){h.fadeOut("def",function(){e.find(".ctOptions a").unbind("click");e.find(".ctOptions .ajaxLink").bind("click",{"classRef":g},g.collegeTrackerAjax);h.replaceWith(i);i.fadeIn("def")})},4000)});return false};beRecruited.prototype.showTrackerHelp=function(){var a=$(this).parents("div.trackerDiv").attr("id");$("#"+a).fadeOut("def",function(){$("#"+a+"Help").fadeIn("def")});return false};beRecruited.prototype.hideTrackerHelp=function(){var a=$(this).parents("div.trackerHelpDiv").siblings("div.trackerDiv").attr("id");$("#"+a+"Help").fadeOut("def",function(){$("#"+a).fadeIn("def")});return false};beRecruited.prototype.showTrackerDefs=function(){var a=$(this).parents("div.trackerDiv").attr("id");$("#"+a).fadeOut("def",function(){$("#"+a+"Defs").fadeIn("def")});return false};beRecruited.prototype.hideTrackerDefs=function(){var a=$(this).parents("div.trackerDefsDiv").siblings("div.trackerDiv").attr("id");$("#"+a+"Defs").fadeOut("def",function(){$("#"+a).fadeIn("def")});return false};beRecruited.prototype.showEditPhotoLink=function(){$(this).find("div.editPhotoLink").show();return};beRecruited.prototype.hideEditPhotoLink=function(){$(this).find("div.editPhotoLink").hide();return};beRecruited.prototype.disableFormSubmit=function(){var a=$(this).parents("form").attr("id");if(a){$("#"+a).find("input.submit").each(function(i,o){$(o).unbind("click");$(o).bind("click",function(){return false})});var b=$(this).parents("div.submitContainer");b.hide();b.after('<div class="pt3"><div class="loading">One Moment Please...</div></div>');b.parent().find("div.loading").show()}return true};
