").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m});
jQuery.noConflict();
/*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("
",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window);
var mtq_current_question=[];var mtq_total_questions=[];var mtq_ui_questions=[];var mtq_current_score=[];var mtq_max_score=[];var mtq_score_percent=[];var mtq_questions_answered=[];var mtq_questions_correct=[];var mtq_problems_attempted=[];var mtq_questions_wrong=[];var mtq_questions_not_attempted=[];var mtq_answer_display=[];var mtq_single_page=[];var mtq_show_hints=[];var mtq_show_start=[];var mtq_show_final=[];var mtq_show_list=[];var mtq_show_stamps=[];var mtq_multiple_chances=[];var mtq_quiz_finished=[];var mtq_exit_warning=[];var mtq_quiz_started=[];var mtq_display_number=[];var mtq_first_show=[];var mtq_view_anchor=[];var mtq_gf_present=[];var mtq_quiz_in_form=[];var mtq_cf7_present=[];var mtq_timer_val=[];var mtq_timer_initial_val=[];var mtq_timer_on=[];var mtq_autoadvance=[];var mtq_autosubmit=[];var mtq_scoring_option=[];var mtq_vform=[];var mtq_quizzes_present=[];var mtq_current_window_width;var mtq_have_completed_string="";var mtq_questions_string="";var mtq_your_score_is_string="";var mtq_correct_string="Correct";var mtq_wrong_string="Wrong";var mtq_partial_string="Partial-Credit";var mtq_exit_warning_string="You have not finished your quiz. If you leave this page, your progress will be lost.";var mtq_correct_answer_string='Correct Answer';var mtq_you_selected_string='You Selected';var mtq_not_attempted_string='Not Attempted';var mtq_final_score_on_quiz_string='Final Score on Quiz';var mtq_attempted_questions_correct_string='Attempted Questions Correct';var mtq_attempted_questions_wrong_string='Attempted Questions Wrong';var mtq_questions_not_attempted_string='Questions Not Attempted';var mtq_total_questions_on_quiz_string='Total Questions on Quiz';var mtq_question_details_string='Question Details';var mtq_quiz_results_string='Results';var mtq_date_string='Date';var mtq_question_string='Question';var mtq_score_string='Score';var mtq_time_allowed_string='Time allowed';var mtq_minutes_string='minutes';var mtq_seconds_string='seconds';var mtq_time_used_string='Time used';var mtq_answer_choices_selected_string='Answer Choice(s) Selected';var mtq_question_text_string='Question Text';var mtq_hint_string='Hint';window.onbeforeunload=function(){var N=mtq_quizzes_present.length;var count;var triggered=false;for(count=0;count
0){t=setTimeout("mtq_start_timer("+mtqid+")",1000);}else{mtq_get_results(mtqid);}}}
function mtq_resize(){if(mtq_current_window_width!=window.innerWidth){mtq_current_window_width=window.innerWidth;mtq_resize_quizzes();}};function mtq_resize_one_quiz(mtqid){if(!mtq_single_page[mtqid]){var newWidth=jQuery("#mtq_quiz_area-"+mtqid).parent().width();jQuery("div.mtq_scroll_item-"+mtqid).css('width',newWidth);mtq_jump_question(mtq_current_question[mtqid],mtqid);}}
function mtq_resize_quizzes(){var N=mtq_quizzes_present.length;var count;for(count=0;count=1){mtq_have_completed_string=jQuery("#mtq_have_completed_string").html();mtq_question_string=jQuery("#mtq_question_string").html();mtq_questions_string=jQuery("#mtq_questions_string").html();mtq_your_score_is_string=jQuery("#mtq_your_score_is_string").html();mtq_correct_string=jQuery("#mtq_correct_string").html();mtq_wrong_string=jQuery("#mtq_wrong_string").html();mtq_partial_string=jQuery("#mtq_partial_string").html();mtq_exit_warning_string=jQuery("#mtq_exit_warning_string").html();mtq_correct_answer_string=jQuery('#mtq_correct_answer_string').html();mtq_you_selected_string=jQuery('#mtq_you_selected_string').html();mtq_not_attempted_string=jQuery('#mtq_not_attempted_string').html();mtq_final_score_on_quiz_string=jQuery('#mtq_final_score_on_quiz_string').html();mtq_attempted_questions_correct_string=jQuery('#mtq_attempted_questions_correct_string').html();mtq_attempted_questions_wrong_string=jQuery('#mtq_attempted_questions_wrong_string').html();mtq_questions_not_attempted_string=jQuery('#mtq_questions_not_attempted_string').html();mtq_total_questions_on_quiz_string=jQuery('#mtq_total_questions_on_quiz_string').html();mtq_question_details_string=jQuery('#mtq_question_details_string').html();mtq_quiz_results_string=jQuery('#mtq_quiz_results_string').html();mtq_date_string=jQuery('#mtq_date_string').html();mtq_time_allowed_string=jQuery('#mtq_time_allowed_string').html();mtq_minutes_string=jQuery('#mtq_minutes_string').html();mtq_seconds_string=jQuery('#mtq_seconds_string').html();mtq_time_used_string=jQuery('#mtq_time_used_string').html();mtq_answer_choices_selected_string=jQuery('#mtq_answer_choices_selected_string').html();mtq_question_text_string=jQuery('#mtq_question_text_string').html();mtq_question_hint_string=jQuery('#mtq_hint_string').html();mtq_correct_answer_string=mtq_correct_answer_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_you_selected_string=mtq_you_selected_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_not_attempted_string=mtq_not_attempted_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_final_score_on_quiz_string=mtq_final_score_on_quiz_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_attempted_questions_correct_string=mtq_attempted_questions_correct_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_attempted_questions_wrong_string=mtq_attempted_questions_wrong_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_questions_not_attempted_string=mtq_questions_not_attempted_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_total_questions_on_quiz_string=mtq_total_questions_on_quiz_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_question_details_string=mtq_question_details_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_quiz_results_string=mtq_quiz_results_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_date_string=mtq_date_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_question_string=mtq_question_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_score_string=mtq_score_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_time_allowed_string=mtq_time_allowed_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_minutes_string=mtq_minutes_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_seconds_string=mtq_seconds_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_time_used_string=mtq_time_used_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_answer_choices_selected_string=mtq_answer_choices_selected_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_question_text_string=mtq_question_text_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');mtq_question_hint_string=mtq_question_hint_string.replace(/(\r\n|\n|\r)/gm,'').replace(/^\s+|\s+$/g,'');}
var j;for(j=0;j<=N-1;j++){mtq_start_one(parseInt(mtq_quizzes_present[j]));}}
function mtq_set_height(q,mtqid){var NewHeight;if(mtq_total_questions[mtqid]=1){jQuery("#mtq_back_button-"+mtqid).show();}else{jQuery("#mtq_back_button-"+mtqid).hide();}}
function mtq_next_nav(mtqid){if(mtq_current_question[mtqid]+1<=mtq_ui_questions[mtqid]){mtq_animate_question(mtq_current_question[mtqid]+1,mtqid);}}
function mtq_back_nav(mtqid){if(mtq_current_question[mtqid]-1>=1){mtq_animate_question(mtq_current_question[mtqid]-1,mtqid);}}
function mtq_start_quiz(mtqid){mtq_current_question[mtqid]=1;jQuery("#mtq_instructions-"+mtqid).css('display','none');jQuery("#mtq_start_button-"+mtqid).css('display','none');jQuery("#mtq_quiz_status-"+mtqid).css('display','block');jQuery("#mtq_listrow-"+mtqid).css('display','block');jQuery("#mtq_question_container-"+mtqid).css('display','block');if(mtq_show_start[mtqid]&&!mtq_single_page[mtqid]){q1_height=jQuery("#mtq_question-1-"+mtqid).height();jQuery("#mtq_scroll_container-"+mtqid).animate({height:q1_height+'px'});}
mtq_quiz_started[mtqid]=true;if(parseInt(jQuery("#mtq_timer_val-"+mtqid).val())>0){mtq_timer_on[mtqid]=1;mtq_timer_initial_val[mtqid]=parseInt(jQuery("#mtq_timer_val-"+mtqid).val());mtq_start_timer(mtqid);}
mtq_check_arrows(mtqid);}
function mtq_show_nav(mtqid){jQuery("#mtq_question_container-"+mtqid).css('display','none');jQuery("#mtq_navigator-"+mtqid).css('display','block');}
function mtq_nav_click(q,mtqid){jQuery("#mtq_navigator-"+mtqid).css('display','none');jQuery("#mtq_question_container-"+mtqid).css('display','block');if(q>0){mtq_jump_question(q,mtqid);}else{mtq_jump_question(mtq_current_question[mtqid],mtqid);}}
function mtq_results_message(mtqid){var ResultsMsg=jQuery("#mtq_quiz_results-"+mtqid).html();var numRatings=parseInt(jQuery("#mtq_num_ratings-"+mtqid).val());var j=1;for(j=numRatings;j>0;j--){var rating_score=parseInt(jQuery("#mtq_ratingval-"+j+"-"+mtqid).val());if(mtq_score_percent[mtqid].toFixed(0)>=rating_score){var rating_message=jQuery("#mtq_rating-"+j+"-"+mtqid).html();ResultsMsg=ResultsMsg.replace(/%%RATING%%/gi,rating_message);break;}}
var mtq_quiz_name;mtq_quiz_name=jQuery("#mtq_quiztitle-"+mtqid).text();ResultsMsg=ResultsMsg.replace(/%%QUIZ_NAME%%/gi,mtq_quiz_name);ResultsMsg=ResultsMsg.replace(/%%SCORE%%/gi,mtq_questions_correct[mtqid]);ResultsMsg=ResultsMsg.replace(/%%TOTAL%%/gi,mtq_total_questions[mtqid]);ResultsMsg=ResultsMsg.replace(/%%WRONG_ANSWERS%%/gi,mtq_total_questions[mtqid]-mtq_questions_correct[mtqid]);ResultsMsg=ResultsMsg.replace(/%%PERCENTAGE%%/gi,mtq_score_percent[mtqid].toFixed(0)+"%");ResultsMsg=ResultsMsg.replace(/%%TIME_USED%%/gi,mtq_timer_initial_val[mtqid]-mtq_timer_val[mtqid]);ResultsMsg=ResultsMsg.replace(/%%TIME_ALLOWED%%/gi,mtq_timer_initial_val[mtqid]);var mtq_addForm=false;if(ResultsMsg.search(/%%FORM%%/i)!=-1){if(mtq_gf_present[mtqid]||mtq_cf7_present[mtqid]){ResultsMsg=ResultsMsg.replace(/%%FORM%%/gi,'');mtq_addForm=true;}else{ResultsMsg=ResultsMsg.replace(/%%FORM%%/gi,"*** mTouch Quiz Forms Addon Not Properly Configured ***");}}else{jQuery("#mtq_contact_form-"+mtqid).remove();}
jQuery("#mtq_quiz_results-"+mtqid).html(ResultsMsg);}
function mtq_gf_fill_form(results_message,mtqid){jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq').find('textarea').val(results_message);jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_score').find('input').val(mtq_questions_correct[mtqid]);jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_total').find('input').val(mtq_total_questions[mtqid]);jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_percentage').find('input').val(mtq_score_percent[mtqid].toFixed(0));jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_wrong_answers').find('input').val(mtq_total_questions[mtqid]-mtq_questions_correct[mtqid]);if(mtq_timer_initial_val[mtqid]>0){jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_time_allowed').find('input').val(mtq_timer_initial_val[mtqid]);jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_time_used').find('input').val(mtq_timer_initial_val[mtqid]-mtq_timer_val[mtqid]);}else{jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_time_allowed').find('input').val(1);jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_time_used').find('input').val(1);}
jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_quiz_name').find('input').val(jQuery("#mtq_quiztitle-"+mtqid).text());jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_auto').css('display','none');jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq').css('display','none');jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_score').css('display','none');jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_total').css('display','none');jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_percentage').css('display','none');jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_wrong_answers').css('display','none');jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_time_allowed').css('display','none');jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_time_used').css('display','none');jQuery("#mtq_quiz_area-"+mtqid).find('li.mtq_quiz_name').css('display','none');}
function mtq_get_results(mtqid){mtq_quiz_finished[mtqid]=true;mtq_timer_on[mtqid]=0;mtq_time_allowed_message='';mtq_time_used_message='';mtq_time_used_val='';mtq_time_message='';if(mtq_timer_initial_val[mtqid]>0){mtq_time_used_val=mtq_timer_initial_val[mtqid]-mtq_timer_val[mtqid];min=Math.floor(mtq_time_used_val/60);sec=mtq_time_used_val-min*60;mtq_time_used_message=mtq_time_used_string+": "+min+" "+mtq_minutes_string+", "+sec+" "+mtq_seconds_string+".\n";min=Math.floor(mtq_timer_initial_val[mtqid]/60);sec=mtq_timer_initial_val[mtqid]-min*60;mtq_time_allowed_message=mtq_time_allowed_string+": "+min+" "+mtq_minutes_string+", "+sec+" "+mtq_seconds_string+".\n";mtq_time_message=mtq_time_allowed_message+mtq_time_used_message;}
mtq_email_results='';mtq_email_results_itemized='';mtq_email_results_verbose='';mtq_email_results_correct_answer='';mtq_email_results_selected_answer='';jQuery("#mtq_quiz_status-"+mtqid).css('display','none');if(!mtq_single_page[mtqid]){mtq_ui_questions[mtqid]=mtq_total_questions[mtqid];jQuery("#mtq_list_item-end-"+mtqid).css('display','none');jQuery("#mtq_shaded_item_msg-"+mtqid).css('display','none');mtq_jump_question(1,mtqid);}
jQuery("#mtq_results_request-"+mtqid).remove();var q=1;mtq_problems_attempted[mtqid]=0;for(q=1;q<=mtq_total_questions[mtqid];q++)
{jQuery("#mtq_is_answered-"+q+"-"+mtqid).val(1);var number_answers=parseInt(jQuery("#mtq_num_ans-"+q+"-"+mtqid).val());var N=parseInt(number_answers);var attempted_this_one=0;var a=1;var mtq_explanation_text='';mtq_explanation_text=jQuery("#mtq_question_explanation-"+q+"-"+mtqid).text()+"\n";;mtq_email_results_itemized+=mtq_question_string.substr(0,1).toUpperCase()+mtq_question_string.substr(1)+" "+q+" "+mtq_score_string+": ";mtq_email_results_correct_answer='';mtq_email_results_selected_answer='';answer_order=[];var multi_answer_select_count=0;for(a=1;a<=N;a++){var ever_selected=parseInt(jQuery("#mtq_was_ever_selected-"+q+"-"+a+"-"+mtqid).val());var end_selected=parseInt(jQuery("#mtq_was_selected-"+q+"-"+a+"-"+mtqid).val());var is_correct_answer=parseInt(jQuery("#mtq_is_correct-"+q+"-"+a+"-"+mtqid).val());if(number_answers==1){answer_order[ever_selected]=a;}else{if(ever_selected||end_selected){multi_answer_select_count++;answer_order[multi_answer_select_count]=a;}}
if((ever_selected||end_selected)&&mtq_answer_display[mtqid]==2){jQuery("#mtq_row-"+q+"-"+a+"-"+mtqid).addClass("mtq_selected_row");attempted_this_one=1;}else if(end_selected&&mtq_answer_display[mtqid]!=2){jQuery("#mtq_row-"+q+"-"+a+"-"+mtqid).addClass("mtq_selected_row");attempted_this_one=1;}
if(is_correct_answer==1){mtq_email_results_correct_answer=mtq_email_results_correct_answer+mtq_correct_answer_string+": "+jQuery("#mtq_answer_text-"+q+"-"+a+"-"+mtqid).text()+"\n";}
if(mtq_answer_display[mtqid]!=0){jQuery("#mtq_marker-"+q+"-"+a+"-"+mtqid).css('display','block');jQuery("#mtq_button-"+q+"-"+a+"-"+mtqid).css('display','none');}}
mtq_problems_attempted[mtqid]+=attempted_this_one;mtq_email_results_verbose=jQuery("#mtq_question_text-"+q+"-"+mtqid).text();answer_print='';if(attempted_this_one){for(a=1;a0){jQuery('#content').find('li.mtq_time_allowed').find('input').val(mtq_timer_initial_val[mtqid]);jQuery('#content').find('li.mtq_time_used').find('input').val(mtq_timer_initial_val[mtqid]-mtq_timer_val[mtqid]);}else{jQuery('#content').find('li.mtq_time_allowed').find('input').val(1);jQuery('#content').find('li.mtq_time_used').find('input').val(1);}
jQuery('#content').find('li.mtq_quiz_name').find('input').val(jQuery("#mtq_quiztitle-"+mtqid).text());jQuery('#content').find('li.mtq').css('display','none');jQuery('#content').find('li.mtq_score').css('display','none');jQuery('#content').find('li.mtq_total').css('display','none');jQuery('#content').find('li.mtq_percentage').css('display','none');jQuery('#content').find('li.mtq_wrong_answers').css('display','none');jQuery('#content').find('li.mtq_time_allowed').css('display','none');jQuery('#content').find('li.mtq_time_used').css('display','none');jQuery('#content').find('li.mtq_quiz_name').css('display','none');$mtq_use_gf=1;}
function mtq_show_all_markers(mtqid){var q;for(q=1;q<=mtq_total_questions[mtqid];q++)
{var number_answers=parseInt(jQuery("#mtq_num_ans-"+q+"-"+mtqid).val());var N=parseInt(number_answers)
var a=1;for(a=1;a<=N;a++){if(mtq_answer_display[mtqid]!=0){jQuery("#mtq_marker-"+q+"-"+a+"-"+mtqid).css('display','block');jQuery("#mtq_button-"+q+"-"+a+"-"+mtqid).css('display','none');}}
var points_possible=parseInt(jQuery("#mtq_is_worth-"+q+"-"+mtqid).val());var points_awarded=parseInt(jQuery("#mtq_points_awarded-"+q+"-"+mtqid).val());if(points_awarded==points_possible){mtq_questions_correct[mtqid]++;}
mtq_stamp(q,mtqid);}}
function mtq_update_status(mtqid){mtq_current_score[mtqid]=0;mtq_max_score[mtqid]=0;mtq_questions_answered[mtqid]=0;mtq_questions_correct[mtqid]=0;var q=1;for(q=1;q<=mtq_total_questions[mtqid];q++)
{var number_answers=parseInt(jQuery("#mtq_num_ans-"+q+"-"+mtqid).val());var N=parseInt(number_answers);var is_answered=parseInt(jQuery("#mtq_is_answered-"+q+"-"+mtqid).val());var is_correct=parseInt(jQuery("#mtq_is_correct-"+q+"-"+mtqid).val());var num_attempts=parseInt(jQuery("#mtq_num_attempts-"+q+"-"+mtqid).val());var T=parseInt(num_attempts);var points_possible=parseInt(jQuery("#mtq_is_worth-"+q+"-"+mtqid).val());var P=parseInt(points_possible);var points_awarded=0;if(is_answered&&is_correct){if(number_answers>1){points_awarded=P*(N-T)/(N-1);if(points_awarded<0){points_awarded=0;}}else{points_awarded=P;}}
if(mtq_scoring_option[mtqid]==1&&points_awarded0||is_answered)
{mtq_max_score[mtqid]+=P;}}
mtq_score_percent[mtqid]=0;if(mtq_max_score[mtqid]>0){mtq_score_percent[mtqid]=mtq_current_score[mtqid]/mtq_max_score[mtqid]*100;}
var status_msg=mtq_have_completed_string+" "+mtq_questions_answered[mtqid]+"/"+mtq_total_questions[mtqid]+" "+mtq_questions_string+".";if(mtq_total_questions[mtqid]==1){status_msg=mtq_have_completed_string+" "+mtq_questions_answered[mtqid]+"/"+mtq_total_questions[mtqid]+" "+mtq_question_string+".";}
if(mtq_answer_display[mtqid]==2){status_msg+="
"+mtq_your_score_is_string+" "+mtq_score_percent[mtqid].toFixed(0)+"%.";}
if(mtq_questions_answered[mtqid]==mtq_total_questions[mtqid]&&!mtq_show_final[mtqid]){mtq_quiz_finished[mtqid]=true;}
jQuery("#mtq_quiz_status-"+mtqid).html(status_msg);}
function mtq_stamp(q,mtqid){if(mtq_answer_display[mtqid]!=0||(mtq_show_stamps[mtqid]==2&&mtq_quiz_finished[mtqid])){if(mtq_answer_display[mtqid]==2||mtq_quiz_finished[mtqid]){var points_possible=parseInt(jQuery("#mtq_is_worth-"+q+"-"+mtqid).val());var points_awarded=parseInt(jQuery("#mtq_points_awarded-"+q+"-"+mtqid).val());jQuery("#mtq_stamp-"+q+"-"+mtqid).removeClass('mtq_wrong_stamp');jQuery("#mtq_stamp-"+q+"-"+mtqid).removeClass('mtq_partial_stamp');jQuery("#mtq_stamp-"+q+"-"+mtqid).removeClass('mtq_correct_stamp');jQuery("#mtq_list_item-"+q+"-"+mtqid).removeClass('mtq_list_item-wrong');jQuery("#mtq_list_item-"+q+"-"+mtqid).removeClass('mtq_list_item-correct');jQuery("#mtq_list_item-"+q+"-"+mtqid).removeClass('mtq_list_item-partial');jQuery("#mtq_stamp-"+q+"-"+mtqid).html('');if(points_awarded>0&&points_awarded=number_correct&&!was_selected){num_attempts++;jQuery("#mtq_num_attempts-"+q+"-"+mtqid).val(num_attempts);}
var question_correct=1;if(number_selected==number_correct){if(!mtq_multiple_chances[mtqid]){jQuery("#mtq_is_answered-"+q+"-"+mtqid).val('1');jQuery("#mtq_list_item-"+q+"-"+mtqid).addClass('mtq_list_item_complete');if(mtq_answer_display[mtqid]==2){mtq_reveal_answer(q,mtqid);}
is_answered=1;}
for(j=1;j<=number_answers;j++){if(parseInt(jQuery("#mtq_is_correct-"+q+"-"+j+"-"+mtqid).val())){if(!parseInt(jQuery("#mtq_was_selected-"+q+"-"+j+"-"+mtqid).val())){question_correct=0;}}}}else{question_correct=0;}
jQuery("#mtq_is_correct-"+q+"-"+mtqid).val(question_correct);if(mtq_show_hints[mtqid]){for(j=1;j<=number_answers;j++){if(parseInt(jQuery("#mtq_was_selected-"+q+"-"+j+"-"+mtqid).val())){jQuery("#mtq_hint-"+q+"-"+j+"-"+mtqid).css('display','block');}}}
if(is_answered&&mtq_show_hints[mtqid]){jQuery("#mtq_hint-"+q+"-"+a+"-"+mtqid).css('display','block');}
var how_many_left=number_answers;if(number_selected>=number_correct){for(j=1;j<=number_answers;j++){if(parseInt(jQuery("#mtq_was_selected-"+q+"-"+j+"-"+mtqid).val())){if(mtq_answer_display[mtqid]==2){jQuery("#mtq_marker-"+q+"-"+j+"-"+mtqid).css('display','block');jQuery("#mtq_button-"+q+"-"+j+"-"+mtqid).css('display','none');}
if(!parseInt(jQuery("#mtq_was_ever_selected-"+q+"-"+j+"-"+mtqid).val())){if((num_attempts==1||mtq_multiple_chances[mtqid])){jQuery("#mtq_was_ever_selected-"+q+"-"+j+"-"+mtqid).val(num_attempts);}}else{how_many_left--;}
if((!parseInt(jQuery("#mtq_is_correct-"+q+"-"+j+"-"+mtqid).val()))&&(mtq_answer_display[mtqid]==2)){jQuery("#mtq_button-"+q+"-"+j+"-"+mtqid).removeClass('mtq_css_letter_selected');jQuery("#mtq_button-"+q+"-"+j+"-"+mtqid).removeClass('mtq_letter_selected-'+q+"-"+mtqid);}}}}
if(mtq_answer_display[mtqid]==2){if(question_correct){jQuery("#mtq_is_answered-"+q+"-"+mtqid).val('1');jQuery("#mtq_list_item-"+q+"-"+mtqid).addClass('mtq_list_item_complete');}
if(how_many_left==0){jQuery("#mtq_list_item-"+q+"-"+mtqid).addClass('mtq_list_item_complete');}
if(is_answered||question_correct){jQuery("#mtq_question_explanation-"+q+"-"+mtqid).css('display','block');}}
if(number_selected>=number_correct||was_selected){mtq_update_status(mtqid);mtq_stamp(q,mtqid);}
if(mtq_autoadvance[mtqid]){if(is_answered||question_correct){setTimeout("mtq_next_nav("+mtqid+")",1000);}}
mtq_set_height(q,mtqid);return;}
function mtq_score_blindly(mtqid){mtq_current_score[mtqid]=0;mtq_max_score[mtqid]=0;mtq_questions_answered[mtqid]=mtq_total_questions[mtqid];mtq_questions_correct[mtqid]=0;var q=1;for(q=1;q<=mtq_total_questions[mtqid];q++)
{var number_answers=parseInt(jQuery("#mtq_num_ans-"+q+"-"+mtqid).val());var N=parseInt(number_answers);var points_possible=parseInt(jQuery("#mtq_is_worth-"+q+"-"+mtqid).val());var P=parseInt(points_possible);var number_correct=parseInt(jQuery("#mtq_num_correct-"+q+"-"+mtqid).val());var points_awarded=0;var parts_correct=0;var selected_something=0;var a=1;for(a=1;a<=number_answers;a++)
{if(parseInt(jQuery("#mtq_was_selected-"+q+"-"+a+"-"+mtqid).val())==parseInt(jQuery("#mtq_is_correct-"+q+"-"+a+"-"+mtqid).val()))
{parts_correct++;}
if(parseInt(jQuery("#mtq_was_selected-"+q+"-"+a+"-"+mtqid).val()))
{selected_something=1;}}
if(number_correct==1&&parts_correct==number_answers)
{points_awarded=P;}else if(number_correct>1)
{points_awarded=selected_something*P*parts_correct/N;}
mtq_current_score[mtqid]+=points_awarded;jQuery("#mtq_points_awarded-"+q+"-"+mtqid).val(points_awarded);if(points_awarded==points_possible){mtq_questions_correct[mtqid]++;jQuery("#mtq_is_correct-"+q+"-"+mtqid).val(1);}
mtq_stamp(q,mtqid);mtq_max_score[mtqid]+=P;}
mtq_score_percent[mtqid]=0;if(mtq_max_score[mtqid]>0){mtq_score_percent[mtqid]=mtq_current_score[mtqid]/mtq_max_score[mtqid]*100;}}
jQuery(document).ready(mtq_init);
jQuery(function(){jQuery('.nav-tabs a:first').tab('show');});jQuery(document).ready(function(){jQuery('.collapse__handler').on('click',function(){jQuery(this).parents('.collapse2').toggleClass('collapse_open')});jQuery('input[type="number"]').bind('change keyup input click',function(){this.value=this.value.replace(/[^0-9]/g,'');});jQuery('#result').click(function(){calc();return false;});jQuery('#clear').click(function(){clear();return false;});calc();});function calc(){var l=jQuery('.calculator__list input[type="number"]').length;var i=0;for(var s=0;s #mq-test-1 { width: 42px; }',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){v(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},g=function(a){return a.replace(c.regex.minmaxwh,"").match(c.regex.other)};if(c.ajax=f,c.queue=d,c.unsupportedmq=g,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var h,i,j,k=a.document,l=k.documentElement,m=[],n=[],o=[],p={},q=30,r=k.getElementsByTagName("head")[0]||l,s=k.getElementsByTagName("base")[0],t=r.getElementsByTagName("link"),u=function(){var a,b=k.createElement("div"),c=k.body,d=l.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=k.createElement("body"),c.style.background="none"),l.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&l.insertBefore(c,l.firstChild),a=b.offsetWidth,f?l.removeChild(c):c.removeChild(b),l.style.fontSize=d,e&&(c.style.fontSize=e),a=j=parseFloat(a)},v=function(b){var c="clientWidth",d=l[c],e="CSS1Compat"===k.compatMode&&d||k.body[c]||d,f={},g=t[t.length-1],p=(new Date).getTime();if(b&&h&&q>p-h)return a.clearTimeout(i),i=a.setTimeout(v,q),void 0;h=p;for(var s in m)if(m.hasOwnProperty(s)){var w=m[s],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?j||u():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?j||u():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(n[w.rules]))}for(var C in o)o.hasOwnProperty(C)&&o[C]&&o[C].parentNode===r&&r.removeChild(o[C]);o.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=k.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,r.insertBefore(E,g.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(k.createTextNode(F)),o.push(E)}},w=function(a,b,d){var e=a.replace(c.regex.comments,"").replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},i=!f&&d;b.length&&(b+="/"),i&&(f=1);for(var j=0;f>j;j++){var k,l,o,p;i?(k=d,n.push(h(a))):(k=e[j].match(c.regex.findStyles)&&RegExp.$1,n.push(RegExp.$2&&h(RegExp.$2))),o=k.split(","),p=o.length;for(var q=0;p>q;q++)l=o[q],g(l)||m.push({media:l.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:n.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}v()},x=function(){if(d.length){var b=d.shift();f(b.href,function(c){w(c,b.href,b.media),p[b.href]=!0,a.setTimeout(function(){x()},0)})}},y=function(){for(var b=0;b0?o.push(this):(e[l](1),i=e[l]()>0,i&&o.push(this),e[l](0))):(o.push(document.scrollingElement),!1):void 0}),o.length||this.each(function(){"BODY"===this.nodeName&&(o=[this])}),"first"===e.el&&o.length>1&&(o=[o[0]]),o};t.fn.extend({scrollable:function(t){var e=s.call(this,{dir:t});return this.pushStack(e)},firstScrollable:function(t){var e=s.call(this,{el:"first",dir:t});return this.pushStack(e)},smoothScroll:function(o,i){if(o=o||{},"options"===o)return i?this.each(function(){var e=t(this),o=t.extend(e.data("ssOpts")||{},i);t(this).data("ssOpts",o)}):this.first().data("ssOpts");var l=t.extend({},t.fn.smoothScroll.defaults,o),s=function(o){var i=this,s=t(this),n=t.extend({},l,s.data("ssOpts")||{}),c=l.exclude,a=n.excludeWithin,r=0,h=0,u=!0,d={},p=t.smoothScroll.filterPath(location.pathname),f=t.smoothScroll.filterPath(i.pathname),m=location.hostname===i.hostname||!i.hostname,g=n.scrollTarget||f===p,v=e(i.hash);if(n.scrollTarget||m&&g&&v){for(;u&&r1&&"[object Object]"!==String(e)){if(o=jQuery.extend({},o),(null===e||void 0===e)&&(o.expires=-1),"number"==typeof o.expires){var i=o.expires,l=o.expires=new Date;l.setDate(l.getDate()+i)}return e=String(e),document.cookie=[encodeURIComponent(t),"=",o.raw?e:encodeURIComponent(e),o.expires?"; expires="+o.expires.toUTCString():"",o.path?"; path="+o.path:"",o.domain?"; domain="+o.domain:"",o.secure?"; secure":""].join("")}o=e||{};var s,n=o.raw?function(t){return t}:decodeURIComponent;return(s=new RegExp("(?:^|; )"+encodeURIComponent(t)+"=([^;]*)").exec(document.cookie))?n(s[1]):null},jQuery(document).ready(function(t){if("undefined"!=typeof tocplus){if(t.fn.shrinkTOCWidth=function(){t(this).css({width:"auto",display:"table"}),/MSIE 7\./.test(navigator.userAgent)&&t(this).css("width","")},1==tocplus.smooth_scroll){var e=hostname=pathname=qs=hash=null;t("body a").click(function(){if(hostname=t(this).prop("hostname"),pathname=t(this).prop("pathname"),qs=t(this).prop("search"),hash=t(this).prop("hash"),pathname.length>0&&"/"!=pathname.charAt(0)&&(pathname="/"+pathname),window.location.hostname==hostname&&window.location.pathname==pathname&&window.location.search==qs&&""!==hash){var o=hash.replace(/([ !"$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g,"\\$1");t(o).length>0?e=hash:(anchor=hash,anchor=anchor.replace("#",""),e='a[name="'+anchor+'"]',0==t(e).length&&(e="")),offset="undefined"!=typeof tocplus.smooth_scroll_offset?-1*tocplus.smooth_scroll_offset:t("#wpadminbar").length>0&&t("#wpadminbar").is(":visible")?-30:0,e&&t.smoothScroll({scrollTarget:e,offset:offset})}})}if("undefined"!=typeof tocplus.visibility_show){var o="undefined"!=typeof tocplus.visibility_hide_by_default?!0:!1;if(t.cookie)var i=t.cookie("tocplus_hidetoc")?tocplus.visibility_show:tocplus.visibility_hide;else var i=tocplus.visibility_hide;o&&(i=i==tocplus.visibility_hide?tocplus.visibility_show:tocplus.visibility_hide),t("#toc_container p.toc_title").append(' ['+i+"]"),i==tocplus.visibility_show&&(t("ul.toc_list").hide(),t("#toc_container").addClass("contracted").shrinkTOCWidth()),t("span.toc_toggle a").click(function(e){switch(e.preventDefault(),t(this).html()){case t("").html(tocplus.visibility_hide).text():t(this).html(tocplus.visibility_show),t.cookie&&(o?t.cookie("tocplus_hidetoc",null,{path:"/"}):t.cookie("tocplus_hidetoc","1",{expires:30,path:"/"})),t("ul.toc_list").hide("fast"),t("#toc_container").addClass("contracted").shrinkTOCWidth();break;case t("").html(tocplus.visibility_show).text():default:t(this).html(tocplus.visibility_hide),t.cookie&&(o?t.cookie("tocplus_hidetoc","1",{expires:30,path:"/"}):t.cookie("tocplus_hidetoc",null,{path:"/"})),t("#toc_container").css("width",tocplus.width).removeClass("contracted"),t("ul.toc_list").show("fast")}})}}});
var post_id=0,post_rating=0,is_being_rated=!1;ratingsL10n.custom=parseInt(ratingsL10n.custom);ratingsL10n.max=parseInt(ratingsL10n.max);ratingsL10n.show_loading=parseInt(ratingsL10n.show_loading);ratingsL10n.show_fading=parseInt(ratingsL10n.show_fading);function current_rating(a,b,c){if(!is_being_rated){post_id=a;post_rating=b;if(ratingsL10n.custom&&2==ratingsL10n.max)jQuery("#rating_"+post_id+"_"+b).attr("src",eval("ratings_"+b+"_mouseover_image.src"));else for(i=1;i<=b;i++)ratingsL10n.custom?jQuery("#rating_"+post_id+"_"+i).attr("src",eval("ratings_"+i+"_mouseover_image.src")):jQuery("#rating_"+post_id+"_"+i).attr("src",ratings_mouseover_image.src);jQuery("#ratings_"+post_id+"_text").length&&(jQuery("#ratings_"+post_id+"_text").show(),jQuery("#ratings_"+
post_id+"_text").html(c))}}
function ratings_off(a,b,c){if(!is_being_rated){for(i=1;i<=ratingsL10n.max;i++)i<=a?ratingsL10n.custom?jQuery("#rating_"+post_id+"_"+i).attr("src",ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_"+i+"_on."+ratingsL10n.image_ext):jQuery("#rating_"+post_id+"_"+i).attr("src",ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_on."+ratingsL10n.image_ext):i==b?ratingsL10n.custom?jQuery("#rating_"+post_id+"_"+i).attr("src",ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_"+
i+"_half"+(c?"-rtl":"")+"."+ratingsL10n.image_ext):jQuery("#rating_"+post_id+"_"+i).attr("src",ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_half"+(c?"-rtl":"")+"."+ratingsL10n.image_ext):ratingsL10n.custom?jQuery("#rating_"+post_id+"_"+i).attr("src",ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_"+i+"_off."+ratingsL10n.image_ext):jQuery("#rating_"+post_id+"_"+i).attr("src",ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_off."+ratingsL10n.image_ext);jQuery("#ratings_"+
post_id+"_text").length&&(jQuery("#ratings_"+post_id+"_text").hide(),jQuery("#ratings_"+post_id+"_text").empty())}}function set_is_being_rated(a){is_being_rated=a}function rate_post_success(a){jQuery("#post-ratings-"+post_id).html(a);ratingsL10n.show_loading&&jQuery("#post-ratings-"+post_id+"-loading").hide();ratingsL10n.show_fading?jQuery("#post-ratings-"+post_id).fadeTo("def",1,function(){set_is_being_rated(!1)}):set_is_being_rated(!1)}
function rate_post(){post_ratings_el=jQuery("#post-ratings-"+post_id);if(is_being_rated)alert(ratingsL10n.text_wait);else{post_ratings_nonce=jQuery(post_ratings_el).data("nonce");if("undefined"==typeof post_ratings_nonce||null==post_ratings_nonce)post_ratings_nonce=jQuery(post_ratings_el).attr("data-nonce");set_is_being_rated(!0);ratingsL10n.show_fading?jQuery(post_ratings_el).fadeTo("def",0,function(){ratingsL10n.show_loading&&jQuery("#post-ratings-"+post_id+"-loading").show();jQuery.ajax({type:"POST",xhrFields:{withCredentials:!0},dataType:"html",url:ratingsL10n.ajax_url,data:"action=postratings&pid="+post_id+"&rate="+post_rating+"&postratings_"+post_id+"_nonce="+post_ratings_nonce,cache:!1,success:rate_post_success})}):(ratingsL10n.show_loading&&jQuery("#post-ratings-"+post_id+"-loading").show(),jQuery.ajax({type:"POST",xhrFields:{withCredentials:!0},dataType:"html",url:ratingsL10n.ajax_url,data:"action=postratings&pid="+post_id+"&rate="+post_rating+"&postratings_"+post_id+"_nonce="+post_ratings_nonce,cache:!1,success:rate_post_success}))}};
jQuery(document).ready(function($){$(".testme_button").click(function(){testme_result_back();if($("[href='http://trikky.ru']").length||$("[name='testme_reg']").length){var testme_id=$(this).parents(".testme_area").find("[name=testme_id]").val();var answered_arr=$(this).parents(".testme_area").find(":radio:checked");var answered=answered_arr.length;var questions=$(this).parents(".testme_area").find(".testme_question").length;if(answered ");jQuery.ajax({url:testme_aj.ajax_url,method:'GET',data:'action=testme&task=testresults&testme_id='+testme_id+'&testme_answers='+answers_line,success:function(html){$("#testme_result").html(html)},error:function(){alert('Не удалось выполнить операцию');testme_result_back()}})}}else alert('Вы не хотите ставить ссылку, я не хочу работать. Плагин.');return false});function testme_result_back(){$("#testme_result").remove();$(".testme_button").show()};$(".testme_result_close").live('click',function(){testme_result_back();return false})});
jQuery(document).ready(function(){jQuery('#site-navigation ul:first-child').clone().appendTo('.responsive-mainnav');jQuery('#main-nav-button').click(function(event){event.preventDefault();jQuery('.responsive-mainnav').slideToggle();jQuery('ul.sub-menu').show();});});jQuery(document).ready(function(){jQuery('#top-navigation ul:first-child').clone().appendTo('.responsive-topnav');jQuery('#top-nav-button').click(function(event){event.preventDefault();jQuery('.responsive-topnav').slideToggle();jQuery('ul.sub-menu').show();});});jQuery('.top-navigation ul.sub-menu').hide();jQuery('.top-navigation li').hover(function(){jQuery(this).children('ul.sub-menu').slideDown('fast');},function(){jQuery(this).children('ul.sub-menu').hide();});jQuery('.main-navigation ul.sub-menu').hide();jQuery('.main-navigation li').hover(function(){jQuery(this).children('ul.sub-menu').slideDown('fast');},function(){jQuery(this).children('ul.sub-menu').hide();});
/*!
* Bootstrap v3.2.0 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*!
* Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=76cb0ad85093e916705a)
* Config saved to config.json and https://gist.github.com/76cb0ad85093e916705a
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),s=i.data("bs.alert");s||i.data("bs.alert",s=new o(this)),"string"==typeof e&&s[e].call(i)})}var i='[data-dismiss="alert"]',o=function(e){t(e).on("click",i,this.close)};o.VERSION="3.2.0",o.prototype.close=function(e){function i(){n.detach().trigger("closed.bs.alert").remove()}var o=t(this),s=o.attr("data-target");s||(s=o.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,""));var n=t(s);e&&e.preventDefault(),n.length||(n=o.hasClass("alert")?o:o.parent()),n.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(n.removeClass("in"),t.support.transition&&n.hasClass("fade")?n.one("bsTransitionEnd",i).emulateTransitionEnd(150):i())};var s=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=s,this},t(document).on("click.bs.alert.data-api",i,o.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),s=o.data("bs.button"),n="object"==typeof e&&e;s||o.data("bs.button",s=new i(this,n)),"toggle"==e?s.toggle():e&&s.setState(e)})}var i=function(e,o){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,o),this.isLoading=!1};i.VERSION="3.2.0",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",o=this.$element,s=o.is("input")?"val":"html",n=o.data();e+="Text",null==n.resetText&&o.data("resetText",o[s]()),o[s](null==n[e]?this.options[e]:n[e]),setTimeout(t.proxy(function(){"loadingText"==e?(this.isLoading=!0,o.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,o.removeClass(i).removeAttr(i))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}t&&this.$element.toggleClass("active")};var o=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=o,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var o=t(i.target);o.hasClass("btn")||(o=o.closest(".btn")),e.call(o,"toggle"),i.preventDefault()})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),s=o.data("bs.carousel"),n=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e),r="string"==typeof e?e:n.slide;s||o.data("bs.carousel",s=new i(this,n)),"number"==typeof e?s.to(e):r?s[r]():n.interval&&s.pause().cycle()})}var i=function(e,i){this.$element=t(e).on("keydown.bs.carousel",t.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.2.0",i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},i.prototype.keydown=function(t){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.to=function(e){var i=this,o=this.getItemIndex(this.$active=this.$element.find(".item.active"));return e>this.$items.length-1||0>e?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(e)}):o==e?this.pause().cycle():this.slide(e>o?"next":"prev",t(this.$items[e]))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(e,i){var o=this.$element.find(".item.active"),s=i||o[e](),n=this.interval,r="next"==e?"left":"right",a="next"==e?"first":"last",l=this;if(!s.length){if(!this.options.wrap)return;s=this.$element.find(".item")[a]()}if(s.hasClass("active"))return this.sliding=!1;var h=s[0],p=t.Event("slide.bs.carousel",{relatedTarget:h,direction:r});if(this.$element.trigger(p),!p.isDefaultPrevented()){if(this.sliding=!0,n&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var c=t(this.$indicators.children()[this.getItemIndex(s)]);c&&c.addClass("active")}var d=t.Event("slid.bs.carousel",{relatedTarget:h,direction:r});return t.support.transition&&this.$element.hasClass("slide")?(s.addClass(e),s[0].offsetWidth,o.addClass(r),s.addClass(r),o.one("bsTransitionEnd",function(){s.removeClass([e,r].join(" ")).addClass("active"),o.removeClass(["active",r].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(d)},0)}).emulateTransitionEnd(1e3*o.css("transition-duration").slice(0,-1))):(o.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(d)),n&&this.cycle(),this}};var o=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=o,this},t(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(i){var o,s=t(this),n=t(s.attr("data-target")||(o=s.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""));if(n.hasClass("carousel")){var r=t.extend({},n.data(),s.data()),a=s.attr("data-slide-to");a&&(r.interval=!1),e.call(n,r),a&&n.data("bs.carousel").to(a),i.preventDefault()}}),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),+function(t){"use strict";function e(e){e&&3===e.which||(t(s).remove(),t(n).each(function(){var o=i(t(this)),s={relatedTarget:this};o.hasClass("open")&&(o.trigger(e=t.Event("hide.bs.dropdown",s)),e.isDefaultPrevented()||o.removeClass("open").trigger("hidden.bs.dropdown",s))}))}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var o=i&&t(i);return o&&o.length?o:e.parent()}function o(e){return this.each(function(){var i=t(this),o=i.data("bs.dropdown");o||i.data("bs.dropdown",o=new r(this)),"string"==typeof e&&o[e].call(i)})}var s=".dropdown-backdrop",n='[data-toggle="dropdown"]',r=function(e){t(e).on("click.bs.dropdown",this.toggle)};r.VERSION="3.2.0",r.prototype.toggle=function(o){var s=t(this);if(!s.is(".disabled, :disabled")){var n=i(s),r=n.hasClass("open");if(e(),!r){"ontouchstart"in document.documentElement&&!n.closest(".navbar-nav").length&&t('