var docCookies={getItem:function(e){if(!e){return null}return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},setItem:function(e,t,n,a,i,s){if(!e||/^(?:expires|max\-age|path|domain|secure)$/i.test(e)){return false}var r="";if(n){switch(n.constructor){case Number:r=n===Infinity?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n;break;case String:r="; expires="+n;break;case Date:r="; expires="+n.toUTCString();break}}document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+r+(i?"; domain="+i:"")+(a?"; path="+a:"")+(s?"; secure":"");return true},removeItem:function(e,t,n){if(!this.hasItem(e)){return false}document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:"")+(t?"; path="+t:"");return true},hasItem:function(e){if(!e){return false}return new RegExp("(?:^|;\\s*)"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){var e=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/);for(var t=e.length,n=0;n
'+o.introduction+"
")}if(o.show_question){t.append(''+o.question_text+"
")}if(o.show_respondents_answer){var n=window.location.hash;if(n){n=n.slice(1)}var a=o.answers.find(function(e){return e.id==n});if(a){t.append(''+a.text+"
")}}t.append('Current results:
');o.answers=o.answers.map(function(e){if(e.id in o.css){matched=/background-color:[ ]?([^;]*)[;]?/g.exec(o.css[e.id].inline_style);if(matched&&matched[1]){e.color=matched[1]}else{e.color=r()}}else{e.color=r()}return e});var i=1;if(d("chart_text_size.inline_style",o.css)){i=parseFloat(o.css.chart_text_size.inline_style)/100}var s=.3;if(d("chart_ring_thickness.inline_style",o.css)){s=parseFloat(o.css.chart_ring_thickness.inline_style)}draw_doughnut_chart(o,s,i);u(window).resize(function(){draw_doughnut_chart(o,s,i)});var l=u('Responses: "+o.responses.toLocaleString()+"
")}})}else{var c=(new Date).getTime(),l="//quizzes.aicpa.org/q1/",p=function(e){e.preventDefault();u(this).hide();var t=null;if(docCookies.getItem("quiz_token_"+o)){t=docCookies.getItem("quiz_token_"+o)}u.ajax({url:l+"r/",data:{quiz_id:o},xhrFields:{withCredentials:true},crossDomain:true,dataType:"jsonp",jsonpCallback:"update_question",type:"POST"}).success(function(e){if(e.hasOwnProperty("quiz_token")){docCookies.setItem("quiz_token_"+o,e.quiz_token)}return window.location.reload()})},t=function(){var e=null;if(docCookies.getItem("quiz_token_"+o)){e=docCookies.getItem("quiz_token_"+o)}u.ajax({url:l+"l/"+o,data:{quiz_id:o,quiz_token:e},xhrFields:{withCredentials:true},crossDomain:true,dataType:"jsonp",jsonpCallback:"update_question",type:"POST"}).success(function(e,t,n){if(e.hasOwnProperty("quiz_token")){docCookies.setItem("quiz_token_"+o,e.quiz_token)}if(e.data=="reload"){return window.location.reload()}else{u("#aicpa_quiz_engine").html(e.data);u(".submit_question").click(h);u(".retake_quiz").click(p);c=(new Date).getTime();if(e.hasOwnProperty("shares")&&!u("#aicpa_shares").length){u("#aicpa_quiz_engine").after(e.shares)}}})},h=function(e){e.preventDefault();var t=u("input[name=answer]:checked");var n=[];for(var a=0;a