if(typeof CB.SAT==="undefined"||!CB.SAT){CB.SAT={};}var SAT=CB.SAT;SAT.compareStateChartVisualizeHook=(function(b){var a={percentageBarGraph:true,labels:false,ylabel:false,ylabelIntervalLine:false,appendKey:false,appendTitle:false,parseDirection:"x",barMargin:0,barGroupMargin:0,colors:["#787001","#a8931b"],width:350,height:180};return{init:function(){b.jqmWrapper.customize({compareStatsLink:{actions:{onLoad:function(d,c){$(d.w).find("table#compareState").visualize(a);}}}});$("table#compareState").visualize(a);}};})(CB);SAT.toggleSatTestDates=(function(b){var a=0;return{init:function(c){$(c.trigger).click(function(){var f=$("#"+c.target+$(this).val()),d=f.parents("table").find("tbody > tr:first"),e;if($(this).attr("checked")==true){if(a===0){f.parents("div#satTestDateTable").show();f.parents("table").find("thead > tr").show();}if(d[0]!==f[0]){e=f.remove();$(e).insertBefore(d).show();}else{f.show();}a++;}else{f.hide();a--;if(a===0){f.parents("div#satTestDateTable").hide();f.parents("table").find("thead > tr").hide();}}});$(c.trigger).each(function(){if($(this).attr("checked")){$(this).click().attr("checked","checked");}});}};})(CB);CB.timer=$(function(){pageTimerFn=function(j){var f=j.counter++;if(f<10){var h="0:0"+f;}else{if(f<60){var h="0:"+f;}else{if(f<3600){var g=Math.floor(f/60);var k=f-(g*60);if(k<10){k="0"+k;}var h=g+":"+k;}else{var i=Math.floor(f/3600);var e=Math.floor((f-(i*3600))/60);if(e<10){e="0"+e;}var k=f-(e*60)-(i*3600);var h=i+":"+e+":"+k;}}}$("#timerText").html(h);};$(".questionForm").attr("aria-disabled","true");var d=$("#questionFormContainer").height();var c=$("#questionFormContainer").width();$(".questionTimerModal, .questionTimerModalBg").css("height",d);$(".questionTimerModal, .questionTimerModalBg").css("width",c);$(".questionTimerModalBg").css("opacity",1);$("#timerModalPanel").append("<a id='timerStart' href='#questionFormContainer'>START TIMER</a>");if($(".pageTimer")){var a=new Object({counter:1});var b=0;$("#timerStart").click(function(e){b=setInterval(pageTimerFn,1000,a);$(".questionTimerModal").css("display","none");$(".questionForm").attr("aria-disabled","false");$("#timerPause").css("display","inline");e.preventDefault();});$("#timerPause").click(function(e){clearInterval(b);$("#timerPause").css("display","none");$(".questionForm").attr("aria-disabled","true");$(".questionTimerModal").css("display","block");e.preventDefault();});}});CB.jqmWrapper.customize({cbmTriggerResetStats:{actions:{onLoad:function(b,a){jQuery("#myOrgQotdResetReset",b.w).click(function(){jQuery("tr","#myOrgQotdStats").each(function(){jQuery(jQuery("td",this)[1]).html("0/0");jQuery(jQuery("td",this)[2]).html("0%");});});}}}});CB.jqmWrapper.customize({cbmTriggerHandshake:{actions:{onShow:function(b,a){b.c.ajax="/html/cbm/handshake.html";},onLoad:function(b,a){CB.utils.setParams(jQuery(b.t),{decorator:"none"},true);b.w.find("#handshakeContinue").attr("href",jQuery(b.t).attr("href"));CB.omniture.init({type:"pageView",properties:{pageName:"SATSitePopup:exitsite"}});}}}});CB.jqmWrapper.customize({cbmTriggerInline:{actions:{onShow:function(b,a){CB.omniture.init({type:"pageView",properties:{pageName:"SATSitePopup:"+jQuery(b.t).text().replace(/\s/g,"")}});}}}});CB.jqmWrapper.customize({cbmTriggerStatic:{actions:{onShow:function(b,a){CB.omniture.init({type:"pageView",properties:{pageName:"SATSitePopup:"+jQuery(b.t).text().replace(/\s/g,"")}});}}}});SAT.TDS=(function(b){var e,d,c,a;e=function(f){if(!jQuery("#"+f.drawPlayerTo)[0]){return false;}else{d(f);c(f);}};d=function(f){CB.utils.swfObject({swfUrl:f.src,id:f.drawPlayerTo,width:f.width,height:f.height,params:{allowFullScreen:"true",allowScriptAccess:"always",wmode:"transparent",quality:"autohigh"},flashvars:{JSON:escape(jQuery.toJSON({config:{},custom:f.json,aSrcAccount:s_account}))},attributes:{id:f.playerId}});};c=function(k){var l=0,m,j,f,g,h,n;jQuery(k.drawThumbsTo).html("");j=jQuery('<ul class="testDaySimVideoBlocks"></ul>').appendTo(k.drawThumbsTo);for(l;l<k.json.clips.length;l++){f=jQuery('<li class="videoBlockContent roundies"></li>').appendTo(j);n=jQuery('<div class="videoBlockContent"></div>').appendTo(f);g=jQuery('<a href="#'+k.drawPlayerTo+'" title="'+k.json.clips[l].title+'"></a>').appendTo(n);h=jQuery('<img src="'+k.json.clips[l].thumbPath+'" alt="'+k.json.clips[l].title+'" />').appendTo(g);jQuery('<div><h5 style="color:#'+k.json.clips[l].color.split("x")[1]+'">'+k.json.clips[l].title+"</h5></div>").appendTo(n);jQuery(f,g,n).css("cursor","pointer").bind("click",function(i){return function(){a(i,k);};}(l));}};a=function(h,f){var g=jQuery("#"+f.playerId);if(g[0]){g[0].loadThisClip(h);}};return{init:e};})(CB);SAT.countdownTimer=(function(n){var h,c,f,l,p,g,q,a,i,b,o,r,k,d,j,m,e;h=function(t){c=jQuery("#"+t.timeRemainingId).html().split(":");p=jQuery("#"+t.countDownContainerId);g=t.noJSClass;q=t.countingDownClass;a=t.endedClass;e=10;o=p.offset().top;b();f();};b=function(){jQuery(window).scroll(function(){if(i){clearTimeout(i);}i=setTimeout("SAT.countdownTimer.onScroll()",100);});};f=function(){r=new Date();k=new Date();var t=parseInt(c[0]*60)+parseInt(c[1]);p.removeClass(g);p.addClass(q);p.html(_twoDgt(c[0])+":"+_twoDgt(c[1]));if(t<=0){p.html("00:00");_changeColor();}else{k.setSeconds(k.getSeconds()+t);m=setInterval("SAT.countdownTimer.countDown()",1000);}};d=function(){var u=k;var v=_toUTC(u)-_toUTC(r);var t=new Date(v);t.setSeconds(t.getSeconds()-1);u.setSeconds(u.getSeconds()-1);p.html(_twoDgt(t.getMinutes())+":"+_twoDgt(t.getSeconds()));if(t.valueOf()<=0){_changeColor();clearInterval(m);return;}};j=function(){p.stop();var t=jQuery(window).scrollTop();var v=$("#cancelButton").offset().top-100;var u=(t>o&&t<v)?t-o+20:(t>v)?e:10;p.animate({top:u},{duration:"fast",easing:"linear"});e=u;i=null;};_twoDgt=function(t){return String(t).replace(/^(\d)$/,"0$1");};_changeColor=function(){p.removeClass(q);p.addClass(a);};_toUTC=function(t){var u=t;return Date.UTC(u.getFullYear(),u.getMonth(),u.getDay(),u.getHours(),u.getMinutes(),u.getSeconds(),u.getMilliseconds());};return{init:h,countDown:d,onScroll:j};})(CB);SAT.AI=(function(c){var f,e,b,d,a;f=function(g){if(!jQuery("#"+g.playerTop)[0]){return false;}else{a();b(g);e(g,0,1);g.drawPlayerTo=g.playerId;d(g);}};a=function(){jQuery(".qotdChoiceList li").css("background","none");jQuery(".qotdChoiceList input").addClass("accessHide");jQuery(".qotdChoiceList label").css({"padding-left":0,"margin-left":0});};e=function(g,h,i){jQuery(g.json.aiConts).hide();jQuery(jQuery(g.json.aiConts)[h]).show();CB.utils.swfObject({swfUrl:g.json.aiQs[h].swfPath,id:g.drawPlayerTo,width:"680",height:"245",version:"10",params:{allowFullScreen:"true",allowScriptAccess:"always",wmode:"opaque",quality:"autohigh"},flashvars:{JSON:escape(jQuery.toJSON({aSrcAccount:s_account}))},attributes:{id:g.playerId,tabindex:1}});if(typeof i==="undefined"||!i){CB.omniture.init({type:"pageView",properties:{pageName:(h===0)?s.pageName:"sat/practice/answers-imagined/"+g.json.aiQs[h].pageName,events:"event7"}});}};b=function(l){var k,i,g,h;i=jQuery('<ul class="none answersImagingedBar"></ul>').appendTo(jQuery("#aiQuestionsBar"));for(k=0;k<l.json.aiQs.length;k++){g=jQuery('<li class="floatLeft '+(((k+1)==l.json.aiQs.length)?"last":"")+" "+((k==0)?"active":"")+'"></li>').appendTo(i);h=jQuery('<a href="#'+l.playerTop+'" title="'+l.json.aiQs[k].title+'">'+l.json.aiQs[k].title.replace(">","><br />")+"</a>").appendTo(g);jQuery(h).css("cursor","pointer").bind("click",function(j){return function(){jQuery(this).parent().parent().children().removeClass("active");jQuery(this).parent().addClass("active");e(l,j);};}(k));}};d=function(l){var m=0,k,g,h,j;jQuery(l.drawThumbsTo).html("");k=jQuery('<ul class="none moreAnswersImagined"></ul>').appendTo(l.drawThumbsTo);for(m;m<l.json.aiQs.length;m++){g=jQuery('<li class="floatLeft"></li>').appendTo(k);h=jQuery('<a href="#'+l.playerTop+'" title="'+l.json.aiQs[m].title+'"'+((m%2)?' class="dlm"':"")+"></a>").appendTo(g);j=jQuery('<img src="'+l.json.aiQs[m].thumbPath+'" alt="'+l.json.aiQs[m].title+'" />').appendTo(h);jQuery(h).css("cursor","pointer").bind("click",function(i){return function(){e(l,i);};}(m));}};return{init:f};})(CB);SAT.timeline=(function(c){var h,f,b,i,a,e,d,g;g={clips:[{flvPath:"http://media.collegeboard.com/SAT/media/video/history-of-sat/1901.flv",year:"1901",title:"What started as an acorn"},{flvPath:"http://media.collegeboard.com/SAT/media/video/history-of-sat/1926.flv",year:"1926",title:"Leveling the playing field"},{flvPath:"http://media.collegeboard.com/SAT/media/video/history-of-sat/1937.flv",year:"1937",title:"Achievement Tests show where students shine"},{flvPath:"http://media.collegeboard.com/SAT/media/video/history-of-sat/1939.flv",year:"1939",title:"Bubble sheets and electronic scoring"},{flvPath:"http://media.collegeboard.com/SAT/media/video/history-of-sat/1941.flv",year:"1941",title:"Standardizing the SAT"},{flvPath:"http://media.collegeboard.com/SAT/media/video/history-of-sat/1958.flv",year:"1958",title:"Students get to see their scores"},{flvPath:"http://media.collegeboard.com/SAT/media/video/history-of-sat/1965.flv",year:"1965",title:"Civil rights and the SAT"},{flvPath:"http://media.collegeboard.com/SAT/media/video/history-of-sat/1969.flv",year:"1969",title:"Introduction of student fee waivers"},{flvPath:"http://media.collegeboard.com/SAT/media/video/history-of-sat/1977.flv",year:"1977",title:"A nationwide test"},{flvPath:"http://media.collegeboard.com/SAT/media/video/history-of-sat/1984.flv",year:"1984",title:"Getting to know the SAT"},{flvPath:"http://media.collegeboard.com/SAT/media/video/history-of-sat/1994.flv",year:"1994",title:"Changing times, changing test"},{flvPath:"http://media.collegeboard.com/SAT/media/video/history-of-sat/1995.flv",year:"1995",title:"The original College Board Online"},{flvPath:"http://media.collegeboard.com/SAT/media/video/history-of-sat/2005.flv",year:"2005",title:"The new SAT"},{flvPath:"http://media.collegeboard.com/SAT/media/video/history-of-sat/2009.flv",year:"2009",title:"It's your choice"}]};h=function(j){if(!jQuery("#"+j.drawPlayerTo)[0]){return false;}else{localConfig=j;b(j);a(j.content);}};a=function(j){jQuery(document).ready(function(){jQuery("div:not(:first)",j).addClass("accessHide");e=jQuery("div",j).eq(0);});};d=function(j){jQuery(e).fadeOut("1000",function(){jQuery(this).addClass("accessHide").attr("style","");jQuery("div",localConfig.content).eq(j).removeClass("accessHide").css({zoom:1});});e=jQuery("div",localConfig.content).eq(j);jQuery(localConfig.title).html(g.clips[j].title);};b=function(j){CB.utils.swfObject({swfUrl:j.src,id:j.drawPlayerTo,width:j.width,height:j.height,params:{allowFullScreen:"true",allowScriptAccess:"always",wmode:"transparent",quality:"autohigh"},flashvars:{JSON:escape(jQuery.toJSON({config:{},custom:g,aSrcAccount:s_account}))},attributes:{id:j.playerId}});};return{JSON:g,showText:d,init:h};})(CB);SAT.formatDate=(function(b){var a=new Date();fullYear=a.getFullYear();jQuery(b).html(fullYear);});SAT.answerExplanations=(function(){if(jQuery("#mainBody").hasClass("viewQA")){$("#sectionSubmit").addClass("sectionSubmitOff");$("#sectionSelector").submitForm({eventType:"change"});$("#answersExplanation").submitForm({eventType:"click",formName:"#viewAnswersAndExplanationsForm"});$("#ansExplanations").addClass("ansExplanationsOff");$("#summaryLink").submitForm({eventType:"click",formName:"#viewAnswersAndExplanationsForm"});$("#summaryBtn").addClass("summaryBtnOff");$("#previousSection").click(function(){var a=$("#viewAnswersAndExplanationsForm_sectionNumber").val();document.getElementById("explanationSectionChooser").sectionNumber.value=a-1;$("#explanationSectionChooser").submit();});$("#nextSection").click(function(){var a=$("#viewAnswersAndExplanationsForm_sectionNumber").val();document.getElementById("explanationSectionChooser").sectionNumber.value=parseInt(a)+1;$("#explanationSectionChooser").submit();});}});SAT.mboxes=(function(){var a;a={swapText:function(b){jQuery(b.location).html(b.locationText);return a;},setEvent:function(b){jQuery(b.location)[b.eventType](b.eventToSet);return a;}};return{controllers:a};})();CB.jqmWrapper.customize({cbmTriggerVisualize:{actions:{onShow:function(b,a){CB.omniture.init({type:"pageView",properties:{pageName:"SATSitePopup:"+jQuery(b.t).text().replace(/\s/g,"")}});}}}});$(function(){var a=$("#questionOfTheDayCalendar");a.find("input").hide();a.find("#questionYear").change(function(){var b=$(this);if(b.val()){b.val()!==b.find("option:eq(1)").val()&&a.append('<input name="oq" value="1" type="hidden" />');a.submit();}});});var $satInit=true;$(document).ready(function(){CB.utils.sfHover($(".cbNav li"));if($.browser.msie){$(".pageTabs .roundies, .pageTabs .roundies12").ieTabStates();}$(".siteBranding span").mouseover(function(){$(".satLogoAM").show();}).mouseout(function(){$(".satLogoAM").hide();});$("#siteSearchText, #myOrgUserName").inputText();SAT.formatDate("#footerYear");CB.jqmWrapper.init();CB.twirl({omniture:true});CB.utils.printPage("pgContainer","printPage");jQuery(".cbTriggerPrint").printDialog();CB.utils.addOrSwpImg({el:$("#bannerSpan"),klass:"printOnly",imgSrc:"/img/satLogoOver.gif"});$("a.cbSmoothScroll:not(.twirlerThirdParty), .cbSmoothScroll a:not(.twirlerThirdParty)").click(function(){$($(this).attr("href")).scrollTo("500");return false;});if(jQuery("body").hasClass("practiceSection")){CB.utils.browserPopUp($("#questionMetaContainer a.popUp"));$(".qotdPercentCorrectTable").visualize({labels:false,type:"pie",colors:["#819433","#C9D5BD"],appendTitle:false,pieMargin:0,appendKey:false,width:32,height:32});$("#wantAHintLink").setFormElementValue("#hintUsed","true","click");practiceTestBubbles=function(){$(".answerBubbleTable input, .pracScanTronList input").customInput();};practiceTestBubbles();$("#practiceTips").simplePager({content:".practiceTip",targetPagerCont:".practiceTipsNav",prevNextCont:".practiceTipsPrevNext",prevClass:"button floatLeft",nextClass:"button floatRight",navULClass:"pageTabs topNumberedTabs",navLIClass:"roundies",callback:function(ul){if($.browser.msie){if(ul.hasClass("pageTabs")){$(".roundies",ul).ieTabStates();}}}});$(".fpTestPaginate").simplePager({content:".fpTestContent",targetPagerCont:".fpTipsNav",prevNextCont:".fpTestPrevNext",prevClass:"button drm",scrollTo:"#fullPracticeQuestion",nextClass:"button",navULClass:"pageTabs topNumberedTabs",navLIClass:"roundies",callback:function(ul,contentDiv){if($.browser.msie){if(ul.hasClass("pageTabs")){$(".roundies",ul).ieTabStates();}}$(ul).find("li").each(function(i){var anchor=$(contentDiv[i]).find(window.location.hash);if(anchor.length!==0&&i!==0){$("a",this).click();$(anchor).scrollTo();}});}});$("a[class^=cbClearFormElement]").click(function(){var klass=this.className.match(/\bcbClearFormElement.*?\b/)[0];$("input."+klass+"Target:text, ."+klass+"Target input:text").val("");$("input."+klass+"Target:radio, ."+klass+"Target input:radio").attr("checked","");$("input."+klass+"Target:radio, ."+klass+"Target input:radio").parents(".custom-radio").find(".checked").removeClass("checked");return false;});$("#freePracticeTabs li a").tabs({selectorMethod:"parent"});$("#practiceMethodDirectionsExampleQ").exampleQuestion();$("#answerTableForm-mathSPRq1, #answerTableForm-mathSPRq2,#answerTableForm-mathSPRq3").exampleQuestion({type:"spr"});$("#testYourSkillsInThisBandList .reviewAnswerListContent").skillsInsight();$(".subjectTestFillHeight > .contentModule").fillHeight();$(".subjectTestFillHeight, .subjectTestFillHeightMulti").fillHeight({type:"multi",toMatch:".contentModule"});$("#studyPlanForm").validate({messages:{testType:"Please select a test",testFreq:"Please indicate how many times you've taken it",testDate:"Please indicate when you'll take it"},errorContainer:"#studyPlanErrors",errorLabelContainer:"#studyPlanErrors ul",wrapper:"li"});$("#qotdShowAnswer").submitForm({eventType:"click",formName:"#showAnswerForm"});SAT.answerExplanations();}else{if(jQuery("body").hasClass("registerSection")){SAT.toggleSatTestDates.init({trigger:"#satSubjTestDateFinder input[type=checkbox]",target:"satSubjectTestDates"});$("#showHideCDPlayerLink").toggleShowHide("Remove it from the list.");$("#removeCDPlayerLink").smoothHide({callback:function(){$("#showHideCDPlayerLink").toggleText("Remove it from the list.","Add it to the list.");}});$("#codeSearchTypeForm").xhrForm({responseLocation:"#searchResultsWrapper",setup:function(form){form.find("#codeSearchSection").submitForm({eventType:"change"});},callback:function(response){$(this.responseLocation).empty();var flagEls=$(response).find("input, select");if(!flagEls[0]){$("#codeSearchResultsWrapper").html(response);}else{$("#searchFormFieldsWrapper").html(response).find("#codeSearchSection, #codeSearchMajorsSelect, #codeSearchRegion").submitForm({eventType:"change"});$("#codeSearchCountrySelect","#searchFormFieldsWrapper").change(function(){if($(this).val()==="US"||$(this).val()==="000"){$("#codeSearchStateSelect").attr("disabled","");$("#codeSearchStateSelect").removeClass("setDisabled");}else{$("#codeSearchStateSelect").attr("disabled","true");$("#codeSearchStateSelect").addClass("setDisabled");$("#codeSearchStateSelect").val($("#codeSearchStateSelect option:first").val());}});}}});$("#codeSearchForm").xhrForm({responseLocation:"#searchResultsWrapper",setup:function(form){form.find("#codeSearchSection, #codeSearchMajorsSelect, #codeSearchRegion").submitForm({eventType:"change"});},callback:function(response){jQuery(this.responseLocation).html("");jQuery(response).appendTo(this.responseLocation);jQuery(this.responseLocation).scrollTo("500");jQuery("input.setDisabled, select.setDisabled","#codeSearchForm").attr("disabled","true");}});$("#overseasAdvisingCenterForm").xhrForm({responseLocation:"#formFieldsWrapper",setup:function(form){form.find("#overseasRegion, #overseasCountry, #overseasCity").submitForm({eventType:"change"});},callback:function(response){$("#codeSearchResultsWrapper").empty();var flagEls=$(response).find("input, select");if(!flagEls[0]){$("#codeSearchResultsWrapper").html(response);$("#codeSearchResultsWrapper").scrollTo("500");}else{$("#formFieldsWrapper").html(response).find("#overseasRegion, #overseasCountry, #overseasCity").submitForm({eventType:"change"});}}});$("#scoreFAQTabs li a").tabs({selectorMethod:"parent"});$("#scoresCompareScoresTabs li a").tabs({selectorMethod:"parent"});$(".selectAGradeLevel a").tabs({callback:function(el){$(el.attr("href")).scrollTo("500");}});$("#compareScores > ul a").tabs({selectorMethod:"parent"});$("#closedTestCentersTabBlockTabs li a").tabs({selectorMethod:"parent"});}else{if(jQuery("body").hasClass("scoresSection")){$("#verifySatScoresTabs a").tabs({selectorMethod:"parent"});$("#cancelingScore > .contentModule, #cancelByNotice > .contentModule").fillHeight();}else{if(jQuery("body").hasClass("whysatSection")||/^\/about-tests/.test(location.pathname)){}else{if(jQuery("body").hasClass("homeSection")&&/^\/home/.test(location.pathname)){$("#homeLatestNewsContainer .contentModule").simplePager({content:".rotatingPromo",targetPagerCont:".homeLatestNewsButtons",autoRotate:"5",transition:"fast",callback:function(ul,contentDiv){$(ul).find("li").each(function(i){var anchor=$(contentDiv[i]).find("h4 a");if(anchor.length===0){$(contentDiv[i]).find("h4").addClass("default");$(this).addClass("default");}else{var href=anchor.attr("href");if(/\//ig.test(href)){var section=anchor.attr("href").split("/")[1].toLowerCase();section=(section=="practice"||section=="register"||section=="scores"||section=="why-sat")?section:"default";$(contentDiv[i]).find("h4").addClass(section);$(this).addClass(section);}else{$(this).addClass("default");}}});}});$("#satNavPractice, #satNavRegister, #satNavScores, #subNavIdpracticeHome, #subNavIdregisterSATHome, #subNavIdscoresSATHome, #practiceHeaderLink, #regHeaderLink, #scoreHeaderLink, #regNowContLink, #sendScoresContLink").click(function(){var _url,_delay;mboxUpdate("SAT_Homepage","click="+this.id);_url=(this.href)?this.href:$("a",this).attr("href");_delay=function(){setTimeout(function(){location=_url;},150);};_delay();return false;});$("#homeVertRegister > .contentModule, #homeVertPractice > .contentModule, #homeVertScores > .contentModule").fillHeight();$("#homeWhySATCallout > .contentModule, #homeFeedbackCallout > .contentModule").fillHeight();$("#homeLatestNewsContainer, #registerNowContainer").fillHeight({type:"multi",toMatch:".contentModule"});}}}}}$("#overseasAdvisingCenterModuleForm").xhrForm({responseLocation:"#formFieldsWrapper",setup:function(form){form.find("#overseasRegion, #overseasCountry, #overseasCity").submitForm({eventType:"change"});},callback:function(response){$("#formFieldsWrapper").html(response);$("#formFieldsWrapper").find("#overseasCity").bind("change",function(){$(this).parents("form").unbind().submit();});$("#formFieldsWrapper").find("#overseasRegion, #overseasCountry").submitForm({eventType:"change"});}});$("#challengeFriendCalloutForm").xhrForm({responseLocation:"#challengeFriendModule form",valid:function(){return jQuery(this.responseLocation).valid();},callback:function(response){if(jQuery(response).is("#challengeFriendConfirmModule")){jQuery(this.responseLocation).attr("action",jQuery(response).find("form").attr("action"));}jQuery(this.responseLocation).html("");jQuery(jQuery(response).find("form").html()).appendTo(this.responseLocation);jQuery(response).each(function(){if(jQuery(this).is("script")){eval(jQuery(this).html());}});}});$("#practiceTipsSignupForm").xhrForm({responseLocation:"#signUpForPracticeTipsCallout form",valid:function(){return jQuery(this.responseLocation).valid();},callback:function(response){jQuery(this.responseLocation).html("");jQuery(jQuery(response).find("form").html()).appendTo(this.responseLocation);}});$("#pageModuleSubscribeForm").xhrForm({responseLocation:"#moreQotdLoggedIn",callback:function(response){jQuery(this.responseLocation).html(jQuery(response).find(this.responseLocation).html());}});$("#satSubjectTestMenu").ulToSelectElm({initialOption:"Choose One",callback:function(selectElm){var initialOption=this.initialOption;selectElm.change(function(){if(jQuery(this).val()!==initialOption){window.location=jQuery(this).val();}});}});$.validator.addMethod("matchEmailContact",function(){return $("#contactConfirmEmail").val()==$("#contactYourEmail").val();});$.validator.addMethod("inquiryTypeRequired",function(){return $("#inquiryType").val()!=-1;});$("#contactUsForm").validate({rules:{sender:{email:true},contactConfirmEmail:{matchEmailContact:true},inquiryType:{inquiryTypeRequired:true}},messages:{contactYourName:"Please enter your name",sender:{required:"Please enter your e-mail address",email:"Your email address must be in the format of name@domain.com"},contactConfirmEmail:{required:"Please confirm your e-mail address",matchEmailContact:"Please make sure that your e-mail addresses match"},Subject:"Please enter the subject of your message",inquiryType:"Please select an inquiry type",comments:"Please enter a comment"},errorContainer:"#contactErrors",errorLabelContainer:"#contactErrors ul",wrapper:"li"});$("#practiceTipsSignupForm").validate({rules:{email:{email:true}},messages:{email:{required:"Please enter your e-mail address",email:"Your email address must be in the format of name@domain.com"},qotdEmailCaptcha:"Please enter the letters above"},errorContainer:"#practiceTipsErrors",errorLabelContainer:"#practiceTipsErrors ul",wrapper:"li"});$("#challengeFriendCalloutForm").validate({rules:{email:{email:true}},messages:{email:{required:"Please enter your e-mail address",email:"Your email address must be in the format of name@domain.com"},friendEmails:"Please enter at least one email address",qotdEmailCaptcha:"Please enter the letters above"},errorContainer:"#challengeFriendErrors",errorLabelContainer:"#challengeFriendErrors ul",wrapper:"li"});$("#myOrgLogin").validate({messages:{password:"<strong>!</strong> Enter your password"},errorContainer:"#myOrgErrors",errorLabelContainer:"#myOrgErrors ul",wrapper:"li"});$("#resultsSelect").submitForm({eventType:"change"});});$(document).ready(function(){var f=false;var g;var e;jQuery.each(jQuery.browser,function(h){if($.browser.msie){f=true;}else{f=false;}});$(".viewQuestion").click(function(){g=$(this).attr("id");e=g.substr(12);showName="#subQsReview"+e;$("#subQsReviewContent").addClass("makeMeVisible");$("#subQsReviewList").children("li").addClass("makeMeHide");$(showName).removeClass("makeMeHide").addClass("makeMeVisible");$(".viewQuestion").removeClass("roundies");$(".viewQuestion").removeClass("activeAnswer");$(this).addClass("activeAnswer");if(!f){$(this).addClass("roundies");}});$(function(){if($("#satSubStudyGuideModalLink").length&&$("#cbmTriggerInlineModal").length){$("#cbmTriggerInlineModal").addClass("satSubStudyGuideModal");}$("#sptStudyGuideLink").click(function(){$("#cbmTriggerInlineModal:has(#sptStudyGuideBody)").addClass("sptGuideModal");$("#cbmTriggerInlineModal:has(#sptStudyGuideBody).cbmContents").css("z-index","1");$(".practiceSection .jqmOverlay").css("z-index","1");});$("#satRegFeeExampleLink").click(function(){$("#cbmTriggerInlineModal:has(#satRegFeeExample)").addClass("feesExampleModal");});});$(function(){$("#totalResultsSummary div dl").horizontalBarGraph({colors:["#019464","#FD0000","#FFF"],interval:1.1});$("#easyResultsSummary dl").horizontalBarGraph({colors:["#019464","#FD0000","#FFF"],interval:1.1});$("#mediumResultsSummary dl").horizontalBarGraph({colors:["#019464","#FD0000","#FFF"],interval:1.1});$("#hardResultsSummary dl").horizontalBarGraph({colors:["#019464","#FD0000","#FFF"],interval:1.1});$("#visualResultsLink").click(function(){$("#cbmTriggerInlineModal:has(#totalResultsSummary)").addClass("visualModal");});});function a(i){var j=(questionsDisplayed*i);var h=(questionsDisplayed*(i+1));for(index=j;index<h&&current>=j&&current<h;index++){$("#practiceTestProgress li.roundies").eq(index).removeClass("pageHide");}}function c(i,h){if($(i).hasClass("disabled")){$(i).removeClass("disabled");}if($(h).hasClass("linkDisabled")){$(h).removeClass("linkDisabled");}$(i).addClass("enable");}function b(i,h){if($(i).hasClass("enabled")){$(i).removeClass("enabled");}$(h).addClass("linkDisabled");$(i).addClass("disabled");}function d(h){do{h=h.nextSibling;}while(h&&h.nodeType!=1);return h;}$("#sptAdditionalThingsExpand").click(function(){$("#sptAdditionalInfo1").addClass("twirled");$("#choosingMath12Twirldown").show();$("#sptAdditionalInfo2").addClass("twirled");$("#useCalculatorTwirldown").show();$("#sptAdditionalInfo3").addClass("twirled");$("#calculatorTipsTwirldown").show();$("#sptAdditionalInfo4").addClass("twirled");$("#questionsGeometicTwirldown").show();});$("#sptAdditionalThingsCollapse").click(function(){$("#sptAdditionalInfo1").removeClass("twirled");$("#choosingMath12Twirldown").hide();$("#sptAdditionalInfo2").removeClass("twirled");$("#useCalculatorTwirldown").hide();$("#sptAdditionalInfo3").removeClass("twirled");$("#calculatorTipsTwirldown").hide();$("#sptAdditionalInfo4").removeClass("twirled");$("#questionsGeometicTwirldown").hide();});});(function(a){a.fn.carouseljq=function(b){var h={controlsContainer:"cjq-controls-container",slides:"carouseljq-panel",firstcontrol:"cjq-first-btn",lastcontrol:"cjq-last-btn",nextcontrol:"cjq-next-btn",pagescontrol:"cjq-page-btn",paginationContainer:"cjq-pagination-container",prevcontrol:"cjq-prev-btn",startcontrol:"cjq-start-btn",stopcontrol:"cjq-stop-btn"},e={autoSlide:true,classes:h,controls:{first:'<button class="'+h.firstcontrol+'"> First </button>',last:'<button class="'+h.lastcontrol+'"> Last </button>',next:'<button class="'+h.nextcontrol+'"> Next </button>',pages:'<button class="'+h.pagescontrol+'"></button>',prev:'<button class="'+h.prevcontrol+'"> Previous </button>',start:'<button class="'+h.startcontrol+'"> Start </button>',stop:'<button class="'+h.stopcontrol+'"> Stop </button>',enableControls:false,enablePagination:true,enableFirst:true,enableLast:true,enableNext:true,enablePrev:true,enableStart:true,enableStop:true},devMode:false,rotationTime:3000,startingSlide:1},k=e,j=e.classes,l,i={carouselHeight:0,carouselWidth:0,currentSlide:0,nextSlide:0,prevSlide:0,slideInt:0,totalSlides:0},d=i,g={devMode:function(){if(k.devMode){a(".cjq-debug").remove();n.append('<div class="cjq-debug"></div>');a(".cjq-debug",n).append("<p>Dev Mode:"+k.devMode+"</p>","<p>Current Slide:"+d.currentSlide+"</p>","<p>Next Slide:"+d.nextSlide+"</p>","<p>prev Slide:"+d.prevSlide+"</p>","<p>Auto Slide:"+k.autoSlide+"</p>","<p>Carousel Width:"+d.carouselWidth+"</p>","<p>Carousel Height:"+d.carouselHeight+"</p>");}},init:function(m,c){return this.each(function(){if(m){a.extend(e,m);}if(c){a.extend(e.controls,c);}n=a(this);o=a(".carouseljq-panel",n);l=e.controls;d.totalSlides=o.length;d.carouselWidth=n.outerWidth();d.carouselHeight=n.outerHeight();d.currentSlide=k.startingSlide;if(d.currentSlide<1||d.currentSlide>d.totalSlides){d.currentSlide=1;}d.prevSlide=k.startingSlide-1;if(d.prevSlide<1){d.prevSlide=d.totalSlides;}d.nextSlide=k.startingSlide+1;if(d.nextSlide>d.totalSlides){d.nextSlide=1;}o.css({position:"absolute"});f.zeroSlides();f.setSlides();f.setControls();f.startAutoSlide();f.reshuffle();f.devMode();});},startAutoSlide:function(){if(k.autoSlide){d.slideInt=window.setInterval(f.nextSlide,k.rotationTime);}else{f.stopAutoSlide();}},stopAutoSlide:function(){d.slideInt=window.clearInterval(d.slideInt);},setSlides:function(){a("."+j.slides+":nth-child("+d.nextSlide+")",n).css({left:d.carouselWidth});a("."+j.slides+":nth-child("+d.prevSlide+")",n).css({left:-d.carouselWidth});a("."+j.slides+":nth-child("+d.currentSlide+")",n).css({left:0});},setControls:function(){if(l.enableControls){var m="";if(l.enableFirst){m=m+l.first;}if(l.enablePrev){m=m+l.prev;}if(l.enableStart){m=m+l.start;}if(l.enableStop){m=m+l.stop;}if(l.enableNext){m=m+l.next;}if(l.enableLast){m=m+l.last;}if(m){n.append('<div class="'+j.controlsContainer+'"></div>');a("."+j.controlsContainer,n).append(m);a("."+j.nextcontrol,n).click(f.nextSlide);a("."+j.prevcontrol,n).click(f.prevSlide);a("."+j.firstcontrol,n).click(f.firstSlide);a("."+j.lastcontrol,n).click(f.lastSlide);a("."+j.startcontrol,n).click(f.startSlide);}}if(l.enablePagination){var c="";o.each(function(p){c=c+l.pages;});if(c){n.append('<div class="'+j.paginationContainer+'"></div>');a("."+j.paginationContainer,n).append(c);}a("."+j.pagescontrol,n).click(function(){f.skipSlides(a(this));});}a("."+j.nextcontrol+", ."+j.prevcontrol+", ."+j.firstcontrol+", ."+j.lastcontrol+", ."+j.startcontrol+", ."+j.stopcontrol+", ."+j.pagescontrol,n).click(f.stopSlides);},skipSlides:function(m){if(!a("."+j.slides+":animated").length){var c=(a("."+j.pagescontrol,n).index(m)+1);if(c==d.prevSlide){f.prevSlide();}else{if(c==d.nextSlide){f.nextSlide();}else{if(c!=d.currentSlide){a("."+j.slides+":nth-child("+c+")",n).css("left",-d.carouselWidth).animate({left:0});a("."+j.slides+":nth-child("+d.currentSlide+")",n).animate({left:d.carouselWidth+"px"});d.currentSlide=c;d.nextSlide=c+1;d.prevSlide=c-1;f.reshuffle();}}}}},firstSlide:function(){if(!a("."+j.slides+":animated").length&&d.currentSlide!=1){if(d.currentSlide==2){f.prevSlide();}else{if(d.currentSlide==d.totalSlides){f.nextSlide();}else{a("."+j.slides+":first-child",n).css("left",-d.carouselWidth).animate({left:0});a("."+j.slides+":nth-child("+d.currentSlide+")",n).animate({left:d.carouselWidth+"px"});}}d.currentSlide=1;d.nextSlide=2;d.prevSlide=d.totalSlides;f.reshuffle();}},lastSlide:function(){if(!a("."+j.slides+":animated").length&&d.currentSlide!=d.totalSlides){if(d.currentSlide==(d.totalSlides-1)){f.nextSlide();}else{if(d.currentSlide==1){f.prevSlide();}else{a("."+j.slides+":last-child",n).css("left",d.carouselWidth).animate({left:0});a("."+j.slides+":nth-child("+d.currentSlide+")",n).animate({left:-d.carouselWidth+"px"});}}d.currentSlide=d.totalSlides;d.nextSlide=1;d.prevSlide=d.totalSlides-1;f.reshuffle();}},nextSlide:function(){if(!a("."+j.slides+":animated").length){a("."+j.slides+":nth-child("+d.currentSlide+")",n).animate({left:"-"+d.carouselWidth+"px"});a("."+j.slides+":nth-child("+d.nextSlide+")",n).animate({left:0});a("."+j.slides+":nth-child("+d.prevSlide+")",n).css({left:d.carouselWidth});d.currentSlide=d.currentSlide+1;d.nextSlide=d.nextSlide+1;d.prevSlide=d.prevSlide+1;f.reshuffle();}},prevSlide:function(){if(!a("."+j.slides+":animated").length){a("."+j.slides+":nth-child("+d.currentSlide+")",n).animate({left:"+"+d.carouselWidth+"px"});a("."+j.slides+":nth-child("+d.nextSlide+")",n).css({left:-d.carouselWidth});a("."+j.slides+":nth-child("+d.prevSlide+")",n).animate({left:0});d.currentSlide=d.currentSlide-1;d.nextSlide=d.nextSlide-1;d.prevSlide=d.prevSlide-1;f.reshuffle();}},reshuffle:function(){if(d.currentSlide>d.totalSlides){d.currentSlide=1;}else{if(d.currentSlide<1){d.currentSlide=d.totalSlides;}}if(d.nextSlide>d.totalSlides){d.nextSlide=1;}else{if(d.nextSlide<1){d.nextSlide=d.totalSlides;}}if(d.prevSlide>d.totalSlides){d.prevSlide=1;}else{if(d.prevSlide<1){d.prevSlide=d.totalSlides;}}a("."+j.pagescontrol,n).removeClass("cjq-page-active");a("."+j.pagescontrol+":nth-child("+d.currentSlide+")",n).addClass("cjq-page-active");f.devMode();},pauseSlides:function(){},stopSlides:function(){k.autoSlide=false;f.stopAutoSlide();},startSlide:function(){k.autoSlide=true;f.startAutoSlide();},zeroSlides:function(){o.css({left:d.carouselWidth,top:"0"});}},f=g,o,n;if(g[b]){return g[b].apply(this,Array.prototype.slice.call(arguments,1));}else{if(typeof b==="object"||!b){return g.init.apply(this,arguments);}else{a.error("Method "+b+" does not exist on Carousel JQ");}}};})(jQuery);$(function(){$(".carouseljq").carouseljq();});$(document).ready(function(){var q;var c;var m;var x;var n;var I;var l;var s;var C;var J;G();function G(){q=new Number($("#indexOfCurrent").val())-1;c=z();m=new Number($("#totalNumOfQuestions").val());x=5;I=a();l=-1;if(g()=="true"){I=a();s=/\&subSectionStateId\=(\d*)/i;C=new String(c.match(s));J=new Number(C.substr((C.length-1)));}else{J=-1;}if(z()){n=new Number(D());l=b();w();F();f();p();}}function b(){var L;var K;for(L=0,K=0,count=1;count<m&&L<n;count++){if(K<=q&&q<(K+x)){E(L);break;}else{K=K+x;L++;}}return L;}function w(){if(y()==true&&e()==true){r("#prevFiveIcon","#prevFiveLink");}else{v("#prevFiveIcon","#prevFiveLink");if(y()==false){var L=(x*(l-1));var K=j(L);$("#prevFiveLink").attr("href",K);}else{var L=J-1;var M=o(L);$("#prevFiveLink").attr("href",M);}}}function F(){if(u()==true&&B()==true){r("#nextFiveIcon","#nextFiveLink");}else{v("#nextFiveIcon","#nextFiveLink");if(u()==false){var K=(x*(l+1));var M=j(K);$("#nextFiveLink").attr("href",M);}else{var L=new Number(J)+1;var N=H(L);$("#nextFiveLink").attr("href",N);}}}function f(){if(i()==true&&y()==true&&e()==true){r("#prevIcon");$("#prevLink img").attr("src","/img/prevBigGrayArrow.gif");}else{v("#prevIcon");if(i()==false){var M=j(new Number(q-1));$("#prevLink").attr("href",M);}else{var K=J-1;var L=t(K);$("#prevLink").attr("href",L);}$("#prevLink img").attr("src","/img/prevBigArrow.gif");}}function p(){if(h()==true&&u()==true&&B()==true){r("#nextIcon");$("#nextLink img").attr("src","/img/nextBigGrayArrow.gif");}else{v("#nextIcon");if(h()==false){var M=j(q+1);$("#nextLink").attr("href",M);}else{var K=J+1;var L=H(K);$("#nextLink").attr("href",L);}$("#nextLink img").attr("src","/img/nextBigArrow.gif");}}function j(K){return $("#practiceTestProgress li.roundies a").eq(K).attr("href");}function A(){return("&subSectionStateId="+new String(J));}function z(){return $("#practiceTestProgress li.roundies a").eq(q).attr("href");}function g(){return $("#practiceIsTabbed").val();}function a(){return $("#practiceTestTabMenu li").length;}function i(){return new Boolean((q==0?true:false));}function h(){var K=m-1;return new Boolean((q==K?true:false));}function u(){return new Boolean((l==(n-1)?true:false));}function y(){return new Boolean((l==0?true:false));}function e(){if(J==-1||J==undefined){return true;}return new Boolean((J==1?true:false));}function B(){if(J==-1||J==undefined){return true;}return new Boolean((J==(I)?true:false));}function D(){var K=Math.round(m/x);if((K*x)<m){K++;}return K;}function H(L){var K=new String(c);var O="subSectionStateId";var M=new String("&subSectionStateId="+L);var Q=new RegExp("");Q.compile("\\&"+O+"\\=(\\d*)","i");K=K.replace(Q,M);var P="questionSetStateId";Q=new RegExp("");Q.compile("\\&"+P+"\\=(\\d*)","i");K=K.replace(Q,"&questionSetStateId=1");var N="questionStateId";Q=new RegExp("");Q.compile("\\&"+N+"\\=(\\d*)","i");K=K.replace(Q,"&questionStateId=1");return K;}function o(L){var K=new String(c);var N="subSectionStateId";var M=new String("&subSectionStateId="+L+"&tabAction=previous5");var O=new RegExp("");O.compile("\\&"+N+"\\=(\\d*)","i");K=K.replace(O,M);return K;}function t(L){var K=new String(c);var N="subSectionStateId";var M=new String("&subSectionStateId="+L+"&tabAction=previous");var O=new RegExp("");O.compile("\\&"+N+"\\=(\\d*)","i");K=K.replace(O,M);return K;}function E(L){var M=(x*L);var K=(x*(L+1));for(index=M;index<K&&q>=M&&q<K;index++){$("#practiceTestProgress li.roundies").eq(index).removeClass("pageHide");}}function v(L,K){if($(L).hasClass("disabled")){$(L).removeClass("disabled");}if($(K).hasClass("linkDisabled")){$(K).removeClass("linkDisabled");}$(L).addClass("enable");}function r(L,K){if($(L).hasClass("enabled")){$(L).removeClass("enabled");}$(K).addClass("linkDisabled");$(L).addClass("disabled");}function d(K){do{K=K.nextSibling;}while(K&&K.nodeType!=1);return K;}$(".ajax-link").live("click",function(){if(!$(this).parent(".disabled").length){return k($(this).attr("href"),"link");}});$(".ajax-link-form").live("submit",function(){return k($(this).attr("action")+"?"+$(this).serialize(),"form");}).submit(function(){return k($(this).attr("action")+"?"+$(this).serialize(),"form");});$("body").ajaxComplete(function(){$(".ajax-link-form").submit(function(){return k($(this).attr("action")+"?"+$(this).serialize(),"form");});});function k(M,L){var K=true;if(K&&M!="#"&&$("#mainBody").length){M+="&decorator=none";$(".ajax-return").append("<li>"+M+"</li>");$.get(M,function(N){$("#mainBody").html(N);G();practiceTestBubbles();CB.twirl({scope:"#mainBody"});ajaxPage($("#omni_param").val(),"SAT Site");});return false;}}});
