text: function govspeakBarcharts(){$(".govuk-govspeak .js-barchart-table").each(function(){$.magnaCharta($(this),{toggleText:"Change between chart and table"})})}!function(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i=function(t){t=t.replace(/\x0d\x0a/g,"\n");for(var e="",i=0;i<t.length;i++){var n=t.charCodeAt(i);128>n?e+=String.fromCharCode(n):n>127&&2048>n?(e+=String.fromCharCode(n>>6|192),e+=String.fromCharCode(63&n|128)):(e+=String.fromCharCode(n>>12|224),e+=String.fromCharCode(n>>6&63|128),e+=String.fromCharCode(63&n|128))}return e},n=function(t){for(var e="",i=0,n=c1=c2=0;i<t.length;)n=t.charCodeAt(i),128>n?(e+=String.fromCharCode(n),i++):n>191&&224>n?(c2=t.charCodeAt(i+1),e+=String.fromCharCode((31&n)<<6|63&c2),i+=2):(c2=t.charCodeAt(i+1),c3=t.charCodeAt(i+2),e+=String.fromCharCode((15&n)<<12|(63&c2)<<6|63&c3),i+=3);return e};t.extend({base64Encode:function(t){var n,a,o,s,r,l,c,u="",d=0;for(t=i(t);d<t.length;)n=t.charCodeAt(d++),a=t.charCodeAt(d++),o=t.charCodeAt(d++),s=n>>2,r=(3&n)<<4|a>>4,l=(15&a)<<2|o>>6,c=63&o,isNaN(a)?l=c=64:isNaN(o)&&(c=64),u=u+e.charAt(s)+e.charAt(r)+e.charAt(l)+e.charAt(c);return u},base64Decode:function(t){var i,a,o,s,r,l,c,u="",d=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");d<t.length;)s=e.indexOf(t.charAt(d++)),r=e.indexOf(t.charAt(d++)),l=e.indexOf(t.charAt(d++)),c=e.indexOf(t.charAt(d++)),i=s<<2|r>>4,a=(15&r)<<4|l>>2,o=(3&l)<<6|c,u+=String.fromCharCode(i),64!=l&&(u+=String.fromCharCode(a)),64!=c&&(u+=String.fromCharCode(o));return u=n(u)}})}(jQuery),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),i=this,n=function(){},a=function(){return i.apply(this instanceof n&&t?this:t,e.concat(Array.prototype.slice.call(arguments)))};return n.prototype=this.prototype,a.prototype=new n,a}),function(){"use strict";function t(){"function"==typeof window.ga&&ga.apply(window,arguments)}window.GOVUK=window.GOVUK||{};var e=function(e,i){function n(e,i){t("create",e,{cookieDomain:i})}function a(){t("set","anonymizeIp",!0)}n(e,i),a()};e.load=function(){!function(t,e,i,n,a,o,s){t.GoogleAnalyticsObject=a,t[a]=t[a]||function(){(t[a].q=t[a].q||[]).push(arguments)},t[a].l=1*new Date,o=e.createElement(i),s=e.getElementsByTagName(i)[0],o.async=1,o.src=n,s.parentNode.insertBefore(o,s)}(window,document,"script","//www.google-analytics.com/analytics.js","ga")},e.prototype.trackPageview=function(e,i,n){var n=n||{};if("string"==typeof e){var a={page:e};"string"==typeof i&&(a.title=i),n.transport&&(a.transport=n.transport),t("send","pageview",a)}else t("send","pageview")},e.prototype.trackEvent=function(e,i,n){var a,n=n||{},o={hitType:"event",eventCategory:e,eventAction:i};"string"==typeof n.label&&(o.eventLabel=n.label),"string"==typeof n.page&&(o.page=n.page),(n.value||0===n.value)&&(a=parseInt(n.value,10),"number"!=typeof a||isNaN(a)||(o.eventValue=a)),n.nonInteraction&&(o.nonInteraction=1),n.transport&&(o.transport=n.transport),t("send",o)},e.prototype.trackSocial=function(e,i,n){t("send",{hitType:"social",socialNetwork:e,socialAction:i,socialTarget:n})},e.prototype.addLinkedTrackerDomain=function(e,i,n){t("create",e,"auto",{name:i}),t("require","linker"),t(i+".require","linker"),t("linker:autoLink",[n]),t(i+".linker:autoLink",[n]),t(i+".set","anonymizeIp",!0),t(i+".send","pageview")},e.prototype.setDimension=function(e,i){t("set","dimension"+e,String(i))},GOVUK.GoogleAnalyticsUniversalTracker=e}(),function(){"use strict";window.GOVUK=window.GOVUK||{};var t=function(t){this.trackers=[],"undefined"!=typeof t.universalId&&this.trackers.push(new GOVUK.GoogleAnalyticsUniversalTracker(t.universalId,t.cookieDomain))};t.prototype.sendToTrackers=function(t,e){for(var i=0,n=this.trackers.length;n>i;i++){var a=this.trackers[i],o=a[t];"function"==typeof o&&o.apply(a,e)}},t.load=function(){GOVUK.GoogleAnalyticsUniversalTracker.load()},t.prototype.trackPageview=function(t,e,i){this.sendToTrackers("trackPageview",arguments)},t.prototype.trackEvent=function(t,e,i){this.sendToTrackers("trackEvent",arguments)},t.prototype.trackShare=function(t){this.sendToTrackers("trackSocial",[t,"share",location.pathname])},t.prototype.setDimension=function(t,e){this.sendToTrackers("setDimension",arguments)},t.prototype.addLinkedTrackerDomain=function(t,e,i){this.sendToTrackers("addLinkedTrackerDomain",arguments)},GOVUK.Analytics=t}(),function(){"use strict";GOVUK.analyticsPlugins=GOVUK.analyticsPlugins||{},GOVUK.analyticsPlugins.printIntent=function(){var t=function(){GOVUK.analytics.trackEvent("Print Intent",document.location.pathname),GOVUK.analytics.trackPageview("/print"+document.location.pathname)};if(window.matchMedia){var e=window.matchMedia("print"),i=0;e.addListener(function(e){e.matches||0!==i||(t(),i++,window.setTimeout(function(){i=0},3e3))})}window.onafterprint&&(window.onafterprint=t)}}(),function(){"use strict";GOVUK.analyticsPlugins=GOVUK.analyticsPlugins||{},GOVUK.analyticsPlugins.error=function(t){function e(t){return t&&i?i.test(t)?!0:!1:!0}var t=t||{},i=t.filenameMustMatch,n=function(t){var i=t.filename,n=i+": "+t.lineno;e(i)&&GOVUK.analytics.trackEvent("JavaScript Error",t.message,{label:n,value:1,nonInteraction:!0})};window.addEventListener?window.addEventListener("error",n,!1):window.attachEvent?window.attachEvent("onerror",n):window.onerror=n}}(),function(){"use strict";GOVUK.analyticsPlugins=GOVUK.analyticsPlugins||{},GOVUK.analyticsPlugins.mailtoLinkTracker=function(){function t(t){var i=e(t),n={transport:"beacon"},a=i.attr("href"),o=$.trim(i.text());o&&(n.label=o),GOVUK.analytics.trackEvent("Mailto Link Clicked",a,n)}function e(t){var e=$(t.target);return e.is("a")||(e=e.parents("a")),e}var i='a[href^="mailto:"]';$("body").on("click",i,t)}}(),function(){"use strict";GOVUK.analyticsPlugins=GOVUK.analyticsPlugins||{},GOVUK.analyticsPlugins.externalLinkTracker=function(){function t(t){var i=e(t),n={transport:"beacon"},a=i.attr("href"),o=$.trim(i.text());o&&(n.label=o),GOVUK.analytics.trackEvent("External Link Clicked",a,n)}function e(t){var e=$(t.target);return e.is("a")||(e=e.parents("a")),e}var i=GOVUK.analyticsPlugins.externalLinkTracker.getHostname(),n='a[href^="http"]:not(a[href*="'+i+'"])';$("body").on("click",n,t)},GOVUK.analyticsPlugins.externalLinkTracker.getHostname=function(){return window.location.hostname}}(),function(){"use strict";GOVUK.analyticsPlugins=GOVUK.analyticsPlugins||{},GOVUK.analyticsPlugins.downloadLinkTracker=function(t){function e(t){var e=i(t),n=e.attr("href"),a={transport:"beacon"},o=$.trim(e.text());o&&(a.label=o),GOVUK.analytics.trackEvent("Download Link Clicked",n,a)}function i(t){var e=$(t.target);return e.is("a")||(e=e.parents("a")),e}var t=t||{},n=t.selector;n&&$("body").on("click",n,e)}}(),function(){"use strict";window.GOVUK=window.GOVUK||{};var t=function(t){function e(){window.devicePixelRatio&&n.setDimension(11,window.devicePixelRatio)}function i(){n.setDimension(15,window.httpStatusCode||200)}var n=new GOVUK.Analytics(t);this.analytics=n,e(),i(),this.setDimensionsFromMetaTags(),this.callMethodRequestedByPreviousPage(),n.trackPageview(),GOVUK.analyticsPlugins.error({filenameMustMatch:/gov\.uk/}),GOVUK.analyticsPlugins.printIntent(),GOVUK.analyticsPlugins.mailtoLinkTracker(),GOVUK.analyticsPlugins.externalLinkTracker(),GOVUK.analyticsPlugins.downloadLinkTracker({selector:'a[href*="/government/uploads"], a[href*="assets.publishing.service.gov.uk"]'})};t.prototype.callOnNextPage=function(t,e){e=e||[],$.isArray(e)||(e=[e]),GOVUK.cookie&&"function"==typeof this[t]&&(e.unshift(t),GOVUK.cookie("analytics_next_page_call",JSON.stringify(e)))},t.prototype.callMethodRequestedByPreviousPage=function(){if(GOVUK.cookie&&null!==GOVUK.cookie("analytics_next_page_call")){var t,e;try{t=JSON.parse(GOVUK.cookie("analytics_next_page_call")),e=t.shift()}catch(i){}e&&"function"==typeof this[e]&&this[e].apply(this,t),GOVUK.cookie("analytics_next_page_call",null)}},t.load=function(){GOVUK.Analytics.load()},t.prototype.setDimensionsFromMetaTags=function(){var t=$('meta[name^="govuk:"]'),e={};t.each(function(){var t=$(this),i=t.attr("name").split("govuk:")[1],n=t.attr("content");e[i]=n}),this.setSectionDimension(e.section),this.setFormatDimension(e.format),this.setResultCountDimension(e["search-result-count"]),this.setPublishingGovernmentDimension(e["publishing-government"]),this.setPoliticalStatusDimension(e["political-status"]),this.setOrganisationsDimension(e["analytics:organisations"]),this.setWorldLocationsDimension(e["analytics:world-locations"]),this.setRenderingApplicationDimension(e["rendering-application"])},t.prototype.trackPageview=function(t,e,i){this.analytics.trackPageview(t,e,i)},t.prototype.trackEvent=function(t,e,i){this.analytics.trackEvent(t,e,i)},t.prototype.setDimension=function(t,e,i,n){"undefined"!=typeof e&&this.analytics.setDimension(t,e,i,n)},t.prototype.trackShare=function(t){this.analytics.trackShare(t)},t.prototype.addLinkedTrackerDomain=function(t,e,i){this.analytics.addLinkedTrackerDomain(t,e,i)},t.prototype.setSectionDimension=function(t){this.setDimension(1,t)},t.prototype.setFormatDimension=function(t){this.setDimension(2,t)},t.prototype.setResultCountDimension=function(t){this.setDimension(5,t)},t.prototype.setPublishingGovernmentDimension=function(t){this.setDimension(6,t)},t.prototype.setPoliticalStatusDimension=function(t){this.setDimension(7,t)},t.prototype.setOrganisationsDimension=function(t){this.setDimension(9,t)},t.prototype.setWorldLocationsDimension=function(t){this.setDimension(10,t)},t.prototype.setRenderingApplicationDimension=function(t){this.setDimension(20,t)},t.prototype.setSearchPositionDimension=function(t){this.setDimension(21,t)},GOVUK.StaticAnalytics=t}(),function(){"use strict";GOVUK.StaticAnalytics.load();var t="www.gov.uk"==document.domain?".www.gov.uk":document.domain,e=new GOVUK.StaticAnalytics({universalId:"UA-26179049-1",cookieDomain:t});GOVUK.analytics=e}(),function(){"use strict";function t(t){return this.config=this.getConfigForCurrentPath(t),this.SCROLL_TIMEOUT_DELAY=10,this.config?(this.enabled=!0,this.trackedNodes=this.buildNodes(this.config),$(window).scroll($.proxy(this.onScroll,this)),void this.trackVisibleNodes()):void(this.enabled=!1)}window.GOVUK=window.GOVUK||{};var e={"/contact-the-dvla/y/driving-licences-and-applications":[["Heading","Driving licencing enquiries"],["Heading","When to contact DVLA"]],"/contact-the-dvla/y/vehicle-tax-and-sorn":[["Heading","Vehicle tax enquiries"],["Heading","When to contact DVLA"]],"/contact-the-dvla/y/vehicle-registration-and-v5c-certificates-log-books":[["Heading","Vehicle registration enquiries"],["Heading","When to contact DVLA"]],"/government/collections/disability-confident-campaign":[["Heading","Become a Disability Confident employer"],["Heading","Aims and objectives"],["Heading","Inclusive communication"]],"/government/publications/the-essential-trustee-what-you-need-to-know-cc3/the-essential-trustee-what-you-need-to-know-what-you-need-to-do":[["Heading","1. About this guidance"],["Heading","2. Trustees\u2019 duties at a glance"],["Heading","3. Who can be a trustee and how trustees are appointed"],["Heading","4. Ensure your charity is carrying out its purposes for the public benefit"],["Heading","5. Comply with your charity\u2019s governing document and the law"],["Heading","6. Act in your charity\u2019s best interests"],["Heading","7. Manage your charity\u2019s resources responsibly"],["Heading","8. Act with reasonable care and skill"],["Heading","9. Ensure your charity is accountable"],["Heading","10. Reduce the risk of liability"],["Heading","11. Your charity\u2019s legal structure and what it means"],["Heading","12. Charity officers - the chair and treasurer"],["Heading","13. Technical terms used in this guidance"]],"/guidance/universal-credit-how-it-helps-you-into-work":[["Heading","Support from your work coach"],["Heading","Help available for parents"],["Heading","When you can claim Universal Credit"],["Heading","More detailed advice"]],"/openingupwork":[["Heading","How Universal Credit makes work pay"],["Heading","When you can claim Universal Credit"],["Heading","Help and advice"]]};t.prototype.getConfigForCurrentPath=function(t){for(var e in t)if(this.normalisePath(window.location.pathname)==this.normalisePath(e))return t[e]},t.prototype.buildNodes=function(e){for(var i,n,a=[],o=0;o<e.length;o++)i=t[e[o][0]+"Node"],n=e[o][1],a.push(new i(n));return a},t.prototype.normalisePath=function(t){return t.split("/").join("")},t.prototype.onScroll=function(){clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout($.proxy(this.trackVisibleNodes,this),this.SCROLL_TIMEOUT_DELAY)},t.prototype.trackVisibleNodes=function(){for(var t=0;t<this.trackedNodes.length;t++)if(this.trackedNodes[t].isVisible()&&!this.trackedNodes[t].alreadySeen){this.trackedNodes[t].alreadySeen=!0;var e=this.trackedNodes[t].eventData.action,i=this.trackedNodes[t].eventData.label;GOVUK.analytics.trackEvent("ScrollTo",e,{label:i,nonInteraction:!0})}},t.HeadingNode=function(t){function e(t){for(var e=$("h1, h2, h3, h4, h5, h6"),i=0;i<e.length;i++)if($.trim(e.eq(i).text()).replace(/\s/g," ")==t)return e.eq(i)}this.$element=e(t),this.eventData={action:"Heading",label:t}},t.HeadingNode.prototype.isVisible=function(){return this.$element?this.elementIsVisible(this.$element):!1},t.HeadingNode.prototype.elementIsVisible=function(t){var e=$(window),i=t.offset().top;return i>e.scrollTop()&&i<e.scrollTop()+e.height()},$().ready(function(){window.GOVUK.scrollTracker=new t(e)}),window.GOVUK.ScrollTracker=t}(),function(t,e){"use strict";e.GOVUK=e.GOVUK||{},GOVUK.Modules=GOVUK.Modules||{},GOVUK.modules={find:function(e){var i,n="[data-module]",e=e||t("body");return i=e.find(n),e.is(n)&&(i=i.add(e)),i},start:function(e){function i(t){return a(n(t))}function n(t){return t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}function a(t){return t.charAt(0).toUpperCase()+t.slice(1)}for(var o=this.find(e),s=0,r=o.length;r>s;s++){var l,c=t(o[s]),u=i(c.data("module")),d=c.data("module-started");"function"!=typeof GOVUK.Modules[u]||d||(l=new GOVUK.Modules[u],l.start(c),c.data("module-started",!0))}}}}(jQuery,window),function(t,e){"use strict";var i=e.$,n=i(e);t.StickyElementContainer=function(){var t=this;t._getWindowDimensions=function(){return{height:n.height(),width:n.width()}},t._getWindowPositions=function(){return{scrollTop:n.scrollTop()}},t.start=function(e){function i(){n.resize(a),n.scroll(o),setInterval(s,w),setInterval(r,w),s(),r(),v.addClass("govuk-sticky-element")}function a(){m=!0}function o(){y=!0}function s(){if(m){m=!1,y=!0;var i=t._getWindowDimensions();f=e.offset().top,g=e.offset().top+e.height()-i.height}}function r(){y&&(y=!1,b=t._getWindowPositions().scrollTop,l(),c())}function l(){var t=b>f;t?h():p()}function c(){var t=b>g;t?d():u()}function u(){v.addClass("govuk-sticky-element--stuck-to-window"),v.removeClass("govuk-sticky-element--stuck-to-parent")}function d(){v.addClass("govuk-sticky-element--stuck-to-parent"),v.removeClass("govuk-sticky-element--stuck-to-window")}function h(){v.removeClass("govuk-sticky-element--hidden")}function p(){v.addClass("govuk-sticky-element--hidden")}var f,g,v=e.find("[data-sticky-element]"),m=!0,y=!0,w=50,b=1;i()}}}(window.GOVUK.Modules,window),function(t){"use strict";t.Toggle=function(){this.start=function(t){function e(){var t=$(this);t.attr("role","button"),t.attr("aria-controls",t.data("controls")),t.attr("aria-expanded",t.data("expanded"));var e=n(t);e.attr("aria-live","polite"),e.attr("role","region"),t.data("$targets",e)}function i(t){var e=$(t.target),i="true"===e.attr("aria-expanded"),n=e.data("$targets");i?(e.attr("aria-expanded",!1),n.addClass("js-hidden")):(e.attr("aria-expanded",!0),n.removeClass("js-hidden")),t.preventDefault()}function n(e){var i=e.attr("aria-controls").split(" "),n="#"+i.join(", #");return t.find(n)}var a="[data-controls][data-expanded]";t.on("click",a,i),t.find(a).each(e)}}}(window.GOVUK.Modules),$(document).ready(function(){GOVUK.modules.start()}),function(){"use strict";var t=this,e=t.jQuery;"undefined"==typeof t.GOVUK&&(t.GOVUK={});var i='<section id="user-satisfaction-survey" class="visible" aria-hidden="false">  <div class="wrapper">    <h1>Tell us what you think of GOV.UK</h1>    <p class="right"><a href="#survey-no-thanks" id="survey-no-thanks">No thanks</a></p>    <p><a href="javascript:void()" id="take-survey" target="_blank">Take the 3 minute survey</a> This will open a short survey on another website</p>  </div></section>',n={defaultSurvey:{url:"https://www.surveymonkey.com/s/2MRDLTW",identifier:"user_satisfaction_survey",template:i,frequency:50},smallSurveys:[{url:"https://www.surveymonkey.co.uk/r/GZ2JDHZ",identifier:"three_word_survey",template:'<section id="user-satisfaction-survey" class="visible" aria-hidden="false">  <div class="wrapper">    <h1>How do you feel about your visit to GOV.UK today?</h1>    <p class="right"><a href="#survey-no-thanks" id="survey-no-thanks">No thanks</a></p>    <p><a href="javascript:void()" id="take-survey" target="_blank">Take the 1 question survey</a> This will open a short survey on another website</p>  </div></section>',startTime:new Date("September 7, 2016").getTime(),endTime:new Date("September 8, 2016 23:59:59").getTime(),frequency:50}],init:function(){var t=n.getActiveSurvey(n.defaultSurvey,n.smallSurveys);n.isSurveyToBeDisplayed(t)&&n.displaySurvey(t)},getActiveSurvey:function(t,i){var a=t;return e.each(i,function(t,e){n.currentTime()>=e.startTime&&n.currentTime()<=e.endTime&&("function"==typeof e.activeWhen?e.activeWhen()&&(a=e):a=e)}),a},displaySurvey:function(i){e("#user-satisfaction-survey-container").append(i.template),n.setEventHandlers(i);var a=e("#take-survey"),o=i.url;-1===o.indexOf("?c=")&&(o+="?c="+t.location.pathname),a.attr("href",o),n.trackEvent(i.identifier,"banner_shown","Banner has been shown")},setEventHandlers:function(t){var i=e("#survey-no-thanks"),a=e("#take-survey");i.click(function(e){return n.setSurveyTakenCookie(t),n.trackEvent(t.identifier,"banner_no_thanks","No thanks clicked"),e.stopPropagation(),!1}),a.click(function(){n.setSurveyTakenCookie(t),n.trackEvent(t.identifier,"banner_taken","User taken survey")})},isSurveyToBeDisplayed:function(t){return n.otherNotificationVisible()||"true"===GOVUK.cookie(n.surveyTakenCookieName(t))?!1:n.userCompletedTransaction()?!1:e("#user-satisfaction-survey-container").length<=0?!1:n.randomNumberMatches(t.frequency)?!0:!1},userCompletedTransaction:function(){function t(t,e){return t.indexOf(e)>-1}var e=n.currentPath();return t(e,"/done")||t(e,"/transaction-finished")||t(e,"/driving-transaction-finished")?!0:void 0},trackEvent:function(t,e,i){GOVUK.analytics.trackEvent(t,e,{label:i,value:1,nonInteraction:!0})},setSurveyTakenCookie:function(t){GOVUK.cookie(n.surveyTakenCookieName(t),!0,{days:120}),e("#user-satisfaction-survey").removeClass("visible").attr("aria-hidden","true")},randomNumberMatches:function(t){return 0===Math.floor(Math.random()*t)},otherNotificationVisible:function(){return e("#banner-notification:visible, #global-cookie-message:visible, #global-browser-prompt:visible").length>0},surveyTakenCookieName:function(t){var e="taken_"+t.identifier,i=e.replace(/(\_\w)/g,function(t){return t[1].toUpperCase()});return"govuk_"+i},currentTime:function(){return(new Date).getTime()},currentPath:function(){return window.location.pathname}};t.GOVUK.userSurveys=n}.call(this),$(document).ready(function(){$(".print-link a").attr("target","_blank");var t=$(".js-search-focus");if(t.each(function(t,e){""!==$(e).val()&&$(e).addClass("focus")}),t.on("focus",function(t){$(t.target).addClass("focus")}),t.on("blur",function(t){""===$(t.target).val()&&$(t.target).removeClass("focus")}),window.GOVUK){GOVUK.userSurveys&&GOVUK.userSurveys.init();var e="label.selectable input[type='radio'], label.selectable input[type='checkbox']";new GOVUK.SelectionButtons(e),GOVUK.webchat&&GOVUK.webchat.init()}}),function(){"use strict";window.GOVUK=window.GOVUK||{};var t=function(t){this.$form=t,t.on("submit",this.submit.bind(this)),this.appendHiddenContextInformation()};t.prototype.appendHiddenContextInformation=function(){this.$form.append('<input type="hidden" name="javascript_enabled" value="true"/>'),this.$form.append($('<input type="hidden" name="referrer">').val(document.referrer||"unknown"))},t.prototype.hidePrompt=function(){this.$form.find(".error-notification").remove()},t.prototype.disableSubmitButton=function(){this.$form.find(".button").prop("disabled",!0)},t.prototype.enableSubmitButton=function(){this.$form.find(".button").prop("disabled",!1)},t.prototype.promptUserToEnterValidData=function(){this.enableSubmitButton();var t=$('<p class="error-notification">Please enter details of what you were doing.</p>');this.$form.prepend(t)},t.prototype.handleError=function(t,e){"error"!==e&&t.responseText||(422==t.status?this.promptUserToEnterValidData():this.triggerError())},t.prototype.setUrl=function(){this.$form.find("input#url").val(window.location)},t.prototype.postFormViaAjax=function(){$.ajax({type:"POST",url:this.$form.attr("action"),dataType:"json",data:this.$form.serialize(),success:this.triggerSuccess.bind(this),error:this.handleError.bind(this),statusCode:{500:this.triggerError.bind(this)}})},t.prototype.submit=function(t){this.hidePrompt(),this.setUrl(),this.disableSubmitButton(),this.postFormViaAjax(),t.preventDefault()},t.prototype.triggerError=function(){this.$form.trigger("reportAProblemForm.error")},t.prototype.triggerSuccess=function(t){this.$form.trigger("reportAProblemForm.success",t)},GOVUK.ReportAProblemForm=t}(),function(){"use strict";window.GOVUK=window.GOVUK||{};var t=function(t){this.$container=t;var e=t.find("form");new GOVUK.ReportAProblemForm(e);e.on("reportAProblemForm.success",this.showConfirmation.bind(this)),e.on("reportAProblemForm.error",this.showError.bind(this)),t.parent().on("click",".js-report-a-problem-toggle",this.toggleForm.bind(this)),this.addToggleLink()};t.prototype.addToggleLink=function(){this.$container.before('      <div class="report-a-problem-toggle-wrapper js-footer">        <p class="report-a-problem-toggle">          <a href="" class="js-report-a-problem-toggle">Is there anything wrong with this page?</a>        </p>      </div>')},t.prototype.toggleForm=function(t){this.$container.toggle(),$(t.target).is("a")&&t.preventDefault()},t.prototype.showConfirmation=function(t,e){this.$container.find(".report-a-problem-content").html(e.message)},t.prototype.showError=function(){var t="      <h2>Sorry, we\u2019re unable to receive your message right now.</h2>      <p>We have other ways for you to provide feedback on the       <a href='/contact'>contact page</a>.</p>";this.$container.find(".report-a-problem-content").html(t)},GOVUK.ReportAProblem=t,$(document).ready(function(){new GOVUK.ReportAProblem($(".report-a-problem-container"))})}(),function(){"use strict";var t=this,e=t.jQuery;"undefined"==typeof GOVUK&&(t.GOVUK={});var i=function(t,i){var n;this.selectedClass="selected",this.focusedClass="focused",void 0!==i&&e.each(i,function(t,e){this[t]=e}.bind(this)),"string"==typeof t?(n=e(t),this.selector=t,this.setInitialState(e(this.selector))):void 0!==t&&(this.$elms=t,this.setInitialState(this.$elms)),this.addEvents()};i.prototype.addEvents=function(){"undefined"!=typeof this.$elms?this.addElementLevelEvents():this.addDocumentLevelEvents()},i.prototype.setInitialState=function(t){t.each(function(t,i){var n=e(i);n.is(":checked")&&this.markSelected(n)}.bind(this))},i.prototype.markFocused=function(t,e){"focused"===e?t.parent("label").addClass(this.focusedClass):t.parent("label").removeClass(this.focusedClass)},i.prototype.markSelected=function(t){var i;"radio"===t.attr("type")?(i=t.attr("name"),e(t[0].form).find('input[name="'+i+'"]').parent("label").removeClass(this.selectedClass),t.parent("label").addClass(this.selectedClass)):t.is(":checked")?t.parent("label").addClass(this.selectedClass):t.parent("label").removeClass(this.selectedClass)},i.prototype.addElementLevelEvents=function(){this.clickHandler=this.getClickHandler(),this.focusHandler=this.getFocusHandler({level:"element"}),this.$elms.on("click",this.clickHandler).on("focus blur",this.focusHandler)},i.prototype.addDocumentLevelEvents=function(){this.clickHandler=this.getClickHandler(),this.focusHandler=this.getFocusHandler({level:"document"}),e(document).on("click",this.selector,this.clickHandler).on("focus blur",this.selector,this.focusHandler)},i.prototype.getClickHandler=function(){return function(t){this.markSelected(e(t.target))}.bind(this)},i.prototype.getFocusHandler=function(t){var i="document"===t.level?"focusin":"focus";return function(t){var n=t.type===i?"focused":"blurred";this.markFocused(e(t.target),n)}.bind(this)},i.prototype.destroy=function(){"undefined"!=typeof this.selector?e(document).off("click",this.selector,this.clickHandler).off("focus blur",this.selector,this.focusHandler):this.$elms.off("click",this.clickHandler).off("focus blur",this.focusHandler)},t.GOVUK.SelectionButtons=i}.call(this),function(t,e){function i(e,i){var a,o,s,r=e.nodeName.toLowerCase();return"area"===r?(a=e.parentNode,o=a.name,e.href&&o&&"map"===a.nodeName.toLowerCase()?(s=t("img[usemap=#"+o+"]")[0],!!s&&n(s)):!1):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&n(e)}function n(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var a=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,n){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),n&&n.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var n,a,o=t(this[0]);o.length&&o[0]!==document;){if(n=o.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(a=parseInt(o.css("zIndex"),10),!isNaN(a)&&0!==a))return a;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,n){return!!t.data(e,n[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var n=t.attr(e,"tabindex"),a=isNaN(n);return(a||n>=0)&&i(e,!a)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,n){function a(e,i,n,a){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),a&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===n?["Left","Right"]:["Top","Bottom"],s=n.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(i){return i===e?r["inner"+n].call(this):this.each(function(){t(this).css(s,a(this,i)+"px")})},t.fn["outer"+n]=function(e,i){return"number"!=typeof e?r["outer"+n].call(this,e):this.each(function(){t(this).css(s,a(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,n){var a,o=t.ui[e].prototype;for(a in n)o.plugins[a]=o.plugins[a]||[],o.plugins[a].push([i,n[a]])},call:function(t,e,i){var n,a=t.plugins[e];if(a&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(n=0;n<a.length;n++)t.options[a[n][0]]&&a[n][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return e[n]>0?!0:(e[n]=1,a=e[n]>0,e[n]=0,a)}})}(jQuery),function(t,e){var i=0,n=Array.prototype.slice,a=t.cleanData;t.cleanData=function(e){for(var i,n=0;null!=(i=e[n]);n++)try{t(i).triggerHandler("remove")}catch(o){}a(e)},t.widget=function(e,i,n){var a,o,s,r,l={},c=e.split(".")[0];e=e.split(".")[1],a=c+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][a.toLowerCase()]=function(e){return!!t.data(e,a)},t[c]=t[c]||{},o=t[c][e],s=t[c][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new s(t,e)},t.extend(s,o,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),r=new i,r.options=t.widget.extend({},r.options),t.each(n,function(e,n){return t.isFunction(n)?void(l[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},a=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=a,e=n.apply(this,arguments),this._super=i,this._superApply=o,e}}()):void(l[e]=n)}),s.prototype=t.widget.extend(r,{widgetEventPrefix:o?r.widgetEventPrefix:e},l,{constructor:s,namespace:c,widgetName:e,widgetFullName:a}),o?(t.each(o._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,s,i._proto)}),delete o._childConstructors):i._childConstructors.push(s),t.widget.bridge(e,s)},t.widget.extend=function(i){for(var a,o,s=n.call(arguments,1),r=0,l=s.length;l>r;r++)for(a in s[r])o=s[r][a],s[r].hasOwnProperty(a)&&o!==e&&(t.isPlainObject(o)?i[a]=t.isPlainObject(i[a])?t.widget.extend({},i[a],o):t.widget.extend({},o):i[a]=o);return i},t.widget.bridge=function(i,a){var o=a.prototype.widgetFullName||i;t.fn[i]=function(s){var r="string"==typeof s,l=n.call(arguments,1),c=this;return s=!r&&l.length?t.widget.extend.apply(null,[s].concat(l)):s,r?this.each(function(){var n,a=t.data(this,o);return a?t.isFunction(a[s])&&"_"!==s.charAt(0)?(n=a[s].apply(a,l),n!==a&&n!==e?(c=n&&n.jquery?c.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+s+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+s+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(s||{})._init():t.data(this,o,new a(s,this))}),c}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),
  this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,n){var a,o,s,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},a=i.split("."),i=a.shift(),a.length){for(o=r[i]=t.widget.extend({},this.options[i]),s=0;s<a.length-1;s++)o[a[s]]=o[a[s]]||{},o=o[a[s]];if(i=a.pop(),n===e)return o[i]===e?null:o[i];o[i]=n}else{if(n===e)return this.options[i]===e?null:this.options[i];r[i]=n}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(e,i,n){var a,o=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=a=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,a=this.widget()),t.each(n,function(n,s){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof s?o[s]:s).apply(o,arguments):void 0}"string"!=typeof s&&(r.guid=s.guid=s.guid||r.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+o.eventNamespace,u=l[2];u?a.delegate(u,c,r):i.bind(c,r)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?n[t]:t).apply(n,arguments)}var n=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,n){var a,o,s=this.options[e];if(n=n||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(a in o)a in i||(i[a]=o[a]);return this.element.trigger(i,n),!(t.isFunction(s)&&s.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,a,o){"string"==typeof a&&(a={effect:a});var s,r=a?a===!0||"number"==typeof a?i:a.effect||i:e;a=a||{},"number"==typeof a&&(a={duration:a}),s=!t.isEmptyObject(a),a.complete=o,a.delay&&n.delay(a.delay),s&&t.effects&&t.effects.effect[r]?n[e](a):r!==e&&n[r]?n[r](a.duration,a.easing,o):n.queue(function(i){t(this)[e](),o&&o.call(n[0]),i()})}})}(jQuery),function(t,e){var i=!1;t(document).mouseup(function(){i=!1}),t.widget("ui.mouse",{version:"1.10.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!i){this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var n=this,a=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return a&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return n._mouseMove(t)},this._mouseUpDelegate=function(t){return n._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),i=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(t,e){var i=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,n=this.options,a=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",s=[];for(i=n.values&&n.values.length||1,a.length>i&&(a.slice(i).remove(),a=a.slice(0,i)),e=a.length;i>e;e++)s.push(o);this.handles=a.add(t(s.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,n,a,o,s,r,l,c,u=this,d=this.options;return d.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),a=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(n-u.values(e));(a>i||a===i&&(e===u._lastChangedValue||u.values(e)===d.min))&&(a=i,o=t(this),s=e)}),r=this._start(e,s),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=s,o.addClass("ui-state-active").focus(),l=o.offset(),c=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=c?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,s,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,a,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/e,n>1&&(n=1),0>n&&(n=0),"vertical"===this.orientation&&(n=1-n),a=this._valueMax()-this._valueMin(),o=this._valueMin()+n*a,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var n,a,o;this.options.values&&this.options.values.length?(n=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>n||1===e&&n>i)&&(i=n),i!==this.values(e)&&(a=this.values(),a[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:a}),n=this.values(e?0:1),o!==!1&&this.values(e,i,!0))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var n,a,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(n=this.options.values,a=arguments[0],o=0;o<n.length;o+=1)n[o]=this._trimAlignValue(a[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var n,a=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(a=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=0;a>n;n+=1)this._change(null,n);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,n,a,o,s=this.options.range,r=this.options,l=this,c=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[c?"animate":"css"](u,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[c?"animate":"css"]({left:i+"%"},r.animate),1===n&&l.range[c?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===n&&l.range.stop(1,1)[c?"animate":"css"]({bottom:i+"%"},r.animate),1===n&&l.range[c?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(n=this.value(),a=this._valueMin(),o=this._valueMax(),i=o!==a?(n-a)/(o-a)*100:0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[c?"animate":"css"](u,r.animate),"min"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:i+"%"},r.animate),"max"===s&&"horizontal"===this.orientation&&this.range[c?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:i+"%"},r.animate),"max"===s&&"vertical"===this.orientation&&this.range[c?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(e){var n,a,o,s,r=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),n=this._start(e,r),n===!1))return}switch(s=this.options.step,a=o=this.options.values&&this.options.values.length?this.values(r):this.value(),e.keyCode){case t.ui.keyCode.HOME:o=this._valueMin();break;case t.ui.keyCode.END:o=this._valueMax();break;case t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(a+(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(a-(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(a===this._valueMax())return;o=this._trimAlignValue(a+s);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(a===this._valueMin())return;o=this._trimAlignValue(a-s)}this._slide(e,r,o)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}(jQuery);var swfobject=function(){function t(){if(!F){try{var t=I.getElementsByTagName("body")[0].appendChild(v("span"));t.parentNode.removeChild(t)}catch(e){return}F=!0;for(var i=L.length,n=0;i>n;n++)L[n]()}}function e(t){F?t():L[L.length]=t}function i(t){if(typeof D.addEventListener!=N)D.addEventListener("load",t,!1);else if(typeof I.addEventListener!=N)I.addEventListener("load",t,!1);else if(typeof D.attachEvent!=N)m(D,"onload",t);else if("function"==typeof D.onload){var e=D.onload;D.onload=function(){e(),t()}}else D.onload=t}function n(){j?a():o()}function a(){var t=I.getElementsByTagName("body")[0],e=v(x);e.setAttribute("type",V);var i=t.appendChild(e);if(i){var n=0;!function(){if(typeof i.GetVariable!=N){var a=i.GetVariable("$version");a&&(a=a.split(" ")[1].split(","),Q.pv=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)])}else if(10>n)return n++,void setTimeout(arguments.callee,10);t.removeChild(e),i=null,o()}()}else o()}function o(){var t=G.length;if(t>0)for(var e=0;t>e;e++){var i=G[e].id,n=G[e].callbackFn,a={success:!1,id:i};if(Q.pv[0]>0){var o=g(i);if(o)if(!y(G[e].swfVersion)||Q.wk&&Q.wk<312)if(G[e].expressInstall&&r()){var u={};u.data=G[e].expressInstall,u.width=o.getAttribute("width")||"0",u.height=o.getAttribute("height")||"0",o.getAttribute("class")&&(u.styleclass=o.getAttribute("class")),o.getAttribute("align")&&(u.align=o.getAttribute("align"));for(var d={},h=o.getElementsByTagName("param"),p=h.length,f=0;p>f;f++)"movie"!=h[f].getAttribute("name").toLowerCase()&&(d[h[f].getAttribute("name")]=h[f].getAttribute("value"));l(u,d,i,n)}else c(o),n&&n(a);else b(i,!0),n&&(a.success=!0,a.ref=s(i),n(a))}else if(b(i,!0),n){var v=s(i);v&&typeof v.SetVariable!=N&&(a.success=!0,a.ref=v),n(a)}}}function s(t){var e=null,i=g(t);if(i&&"OBJECT"==i.nodeName)if(typeof i.SetVariable!=N)e=i;else{var n=i.getElementsByTagName(x)[0];n&&(e=n)}return e}function r(){return!B&&y("6.0.65")&&(Q.win||Q.mac)&&!(Q.wk&&Q.wk<312)}function l(t,e,i,n){B=!0,_=n||null,O={success:!1,id:i};var a=g(i);if(a){"OBJECT"==a.nodeName?(k=u(a),S=null):(k=a,S=i),t.id=A,(typeof t.width==N||!/%$/.test(t.width)&&parseInt(t.width,10)<310)&&(t.width="310"),(typeof t.height==N||!/%$/.test(t.height)&&parseInt(t.height,10)<137)&&(t.height="137"),I.title=I.title.slice(0,47)+" - Flash Player Installation";var o=Q.ie&&Q.win?"ActiveX":"PlugIn",s="MMredirectURL="+D.location.toString().replace(/&/g,"%26")+"&MMplayerType="+o+"&MMdoctitle="+I.title;if(typeof e.flashvars!=N?e.flashvars+="&"+s:e.flashvars=s,Q.ie&&Q.win&&4!=a.readyState){var r=v("div");i+="SWFObjectNew",r.setAttribute("id",i),a.parentNode.insertBefore(r,a),a.style.display="none",function(){4==a.readyState?a.parentNode.removeChild(a):setTimeout(arguments.callee,10)}()}d(t,e,i)}}function c(t){if(Q.ie&&Q.win&&4!=t.readyState){var e=v("div");t.parentNode.insertBefore(e,t),e.parentNode.replaceChild(u(t),e),t.style.display="none",function(){4==t.readyState?t.parentNode.removeChild(t):setTimeout(arguments.callee,10)}()}else t.parentNode.replaceChild(u(t),t)}function u(t){var e=v("div");if(Q.win&&Q.ie)e.innerHTML=t.innerHTML;else{var i=t.getElementsByTagName(x)[0];if(i){var n=i.childNodes;if(n)for(var a=n.length,o=0;a>o;o++)1==n[o].nodeType&&"PARAM"==n[o].nodeName||8==n[o].nodeType||e.appendChild(n[o].cloneNode(!0))}}return e}function d(t,e,i){var n,a=g(i);if(Q.wk&&Q.wk<312)return n;if(a)if(typeof t.id==N&&(t.id=i),Q.ie&&Q.win){var o="";for(var s in t)t[s]!=Object.prototype[s]&&("data"==s.toLowerCase()?e.movie=t[s]:"styleclass"==s.toLowerCase()?o+=' class="'+t[s]+'"':"classid"!=s.toLowerCase()&&(o+=" "+s+'="'+t[s]+'"'));var r="";for(var l in e)e[l]!=Object.prototype[l]&&(r+='<param name="'+l+'" value="'+e[l]+'" />');a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+o+">"+r+"</object>",K[K.length]=t.id,n=g(t.id)}else{var c=v(x);c.setAttribute("type",V);for(var u in t)t[u]!=Object.prototype[u]&&("styleclass"==u.toLowerCase()?c.setAttribute("class",t[u]):"classid"!=u.toLowerCase()&&c.setAttribute(u,t[u]));for(var d in e)e[d]!=Object.prototype[d]&&"movie"!=d.toLowerCase()&&h(c,d,e[d]);a.parentNode.replaceChild(c,a),n=c}return n}function h(t,e,i){var n=v("param");n.setAttribute("name",e),n.setAttribute("value",i),t.appendChild(n)}function p(t){var e=g(t);e&&"OBJECT"==e.nodeName&&(Q.ie&&Q.win?(e.style.display="none",function(){4==e.readyState?f(t):setTimeout(arguments.callee,10)}()):e.parentNode.removeChild(e))}function f(t){var e=g(t);if(e){for(var i in e)"function"==typeof e[i]&&(e[i]=null);e.parentNode.removeChild(e)}}function g(t){var e=null;try{e=I.getElementById(t)}catch(i){}return e}function v(t){return I.createElement(t)}function m(t,e,i){t.attachEvent(e,i),H[H.length]=[t,e,i]}function y(t){var e=Q.pv,i=t.split(".");return i[0]=parseInt(i[0],10),i[1]=parseInt(i[1],10)||0,i[2]=parseInt(i[2],10)||0,e[0]>i[0]||e[0]==i[0]&&e[1]>i[1]||e[0]==i[0]&&e[1]==i[1]&&e[2]>=i[2]?!0:!1}function w(t,e,i,n){if(!Q.ie||!Q.mac){var a=I.getElementsByTagName("head")[0];if(a){var o=i&&"string"==typeof i?i:"screen";if(n&&($=null,T=null),!$||T!=o){var s=v("style");s.setAttribute("type","text/css"),s.setAttribute("media",o),$=a.appendChild(s),Q.ie&&Q.win&&typeof I.styleSheets!=N&&I.styleSheets.length>0&&($=I.styleSheets[I.styleSheets.length-1]),T=o}Q.ie&&Q.win?$&&typeof $.addRule==x&&$.addRule(t,e):$&&typeof I.createTextNode!=N&&$.appendChild(I.createTextNode(t+" {"+e+"}"))}}}function b(t,e){if(W){var i=e?"visible":"hidden";F&&g(t)?g(t).style.visibility=i:w("#"+t,"visibility:"+i)}}function C(t){var e=/[\\\"<>\.;]/,i=null!=e.exec(t);return i&&typeof encodeURIComponent!=N?encodeURIComponent(t):t}var k,S,_,O,$,T,N="undefined",x="object",M="Shockwave Flash",E="ShockwaveFlash.ShockwaveFlash",V="application/x-shockwave-flash",A="SWFObjectExprInst",P="onreadystatechange",D=window,I=document,U=navigator,j=!1,L=[n],G=[],K=[],H=[],F=!1,B=!1,W=!0,Q=function(){var t=typeof I.getElementById!=N&&typeof I.getElementsByTagName!=N&&typeof I.createElement!=N,e=U.userAgent.toLowerCase(),i=U.platform.toLowerCase(),n=i?/win/.test(i):/win/.test(e),a=i?/mac/.test(i):/mac/.test(e),o=/webkit/.test(e)?parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,s=!1,r=[0,0,0],l=null;if(typeof U.plugins!=N&&typeof U.plugins[M]==x)l=U.plugins[M].description,!l||typeof U.mimeTypes!=N&&U.mimeTypes[V]&&!U.mimeTypes[V].enabledPlugin||(j=!0,s=!1,l=l.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),r[0]=parseInt(l.replace(/^(.*)\..*$/,"$1"),10),r[1]=parseInt(l.replace(/^.*\.(.*)\s.*$/,"$1"),10),r[2]=/[a-zA-Z]/.test(l)?parseInt(l.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof D.ActiveXObject!=N)try{var c=new ActiveXObject(E);c&&(l=c.GetVariable("$version"),l&&(s=!0,l=l.split(" ")[1].split(","),r=[parseInt(l[0],10),parseInt(l[1],10),parseInt(l[2],10)]))}catch(u){}return{w3:t,pv:r,wk:o,ie:s,win:n,mac:a}}();(function(){Q.w3&&((typeof I.readyState!=N&&"complete"==I.readyState||typeof I.readyState==N&&(I.getElementsByTagName("body")[0]||I.body))&&t(),F||(typeof I.addEventListener!=N&&I.addEventListener("DOMContentLoaded",t,!1),Q.ie&&Q.win&&(I.attachEvent(P,function(){"complete"==I.readyState&&(I.detachEvent(P,arguments.callee),t())}),D==top&&!function(){if(!F){try{I.documentElement.doScroll("left")}catch(e){return void setTimeout(arguments.callee,0)}t()}}()),Q.wk&&!function(){return F?void 0:/loaded|complete/.test(I.readyState)?void t():void setTimeout(arguments.callee,0)}(),i(t)))})(),function(){Q.ie&&Q.win&&window.attachEvent("onunload",function(){for(var t=H.length,e=0;t>e;e++)H[e][0].detachEvent(H[e][1],H[e][2]);for(var i=K.length,n=0;i>n;n++)p(K[n]);for(var a in Q)Q[a]=null;Q=null;for(var o in swfobject)swfobject[o]=null;swfobject=null})}();return{registerObject:function(t,e,i,n){if(Q.w3&&t&&e){var a={};a.id=t,a.swfVersion=e,a.expressInstall=i,a.callbackFn=n,G[G.length]=a,b(t,!1)}else n&&n({success:!1,id:t})},getObjectById:function(t){return Q.w3?s(t):void 0},embedSWF:function(t,i,n,a,o,s,c,u,h,p){var f={success:!1,id:i};Q.w3&&!(Q.wk&&Q.wk<312)&&t&&i&&n&&a&&o?(b(i,!1),e(function(){n+="",a+="";var e={};if(h&&typeof h===x)for(var g in h)e[g]=h[g];e.data=t,e.width=n,e.height=a;var v={};if(u&&typeof u===x)for(var m in u)v[m]=u[m];if(c&&typeof c===x)for(var w in c)typeof v.flashvars!=N?v.flashvars+="&"+w+"="+c[w]:v.flashvars=w+"="+c[w];if(y(o)){var C=d(e,v,i);e.id==i&&b(i,!0),f.success=!0,f.ref=C}else{if(s&&r())return e.data=s,void l(e,v,i,p);b(i,!0)}p&&p(f)})):p&&p(f)},switchOffAutoHideShow:function(){W=!1},ua:Q,getFlashPlayerVersion:function(){return{major:Q.pv[0],minor:Q.pv[1],release:Q.pv[2]}},hasFlashPlayerVersion:y,createSWF:function(t,e,i){return Q.w3?d(t,e,i):void 0},showExpressInstall:function(t,e,i,n){Q.w3&&r()&&l(t,e,i,n)},removeSWF:function(t){Q.w3&&p(t)},createCSS:function(t,e,i,n){Q.w3&&w(t,e,i,n)},addDomLoadEvent:e,addLoadEvent:i,getQueryParamValue:function(t){var e=I.location.search||I.location.hash;if(e){if(/\?/.test(e)&&(e=e.split("?")[1]),null==t)return C(e);for(var i=e.split("&"),n=0;n<i.length;n++)if(i[n].substring(0,i[n].indexOf("="))==t)return C(i[n].substring(i[n].indexOf("=")+1))}return""},expressInstallCallback:function(){if(B){var t=g(A);t&&k&&(t.parentNode.replaceChild(k,t),S&&(b(S,!0),Q.ie&&Q.win&&(k.style.display="block")),_&&_(O)),B=!1}}}}();!function(t){t.NOMENSA=t.NOMENSA||{};var e,i;t.NOMENSA.uaMatch=function(t){t=t.toLowerCase();var e=/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}},e=t.NOMENSA.uaMatch(t.navigator.userAgent),i={},e.browser&&(i[e.browser]=!0,i.version=e.version),t.NOMENSA.browser=i}(window),window.NOMENSA=window.NOMENSA||{},window.NOMENSA.player=window.NOMENSA.player||{},window.NOMENSA.player.YoutubePlayer=function(t){this.config=t,this.config.playerVars={controls:0,showinfo:0,origin:window.location.protocol+"//"+window.location.hostname,rel:0}},window.NOMENSA.player.YoutubePlayer.apiLoaded=!1,window.NOMENSA.player.YoutubePlayer.prototype={getYTOptions:function(){var t=this,e={height:this.config.flashHeight,width:this.config.flashWidth,videoId:this.config.media,events:{onReady:function(e){t.$html.find("iframe").attr({id:t.config.id,role:"presentation"}),t.onPlayerReady(e)},onStateChange:function(e){t.onPlayerStateChange(e.data)}}};return e.playerVars=this.config.playerVars,this.config.repeat&&(e.playerVars.playlist=this.config.media),e},init:function(){return"undefined"!=typeof window.postMessage?function(t){var e=document.createElement("script"),i=document.getElementsByTagName("script")[0];this.$html=this.assembleHTML(),this.config.captions&&this.getCaptions(),t.html(this.$html),window.NOMENSA.player.PlayerDaemon.addPlayer(this),window.NOMENSA.player.YoutubePlayer.apiLoaded?this.player=YT.Player("player-"+player.config.id,getOptions(player)):"undefined"==typeof window.onYouTubeIframeAPIReady&&(window.onYouTubeIframeAPIReady=function(){window.NOMENSA.player.PlayerDaemon.map(function(t){"undefined"!=typeof t.getYTOptions&&(t.player=new YT.Player("player-"+t.config.id,t.getYTOptions()))}),window.NOMENSA.player.YoutubePlayer.apiLoaded=!0},e.src="//www.youtube.com/iframe_api",i.parentNode.insertBefore(e,i))}:function(t){var e=this;this.$html=this.assembleHTML(),this.config.captions&&this.getCaptions(),t.html(this.$html),window.NOMENSA.player.PlayerDaemon.addPlayer(this),window.NOMENSA.player.stateHandlers[this.config.id]=function(t){var i=window.NOMENSA.player.PlayerDaemon.getPlayer(e.config.id);i.onPlayerStateChange(t)},window.onYouTubePlayerReady=function(t){var i=window.NOMENSA.player.PlayerDaemon.getPlayer(t),n=document.getElementById(i.config.id);i.player=n,i.cue(),i.getPlayer().addEventListener("onStateChange","window.NOMENSA.player.stateHandlers."+e.config.id),i.onPlayerReady()}}}(),state:{ended:0,playing:1,paused:2,unstarted:-1},onPlayerReady:function(){var t,e=[];return function(i){var n=e.length;if("function"==typeof i)e.push(i);else{if(0===n)return!1;for(t=0;n>t;t++)e[t].apply(this,arguments)}}}(),onPlayerStateChange:function(t){1==t?(this.play(),this.config.buttons.toggle&&this.$html.find(".play").removeClass("play").addClass("pause").text("Pause")):this.config.repeat&&0==t&&this.play()},getFlashVars:function(){var t={controlbar:"none",file:this.config.media};return""!=this.config.image&&(t.image=this.config.image),this.config.repeat&&(t.repeat=this.config.repeat),t},getFlashParams:function(){return{allowScriptAccess:"always",wmode:"transparent"}},generateFlashPlayer:function(t){var e=this,i=this.getFlashVars(),n=this.getFlashParams(),a={id:this.config.id,name:this.config.id},o=$("<"+this.config.flashContainer+" />").attr("id","player-"+this.config.id).addClass("flashReplace").html('This content requires Macromedia Flash Player. You can <a href="http://get.adobe.com/flashplayer/">install or upgrade the Adobe Flash Player here</a>.'),s=$("<span />").addClass("video"),r=this.getURL();return setTimeout(function(){swfobject.embedSWF(r,o.attr("id"),e.config.flashWidth,e.config.flashHeight,"9.0.115",null,i,n,a,e.config.swfCallback),window.NOMENSA.browser.mozilla&&parseInt(window.NOMENSA.browser.version,10)>=2&&e.$html.find("object").attr("tabindex","-1")},0),t.append(s.append(o)),t},generateVideoPlayer:function(t){if("undefined"==typeof window.postMessage)return this.generateFlashPlayer(t);var e=$("<"+this.config.flashContainer+" />").attr("id","player-"+this.config.id),i=$("<span />").addClass("video");return t.append(i.append(e)),t},getPlayer:function(){return this.player},is_html5:!1,play:function(){this.player.playVideo(),this.setSliderTimeout(),this.config.captionsOn&&this.captions&&this.setCaptionTimeout()},pause:function(){this.player.pauseVideo(),this.clearSliderTimeout(),this.config.captionsOn&&this.captions&&this.clearCaptionTimeout()},ffwd:function(){var t=this.getCurrentTime()+this.config.playerSkip,e=this.getDuration();t>e&&(t=e),this.seek(t)},rewd:function(){var t=this.getCurrentTime()-this.config.playerSkip;0>t&&(t=0),this.seek(t)},mute:function(){var t=this.$html.find("button.mute");this.player.isMuted()?(this.player.unMute(),t.hasClass("muted")&&t.removeClass("muted")):(this.player.mute(),t.addClass("muted"))},volup:function(){var t=this.player.getVolume();t>=100?t=100:t+=this.config.volumeStep,this.player.setVolume(t),this.updateVolume(t)},voldwn:function(){var t=this.player.getVolume();0>=t?t=0:t-=this.config.volumeStep,this.player.setVolume(t),this.updateVolume(t)},getDuration:function(){return this.player.getDuration()},getCurrentTime:function(){return this.player.getCurrentTime()},getBytesLoaded:function(){return this.player.getVideoBytesLoaded()},getBytesTotal:function(){return this.player.getVideoBytesTotal()},seek:function(t){this.player.seekTo(t,!0),this.config.captionsOn&&this.captions&&(this.$html.find(".caption").remove(),this.clearCaptionTimeout(),this.setCaptionTimeout(),this.getPreviousCaption())},cue:function(){this.player.cueVideoById(this.config.media)},toggleCaptions:function(){var t=this,e=this.$html.find(".captions");e.hasClass("captions-off")?(e.removeClass("captions-off").addClass("captions-on"),t.getPreviousCaption(),t.setCaptionTimeout(),t.config.captionsOn=!0):(e.removeClass("captions-on").addClass("captions-off"),t.clearCaptionTimeout(),t.$html.find(".caption").remove(),t.config.captionsOn=!1)}},window.NOMENSA=window.NOMENSA||{},window.NOMENSA.player=window.NOMENSA.player||{},window.NOMENSA.player.MediaplayerDecorator=function(t){var e=t;this.config=e.config,this.player=e.player,this.state=e.state;for(var i in e)"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(this,arguments)}}(i))},window.NOMENSA.player.MediaplayerDecorator.prototype.generatePlayerContainer=function(){var t=$("<"+this.config.playerContainer+" />").css(this.config.playerStyles).addClass("player-container");return window.NOMENSA.browser.msie&&t.addClass("player-container-ie player-container-ie-"+window.NOMENSA.browser.version.substring(0,1)),t},window.NOMENSA.player.MediaplayerDecorator.prototype.assembleHTML=function(){var t=this.generatePlayerContainer(),e=this.generateVideoPlayer(t),i=e.append(this.getControls());return i},window.NOMENSA.player.MediaplayerDecorator.prototype.getURL=function(){return[this.config.url,this.config.id].join("")},window.NOMENSA.player.MediaplayerDecorator.prototype.createButton=function(t,e){var i=[t,this.config.id].join("-"),n=$("<button />").append(e).addClass(t).attr({title:t,id:i}).addClass("ui-corner-all ui-state-default").hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")}).click(function(t){t.preventDefault()});return n},window.NOMENSA.player.MediaplayerDecorator.prototype.getFuncControls=function(){var t=this,e=$("<div>");e[0].className="player-controls";var i=[];if(t.config.buttons.toggle){var n=t.createButton("play","Play").attr({"aria-live":"assertive"}).click(function(){$(this).hasClass("play")?($(this).removeClass("play").addClass("pause").attr({title:"Pause",
  id:"pause-"+t.config.id}).text("Pause"),t.play()):($(this).removeClass("pause").addClass("play").attr({title:"Play",id:"play-"+t.config.id}).text("Play"),t.pause())});i.push(n)}else{var a=t.createButton("play","Play").click(function(){t.play()}),o=t.createButton("pause","Pause").click(function(){t.pause()});i.push(a),i.push(o)}if(t.config.buttons.rewind){var s=t.createButton("rewind","Rewind").click(function(){t.rewd()});i.push(s)}if(t.config.buttons.forward){var r=t.createButton("forward","Forward").click(function(){t.ffwd()});i.push(r)}if(t.config.captions){var l=t.createButton("captions","Captions").click(function(){t.toggleCaptions()}),c=1==t.config.captionsOn?"captions-on":"captions-off";l.addClass(c),i.push(l)}for(var u=0;u<i.length;u+=1)e[0].appendChild(i[u][0]);return e},window.NOMENSA.player.MediaplayerDecorator.prototype.getVolControls=function(){for(var t=this,e=$("<div>").addClass("volume-controls"),i=t.createButton("mute","Mute").click(function(){t.mute()}),n=t.createButton("vol-up",'+<span class="ui-helper-hidden-accessible"> Volume Up</span>').click(function(){t.volup()}),a=t.createButton("vol-down",'-<span class="ui-helper-hidden-accessible"> Volume Down</span>').click(function(){t.voldwn()}),o=$("<span />").attr({id:"vol-"+t.config.id,"class":"vol-display"}).text("100%"),s=[i,a,n,o],r=0;r<s.length;r+=1)e[0].appendChild(s[r][0]);return e},window.NOMENSA.player.MediaplayerDecorator.prototype.getSliderBar=function(){for(var t=$("<span />").addClass("ui-helper-hidden-accessible").html("<p>The timeline slider below uses WAI ARIA. Please use the documentation for your screen reader to find out more.</p>"),e=$("<span />").addClass("current-time").attr({id:"current-"+this.config.id}).text("00:00:00"),i=this.getSlider(),n=$("<span />").addClass("duration-time").attr({id:"duration-"+this.config.id}).text("00:00:00"),a=$("<div />").addClass("timer-bar").append(t),o=[e,i,n],s=0;s<o.length;s+=1)a[0].appendChild(o[s][0]);return a},window.NOMENSA.player.MediaplayerDecorator.prototype.getSlider=function(){var t=this,e=$("<span />").attr("id","slider-"+this.config.id).slider({orientation:"horizontal",change:function(e,i){var n=i.value,a=n/100*t.getDuration();t.seek(a)}});e.find("a.ui-slider-handle").attr({role:"slider","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0","aria-valuetext":"0 percent",title:"Slider Control"});var i=$("<span />").addClass("progress-bar").attr({id:"progress-bar-"+this.config.id,tabindex:"-1"}).addClass("ui-progressbar-value ui-widget-header ui-corner-left").css({width:"0%",height:"95%"}),n=$("<span />").attr({id:"loaded-bar-"+this.config.id,tabindex:"-1"}).addClass("loaded-bar ui-progressbar-value ui-widget-header ui-corner-left").css({height:"95%",width:"0%"});return e.append(i,n)},window.NOMENSA.player.MediaplayerDecorator.prototype.setSliderTimeout=function(){var t=this;void 0==t.sliderInterval&&(t.sliderInterval=setInterval(function(){t.updateSlider()},t.config.sliderTimeout))},window.NOMENSA.player.MediaplayerDecorator.prototype.clearSliderTimeout=function(){var t=this;void 0!=t.sliderInterval&&(t.sliderInterval=clearInterval(t.sliderInterval))},window.NOMENSA.player.MediaplayerDecorator.prototype.updateSlider=function(){var t="undefined"!=typeof this.duration?this.duration:this.getDuration(),e="boolean"==typeof this.duration_found?this.duration_found:!1,i=this.getCurrentTime(),n=0;t>0?(n=i/t*100,n=parseInt(n,10)):t=0,e||($("#duration-"+this.config.id).html(this.formatTime(parseInt(t,10))),this.duration_found=!0),$("#slider-"+this.config.id).find("a.ui-slider-handle").attr({"aria-valuenow":n,"aria-valuetext":n.toString()+" percent"}).css("left",n.toString()+"%"),$("#progress-bar-"+this.config.id).attr({"aria-valuenow":n,"aria-valuetext":n.toString()+" percent"}).css("width",n.toString()+"%"),this.updateLoaderBar(),this.updateTime(i)},window.NOMENSA.player.MediaplayerDecorator.prototype.updateLoaderBar=function(){var t=this.getBytesLoaded()/this.getBytesTotal()*100;t=parseInt(t,10),isFinite(t)||(t=0),$("#loaded-bar-"+this.config.id).attr({"aria-valuetext":t.toString()+" percent","aria-valuenow":t}).css("width",t.toString()+"%")},window.NOMENSA.player.MediaplayerDecorator.prototype.formatTime=function(t){var e=0,i=0,n=0;t>=60?(i=parseInt(t/60,10),n=t-60*i,i>=60&&(e=parseInt(i/60,10),i-=parseInt(60*e,10))):n=t;for(var a=[e,i,n],o=0;o<a.length;o+=1)a[o]=a[o]<10?"0"+a[o].toString():a[o].toString();return a.join(":")},window.NOMENSA.player.MediaplayerDecorator.prototype.updateTime=function(t){var e=this.formatTime(parseInt(t,10));this.$html.find("#current-"+this.config.id).html(e)},window.NOMENSA.player.MediaplayerDecorator.prototype.getControls=function(){var t=$("<span />").addClass("ui-corner-bottom").addClass("control-bar"),e=$("<a />").attr("href","http://www.nomensa.com?ref=logo").html("Accessible Media Player by Nomensa").addClass("logo");t.append(e);for(var i=this.getFuncControls(),n=this.getVolControls(),a=this.getSliderBar(),o=[i,n,a],s=0;s<o.length;s+=1)t[0].appendChild(o[s][0]);return t},window.NOMENSA.player.MediaplayerDecorator.prototype.updateVolume=function(t){$("#vol-"+this.config.id).text(t.toString()+"%");var e=this.$html.find("button.mute");0==t?e.addClass("muted"):e.hasClass("muted")&&e.removeClass("muted")},window.NOMENSA.player.MediaplayerDecorator.prototype.getCaptions=function(){var t=this;if(t.config.captions){$.ajax({url:t.config.captions,success:function(e){$(e).find("p").length>0&&(t.captions=$(e).find("p"))}})}},window.NOMENSA.player.MediaplayerDecorator.prototype.toggleCaptions=function(){var t=this,e=this.$html.find(".captions");e.hasClass("captions-off")?(e.removeClass("captions-off").addClass("captions-on"),t.getPreviousCaption(),t.setCaptionTimeout(),t.config.captionsOn=!0):(e.removeClass("captions-on").addClass("captions-off"),t.clearCaptionTimeout(),t.$html.find(".caption").remove(),t.config.captionsOn=!1)},window.NOMENSA.player.MediaplayerDecorator.prototype.syncCaptions=function(){var t;if(this.captions){var e=this.getCurrentTime();e=this.formatTime(parseInt(e,10)),t=this.captions.filter('[begin="'+e+'"]'),1==t.length&&this.insertCaption(t)}},window.NOMENSA.player.MediaplayerDecorator.prototype.insertCaption=function(t){if(1==this.$html.find(".caption").length)this.$html.find(".caption").text(t.text());else{var e=$("<div>").text(t.text());e[0].className="caption",this.$html.find(".video").prepend(e)}},window.NOMENSA.player.MediaplayerDecorator.prototype.getPreviousCaption=function(t){var e;void 0==t&&(t=this.getCurrentTime());var i=this.formatTime(parseInt(t,10));if(this.captions){for(e=this.captions.filter('[begin="'+i+'"]');1!=e.length&&t>0;)t--,i=this.formatTime(parseInt(t,10)),e=this.captions.filter('[begin="'+i+'"]');1==e.length&&this.insertCaption(e)}},window.NOMENSA.player.MediaplayerDecorator.prototype.destroyPlayerInstance=function(){return!1},window.NOMENSA.player.MediaplayerDecorator.prototype.destroy=function(){this.clearSliderTimeout(),this.clearCaptionTimeout(),this.destroyPlayerInstance(),this.$html.remove()},window.NOMENSA.player.MediaplayerDecorator.prototype.setCaptionTimeout=function(){var t=this;void 0==t.captionInterval&&(t.captionInterval=setInterval(function(){t.syncCaptions()},500))},window.NOMENSA.player.MediaplayerDecorator.prototype.clearCaptionTimeout=function(){void 0!=this.captionInterval&&(this.captionInterval=clearInterval(this.captionInterval))},window.NOMENSA=window.NOMENSA||{},window.NOMENSA.player=window.NOMENSA.player||{},jQuery(function(t){t(window).resize(function(){t(".player-container").each(function(){t(this).width()>580?t(this).addClass("player-wide"):t(this).removeClass("player-wide")})})}),"undefined"==typeof window.postMessage&&(window.NOMENSA.player.stateHandlers={}),window.NOMENSA.player.PlayerManager=function(){var t={};this.getPlayer=function(e){return void 0!=t[e]?t[e]:null},this.addPlayer=function(e){return t[e.config.id]=e,!0},this.removePlayer=function(e){void 0!=t[e]&&(t[e].destroy(),delete t[e])},this.map=function(e){var i;for(i in t)e(t[i])}},window.NOMENSA.player.PlayerDaemon=new window.NOMENSA.player.PlayerManager;var html5_methods={play:function(){this.player.play(),this.setSliderTimeout(),this.config.captionsOn&&this.captions&&this.setCaptionTimeout()},pause:function(){this.player.pause(),this.clearSliderTimeout(),this.config.captionsOn&&this.captions&&this.clearCaptionTimeout()},ffwd:function(){var t=this.getCurrentTime()+this.config.playerSkip;this.seek(t)},rewd:function(){var t=this.getCurrentTime()-this.config.playerSkip;0>t&&(t=0),this.seek(t)},mute:function(){var t=this.$html.find("button.mute");this.player.muted?(this.player.muted=!1,t.hasClass("muted")&&t.removeClass("muted")):(this.player.muted=!0,t.addClass("muted"))},volup:function(){var t=100*this.player.volume;t<100-this.config.volumeStep?t+=this.config.volumeStep:t=100,this.player.volume=t/100,this.updateVolume(Math.round(t))},voldwn:function(){var t=100*this.player.volume;t>this.config.volumeStep?t-=this.config.volumeStep:t=0,this.player.volume=t/100,this.updateVolume(Math.round(t))},getDuration:function(){return this.player.duration},getCurrentTime:function(){return this.player.currentTime},getBytesLoaded:function(){return this.player.buffered.end(0)},getBytesTotal:function(){return this.player.duration},seek:function(t){this.player.currentTime=t},cue:function(){}};!function(t){t.fn.player=function(e,i){function n(e){this.config=o,t.extend(!0,this,u,i),this.is_html5=!1;var n=s(this);n&&this.config.useHtml5?(this.config.media=n.src,this.is_html5=!0,this.$html=this.assembleHTML5(n.container,n.mimetype),t.extend(this,html5_methods)):(this.config.media instanceof Array&&"undefined"!=typeof this.config.media.push&&(this.config.media=this.config.media[0]),this.$html=this.assembleHTML()),this.config.captions&&this.getCaptions()}var a={id:"media_player",url:window.location.protocol+"//www.youtube.com/apiplayer?enablejsapi=1&version=3&playerapiid=",media:"8LiQ-bLJaM4",repeat:!1,captions:null,captionsOn:!0,flashWidth:"100%",flashHeight:"300px",playerStyles:{height:"100%",width:"100%"},sliderTimeout:350,flashContainer:"span",playerContainer:"span",image:"",playerSkip:10,volumeStep:10,buttons:{forward:!0,rewind:!0,toggle:!0},logoURL:"http://www.nomensa.com?ref=logo",useHtml5:!0,swfCallback:null},o=t.extend(!0,{},a,e),s=function(t){var e,i,n,a,o,s,r=t.config.media;if(a=function(t){return e=document.createElement(t.container),void 0!=e.canPlayType&&(n=e.canPlayType(t.mimetype),"maybe"==n.toLowerCase()||"probably"==n.toLowerCase())?!0:void 0},"string"==typeof r&&(i=l(r),a(i)))return i.src=r,i;if(r instanceof Array&&"undefined"!=typeof r.push)for(o=0,s=r.length;s>o;o++)if(i=l(r[o]),a(i))return i.src=r[o],i;return!1},r=function(t){var e="",i="video";switch(t){case"mp4":e='video/mp4; codecs="avc1.42E01E, mp4a.40.2"';break;case"m4v":e='video/mp4; codecs="avc1.42E01E, mp4a.40.2"';break;case"ogg":e='video/ogg; codecs="theora, vorbis"';break;case"ogv":e='video/ogg; codecs="theora, vorbis"';break;case"webm":e='video/webm; codecs="vp8, vorbis"';break;case"mp3":e="audio/mpeg",i="audio"}return{mimetype:e,container:i}},l=function(t){var e=t.lastIndexOf(".");if(-1!=e){var i=t.substring(e+1),n=r(i);return n}return null},c=function(){return window.NOMENSA.browser.mozilla&&parseInt(window.NOMENSA.browser.version,10)>=2?!0:!1},u={generatePlayerContainer:function(){var e=t("<"+this.config.playerContainer+" />").css(this.config.playerStyles).addClass("player-container");return window.NOMENSA.browser.msie&&e.addClass("player-container-ie player-container-ie-"+window.NOMENSA.browser.version.substring(0,1)),e},getFlashVars:function(){var t={controlbar:"none",file:this.config.media};return""!=this.config.image&&(t.image=this.config.image),this.config.repeat&&(t.repeat=this.config.repeat),t},getFlashParams:function(){return{allowScriptAccess:"always",wmode:"transparent"}},getURL:function(){return[this.config.url,this.config.id].join("")},generateFlashPlayer:function(e){var i=this,n=this.getFlashVars(),a=this.getFlashParams(),o={id:this.config.id,name:this.config.id},s=t("<"+this.config.flashContainer+" />").attr("id","player-"+this.config.id).addClass("flashReplace").html('This content requires Macromedia Flash Player. You can <a href="http://get.adobe.com/flashplayer/">install or upgrade the Adobe Flash Player here</a>.'),r=t("<span />").addClass("video"),l=this.getURL();return setTimeout(function(){swfobject.embedSWF(l,s.attr("id"),i.config.flashWidth,i.config.flashHeight,"9.0.115",null,n,a,o,i.config.swfCallback),c()&&i.$html.find("object").attr("tabindex","-1")},0),e.append(r.append(s)),e},generateHTML5Player:function(e,i,n){var a=t("<span />");a[0].className="video";var o=t("<"+i+" />").attr({id:this.config.id,src:this.config.media,type:n}).css({width:"100%",height:"50%"});return""!=t.trim(this.config.image)&&o.attr({poster:t.trim(this.config.image)}),e.append(a.append(o))},createButton:function(e,i){var n=[e,this.config.id].join("-"),a=t("<button />").append(i).addClass(e).attr({title:e,id:n}).addClass("ui-corner-all ui-state-default").hover(function(){t(this).addClass("ui-state-hover")},function(){t(this).removeClass("ui-state-hover")}).focus(function(){t(this).addClass("ui-state-focus")}).blur(function(){t(this).removeClass("ui-state-focus")}).click(function(t){t.preventDefault()});return a},getFuncControls:function(){var e=this,i=t("<div>");i[0].className="player-controls";var n=[];if(e.config.buttons.toggle){var a=e.createButton("play","Play").attr({"aria-live":"assertive"}).click(function(){t(this).hasClass("play")?(t(this).removeClass("play").addClass("pause").attr({title:"Pause",id:"pause-"+e.config.id}).text("Pause"),e.play()):(t(this).removeClass("pause").addClass("play").attr({title:"Play",id:"play-"+e.config.id}).text("Play"),e.pause())});n.push(a)}else{var o=e.createButton("play","Play").click(function(){e.play()}),s=e.createButton("pause","Pause").click(function(){e.pause()});n.push(o),n.push(s)}if(e.config.buttons.rewind){var r=e.createButton("rewind","Rewind").click(function(){e.rewd()});n.push(r)}if(e.config.buttons.forward){var l=e.createButton("forward","Forward").click(function(){e.ffwd()});n.push(l)}if(e.config.captions){var c=e.createButton("captions","Captions").click(function(){e.toggleCaptions()}),u=1==e.config.captionsOn?"captions-on":"captions-off";c.addClass(u),n.push(c)}var d;for(d=0;d<n.length;d+=1)i[0].appendChild(n[d][0]);return i},getVolControls:function(){var e,i=this,n=t("<div>").addClass("volume-controls"),a=i.createButton("mute","Mute").click(function(){i.mute()}),o=i.createButton("vol-up",'+<span class="ui-helper-hidden-accessible"> Volume Up</span>').click(function(){i.volup()}),s=i.createButton("vol-down",'-<span class="ui-helper-hidden-accessible"> Volume Down</span>').click(function(){i.voldwn()}),r=t("<span />").attr({id:"vol-"+i.config.id,"class":"vol-display"}).text("100%"),l=[a,s,o,r];for(e=0;e<l.length;e+=1)n[0].appendChild(l[e][0]);return n},getSliderBar:function(){var e,i=t("<span />").addClass("ui-helper-hidden-accessible").html("<p>The timeline slider below uses WAI ARIA. Please use the documentation for your screen reader to find out more.</p>"),n=t("<span />").addClass("current-time").attr({id:"current-"+this.config.id}).text("00:00:00"),a=this.getSlider(),o=t("<span />").addClass("duration-time").attr({id:"duration-"+this.config.id}).text("00:00:00"),s=t("<div />").addClass("timer-bar").append(i),r=[n,a,o];for(e=0;e<r.length;e+=1)s[0].appendChild(r[e][0]);return s},getSlider:function(){var e=this,i=t("<span />").attr("id","slider-"+this.config.id).slider({orientation:"horizontal",change:function(t,i){var n=i.value,a=n/100*e.getDuration();e.seek(a)}});i.find("a.ui-slider-handle").attr({role:"slider","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0","aria-valuetext":"0 percent",title:"Slider Control"});var n=t("<span />").addClass("progress-bar").attr({id:"progress-bar-"+this.config.id,tabindex:"-1"}).addClass("ui-progressbar-value ui-widget-header ui-corner-left").css({width:"0%",height:"95%"}),a=t("<span />").attr({id:"loaded-bar-"+this.config.id,tabindex:"-1"}).addClass("loaded-bar ui-progressbar-value ui-widget-header ui-corner-left").css({height:"95%",width:"0%"});return i.append(n,a)},setSliderTimeout:function(){var t=this;void 0==t.sliderInterval&&(t.sliderInterval=setInterval(function(){t.updateSlider()},t.config.sliderTimeout))},clearSliderTimeout:function(){var t=this;void 0!=t.sliderInterval&&(t.sliderInterval=clearInterval(t.sliderInterval))},updateSlider:function(){var e="undefined"!=typeof this.duration?this.duration:this.getDuration(),i="boolean"==typeof this.duration_found?this.duration_found:!1,n=this.getCurrentTime(),a=0;e>0?(a=n/e*100,a=parseInt(a,10)):e=0,i||(t("#duration-"+this.config.id).html(this.formatTime(parseInt(e,10))),this.duration_found=!0),t("#slider-"+this.config.id).find("a.ui-slider-handle").attr({"aria-valuenow":a,"aria-valuetext":a.toString()+" percent"}).css("left",a.toString()+"%"),t("#progress-bar-"+this.config.id).attr({"aria-valuenow":a,"aria-valuetext":a.toString()+" percent"}).css("width",a.toString()+"%"),this.updateLoaderBar(),this.updateTime(n)},updateLoaderBar:function(){var e=this.getBytesLoaded()/this.getBytesTotal()*100;e=parseInt(e,10),isFinite(e)||(e=0),t("#loaded-bar-"+this.config.id).attr({"aria-valuetext":e.toString()+" percent","aria-valuenow":e}).css("width",e.toString()+"%")},formatTime:function(t){var e=0,i=0,n=0;t>=60?(i=parseInt(t/60,10),n=t-60*i,i>=60&&(e=parseInt(i/60,10),i-=parseInt(60*e,10))):n=t;var a,o=[e,i,n];for(a=0;a<o.length;a+=1)o[a]=o[a]<10?"0"+o[a].toString():o[a].toString();return o.join(":")},updateTime:function(t){var e=this.formatTime(parseInt(t,10));this.$html.find("#current-"+this.config.id).html(e)},getControls:function(){var e=t("<span />").addClass("ui-corner-bottom").addClass("control-bar"),i=t("<a />").attr("href","http://www.nomensa.com?ref=logo").html("Accessible Media Player by Nomensa").addClass("logo");e.append(i);var n,a=this.getFuncControls(),o=this.getVolControls(),s=this.getSliderBar(),r=[a,o,s];for(n=0;n<r.length;n+=1)e[0].appendChild(r[n][0]);return e},assembleHTML:function(){var t=this.generatePlayerContainer(),e=this.generateFlashPlayer(t),i=e.append(this.getControls());return i},assembleHTML5:function(t,e){var i=this.generatePlayerContainer(),n=this.generateHTML5Player(i,t,e),a=n.append(this.getControls());return a},updateVolume:function(e){t("#vol-"+this.config.id).text(e.toString()+"%");var i=this.$html.find("button.mute");0==e?i.addClass("muted"):i.hasClass("muted")&&i.removeClass("muted")},getCaptions:function(){var e=this;if(e.config.captions){t.ajax({url:e.config.captions,success:function(i){t(i).find("p").length>0&&(e.captions=t(i).find("p"))}})}},syncCaptions:function(){var t;if(this.captions){var e=this.getCurrentTime();e=this.formatTime(parseInt(e,10)),t=this.captions.filter('[begin="'+e+'"]'),1==t.length&&this.insertCaption(t)}},insertCaption:function(e){if(1==this.$html.find(".caption").length)this.$html.find(".caption").text(e.text());else{var i=t("<div>").text(e.text());i[0].className="caption",this.$html.find(".video").prepend(i)}},getPreviousCaption:function(t){var e;void 0==t&&(t=this.getCurrentTime());var i=this.formatTime(parseInt(t,10));if(this.captions){for(e=this.captions.filter('[begin="'+i+'"]');1!=e.length&&t>0;)t--,i=this.formatTime(parseInt(t,10)),e=this.captions.filter('[begin="'+i+'"]');1==e.length&&this.insertCaption(e)}},destroyPlayerInstance:function(){return!1},destroy:function(){this.clearSliderTimeout(),this.clearCaptionTimeout(),this.destroyPlayerInstance(),this.$html.remove()},setCaptionTimeout:function(){var t=this;void 0==t.captionInterval&&(t.captionInterval=setInterval(function(){t.syncCaptions()},500))},clearCaptionTimeout:function(){void 0!=this.captionInterval&&(this.captionInterval=clearInterval(this.captionInterval))},play:function(){this.player.playVideo(),this.setSliderTimeout(),this.config.captionsOn&&this.captions&&this.setCaptionTimeout()},pause:function(){this.player.pauseVideo(),this.clearSliderTimeout(),this.config.captionsOn&&this.captions&&this.clearCaptionTimeout()},ffwd:function(){var t=this.getCurrentTime()+this.config.playerSkip;this.seek(t)},rewd:function(){var t=this.getCurrentTime()-this.config.playerSkip;0>t&&(t=0),this.seek(t)},mute:function(){var t=this.$html.find("button.mute");this.player.isMuted()?(this.player.unMute(),t.hasClass("muted")&&t.removeClass("muted")):(this.player.mute(),t.addClass("muted"))},volup:function(){var t=this.player.getVolume();t<100-this.config.volumeStep?t+=this.config.volumeStep:t=100,this.player.setVolume(t),this.updateVolume(t)},voldwn:function(){var t=this.player.getVolume();t>this.config.volumeStep?t-=this.config.volumeStep:t=0,this.player.setVolume(t),this.updateVolume(t)},getDuration:function(){return this.player.getDuration()},getCurrentTime:function(){return this.player.getCurrentTime()},getBytesLoaded:function(){return this.player.getVideoBytesLoaded()},getBytesTotal:function(){return this.player.getVideoBytesTotal()},seek:function(t){this.player.seekTo(t),this.config.captionsOn&&this.captions&&(this.$html.find(".caption").remove(),this.clearCaptionTimeout(),this.setCaptionTimeout(),this.getPreviousCaption())},cue:function(){this.player.cueVideoById(this.config.media)},toggleCaptions:function(){var t=this,e=this.$html.find(".captions");e.hasClass("captions-off")?(e.removeClass("captions-off").addClass("captions-on"),t.getPreviousCaption(),t.setCaptionTimeout(),t.config.captionsOn=!0):(e.removeClass("captions-on").addClass("captions-off"),t.clearCaptionTimeout(),t.$html.find(".caption").remove(),t.config.captionsOn=!1)}};return this.each(function(e){var i,a,s=t(this),r=function(t){t.$html.width()>580&&t.$html.addClass("player-wide"),t.is_html5&&(t.player=document.getElementById(t.config.id))};o.url.match(/^(http|https)\:\/\/www\.youtube\.com/)?(i=new window.NOMENSA.player.YoutubePlayer(o),a=new window.NOMENSA.player.MediaplayerDecorator(i),a.onPlayerReady(function(){r(a),this.getPlayer().setLoop(!0)}),a.init(s)):(a=new n(e),s.html(a.$html),r(a),window.NOMENSA.player.PlayerDaemon.addPlayer(a))})}}(jQuery),function(t){"use strict";function e(){function e(){var t=document.location.protocol;return"file:"==t&&(t="https:"),t}function i(t){if(t.indexOf("youtube.com")>-1){var e,i,n,a,o={};if(a=t.split("?"),1===a.length)return;for(a=a[1].split("&"),e=0,i=a.length;i>e;e++)n=a[e].split("="),o[n[0]]=n[1];return o.v}if(t.indexOf("youtu.be")>-1){var a=t.split("/");return a.pop()}}function n(t){return"off"!=t.attr("data-youtube-player")}function a(a){a.find("a[href*='youtube.com'], a[href*='youtu.be']").each(function(a){var o=t(this);if(n(o)){var s=i(o.attr("href"));if("undefined"!=typeof s){var r=t('<span class="media-player" />'),l=o.siblings(".captions");o.parent().replaceWith(r);var c=e();r.player({id:"youtube-"+a,media:s,captions:l.length>0?l.attr("href"):null,url:c+"//www.youtube.com/apiplayer?enablejsapi=1&version=3&playerapiid="})}}})}return{getProtocol:e,enhanceYoutubeVideoLinks:a}}window.GOVUK=window.GOVUK||{},GOVUK.enhanceYoutubeVideoLinks=new e,GOVUK.enhanceYoutubeVideoLinks.enhanceYoutubeVideoLinks(t(".govuk-govspeak"))}(jQuery),function(t){var e=function(){this.init=function(e,i){var n={outOf:65,applyOnInit:!0,toggleText:"Toggle between chart and table",autoOutdent:!1,outdentAll:!1};this.options=t.extend({},n,i);var a=function(){var t,e=3,i=document.createElement("div"),n=i.getElementsByTagName("i");do i.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->";while(10>e&&n[0]);return e>4?e:t}();return this.ENABLED=!(a&&8>a),this.$table=e,this.$graph=t("<div/>").attr("aria-hidden","true"),this.$graph.attr("class",this.$table.attr("class")).addClass("mc-chart"),this.options.stacked=this.$table.hasClass("mc-stacked"),this.options.negative=this.$table.hasClass("mc-negative"),this.options.multiple=!this.options.stacked&&(this.$table.hasClass("mc-multiple")||this.$table.find("tbody tr").first().find("td").length>2),this.options.autoOutdent=this.options.autoOutdent||this.$table.hasClass("mc-auto-outdent"),this.options.outdentAll=this.options.outdentAll||this.$table.hasClass("mc-outdented"),this.options.multiple&&this.$graph.addClass("mc-multiple"),this.options.hasCaption=!!this.$table.find("caption").length,this.ENABLED&&(this.apply(),this.options.applyOnInit||this.toggle()),this}};e.prototype.construct={},e.prototype.construct.thead=function(){var e=t("<div />",{"class":"mc-thead"}),i=t("<div />",{"class":"mc-tr"}),n="";return this.$table.find("th").each(function(e,i){n+='<div class="mc-th">',n+=t(i).html(),n+="</div>"}),i.append(n),e.append(i),e},e.prototype.construct.tbody=function(){var e=t("<div />",{"class":"mc-tbody"});return this.$table.find("tbody tr").each(function(i,n){var a=t("<div />",{"class":"mc-tr"}),o="";t(n).find("td").each(function(e,i){o+='<div class="mc-td">',o+=t(i).html(),o+="</div>"}),a.append(o),e.append(a)}),e},e.prototype.construct.caption=function(){var t=this.$table.find("caption");return t.clone()},e.prototype.construct.toggleLink=function(){var e=this;return t("<a />",{href:"#","class":"mc-toggle-link",text:this.options.toggleText}).on("click",function(t){e.toggle(t)})},e.prototype.constructChart=function(){var t=this.construct.thead.call(this),e=this.construct.tbody.call(this),i=this.construct.toggleLink.call(this);if(this.options.hasCaption){var n=this.construct.caption.call(this);this.$graph.append(n)}this.$table.before(i),this.$graph.append(t),this.$graph.append(e)},e.prototype.apply=function(){this.ENABLED&&(this.constructChart(),this.addClassesToHeader(),this.calculateMaxWidth(),this.applyWidths(),this.insert(),this.$table.addClass("visually-hidden"),this.applyOutdent())},e.prototype.toggle=function(t){this.$graph.toggle(),this.$table.toggleClass("visually-hidden"),t&&t.preventDefault()},e.prototype.utils={isFloat:function(t){return!isNaN(parseFloat(t))},stripValue:function(t){var e=new RegExp("\\,|\xa3|%|[a-z]","gi");return t.replace(e,"")},returnMax:function(t){for(var e=0,i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return e},isNegative:function(t){return 0>t}},e.prototype.addClassesToHeader=function(){var e=this.$graph.find(".mc-th").filter(":not(:first)");this.options.stacked&&(e.last().addClass("mc-stacked-header mc-header-total"),e=e.filter(":not(:last)")),e.addClass("mc-key-header").filter(":not(.mc-stacked-header)").each(function(e,i){t(i).addClass("mc-key-"+(e+1))})},e.prototype.calculateMaxWidth=function(){var e=this,i=[],n=0;this.$graph.find(".mc-tr").each(function(a,o){var s=t(o),r=s.find(".mc-td:not(:first)");if(e.options.stacked){r.last().addClass("mc-stacked-total");r=r.filter(":not(:last)")}s.find(".mc-td:first").addClass("mc-key-cell");var l=0;r.each(function(a,o){var s=t(o).addClass("mc-bar-cell").addClass("mc-bar-"+(a+1)),r=e.utils.stripValue(s.text());if(e.utils.isFloat(r)){var c=parseFloat(r,10),u=Math.abs(c);0===c&&s.addClass("mc-bar-zero"),e.options.negative&&(e.utils.isNegative(c)?(s.addClass("mc-bar-negative"),u>n&&(n=u)):s.addClass("mc-bar-positive")),c=u,e.options.stacked?l+=c:(l=c,i.push(c))}}),e.options.stacked&&i.push(l)});var a={};return a.max=parseFloat(e.utils.returnMax(i),10),a.single=parseFloat(this.options.outOf/a.max,10),this.options.negative&&(a.marginLeft=parseFloat(n,10)*a.single,a.maxNegative=parseFloat(n,10)),a},e.prototype.applyWidths=function(){this.dimensions=this.calculateMaxWidth();var e=this;this.$graph.find(".mc-tr").each(function(i,n){var a=t(n);a.find(".mc-bar-cell:not(.mc-bar-zero)").length;a.find(".mc-bar-cell").each(function(i,n){var a=t(n),o=parseFloat(e.utils.stripValue(a.text()),10),s=o*e.dimensions.single,r=Math.abs(o),l=Math.abs(s);if(e.options.negative)if(a.hasClass("mc-bar-positive"))a.css("margin-left",e.dimensions.marginLeft+"%");else if(r<e.dimensions.maxNegative){var c=(e.dimensions.maxNegative-r)*e.dimensions.single;a.css("margin-left",c+"%")}a.wrapInner("<span />"),a.css("width",l+"%")})})},e.prototype.insert=function(){this.$table.after(this.$graph)},e.prototype.applyOutdent=function(){var e=this;this.$graph.find(".mc-bar-cell");this.$graph.find(".mc-bar-cell").each(function(i,n){var a=t(n),o=parseFloat(e.utils.stripValue(a.text()),10),s=a.children("span"),r=s.width()+10,l=a.width();parseFloat(a[0].style.width,10),a.height();e.options.stacked?r>l&&o>0&&a.addClass("mc-value-overflow"):(0===o&&a.addClass("mc-bar-outdented"),e.options.autoOutdent&&r>l||e.options.outdentAll?(a.addClass("mc-bar-outdented"),s.css({"margin-left":"100%",display:"inline-block"})):a.addClass("mc-bar-indented"))})},t.magnaCharta=function(t,i){return(new e).init(t,i)}}(jQuery),$(govspeakBarcharts),function(t){"use strict";function e(t){this.$optionSelect=t.$el,this.$options=this.$optionSelect.find("input[type='checkbox']"),this.$labels=this.$optionSelect.find("label"),this.$optionsContainer=this.$optionSelect.find(".options-container"),this.$optionList=this.$optionsContainer.children(".js-auto-height-inner"),this.attachCheckedCounter();var e="undefined"==typeof ieVersion||ieVersion>7?!0:!1;e&&(this.$options.on("click",this.updateCheckedCount.bind(this)),this.replaceHeadWithButton(),this.$optionSelect.addClass("js-collapsible"),this.$optionSelect.find(".js-container-head").on("click",this.toggleOptionSelect.bind(this)),this.$optionSelect.on("focus",this.listenForKeys.bind(this)),this.$optionSelect.on("blur",this.stopListeningForKeys.bind(this)),this.$options.on("focus",this.open.bind(this)),1==this.$optionSelect.data("closed-on-load")&&this.close())}window.GOVUK=window.GOVUK||{},e.prototype.replaceHeadWithButton=function(){var e=this.$optionSelect.find(".js-container-head"),i=e.html(),n=t("<button>");n.addClass("js-container-head"),n.attr("type","button"),n.attr("aria-expanded",this.isClosed()),n.attr("aria-controls",this.$optionSelect.find(".options-container").attr("id")),n.html(i),e.replaceWith(n)},e.prototype.attachCheckedCounter=function(){this.$optionSelect.find(".js-container-head").append('<div class="js-selected-counter">'+this.checkedString()+"</div>")},e.prototype.updateCheckedCount=function(){this.$optionSelect.find(".js-selected-counter").text(this.checkedString())},e.prototype.checkedString=function i(){var t=this.$options.filter(":checked").size(),i="";return t>0&&(i=t+" selected"),i},e.prototype.toggleOptionSelect=function(t){this.isClosed()?this.open():this.close(),t.preventDefault()},e.prototype.open=function(){this.isClosed()&&(this.$optionSelect.find(".js-container-head").attr("aria-expanded",!0),this.$optionSelect.removeClass("js-closed"),this.$optionsContainer.prop("style").height||this.setupHeight())},e.prototype.close=function(){this.$optionSelect.addClass("js-closed"),this.$optionSelect.find(".js-container-head").attr("aria-expanded",!1)},e.prototype.isClosed=function(){return this.$optionSelect.hasClass("js-closed")},e.prototype.setContainerHeight=function(t){this.$optionsContainer.css({"max-height":"none",height:t})},e.prototype.isLabelVisible=function(e,i){var n=t(i),a=this.$optionsContainer.height(),o=this.$optionList.offset().top,s=n.offset().top-o;return a>s},e.prototype.getVisibleLabels=function(){return this.$labels.filter(this.isLabelVisible.bind(this))},e.prototype.setupHeight=function(){var t,e,i,n,a,o=this.$optionsContainer.height(),s=this.$optionList.height();return o+50>s?void this.setContainerHeight(s):(t=this.getVisibleLabels().last(),e=t.position().top,i=parseInt(t.css("border-top-width"),10),n=parseInt(t.css("padding-top"),10),a="normal"==t.css("line-height")?parseInt(t.css("font-size"),10):parseInt(t.css("line-height"),10),void this.setContainerHeight(e+i+n+a/2))},e.prototype.listenForKeys=function(){this.$optionSelect.keypress(this.checkForSpecialKeys.bind(this))},e.prototype.checkForSpecialKeys=function(t){13==t.keyCode&&this.toggleOptionSelect()},e.prototype.stopListeningForKeys=function(){this.$optionSelect.unbind("keypress")},GOVUK.OptionSelect=e;t(".govuk-option-select").map(function(){return new GOVUK.OptionSelect({$el:t(this)})})}(jQuery),function(t){var e=t.suchi=t.suchi||{};e.laggards={IE6:/^Mozilla\/4\.0 \(compatible; MSIE 6\.0; Windows NT \d\.\d(.*)\)$/g,IE7:/^Mozilla\/4\.0 \(compatible; MSIE 7\.0; Windows NT \d\.\d(.*)\)$/g,IE8:/^Mozilla\/4\.0 \(compatible; MSIE 8\.0; Windows NT \d\.\d;(.*)? Trident\/4\.0(;)?(.*)\)$/g,IE9:/^Mozilla\/5\.0 \(compatible; MSIE 9\.0; Windows NT \d\.\d(.*); Trident\/5\.0(.*)\)$/g,IE10:/^Mozilla\/5\.0 \(compatible; MSIE 10\.0; Windows NT \d\.\d(.*); Trident\/6\.0(.*)\)$/g,FF36:/^Mozilla\/5\.0 \((Windows|Macintosh); U;(.*)rv\:1\.9\.2.(\d{1,2})\)( Gecko\/(\d{8}))? Firefox\/3\.6(\.\d{1,2})?( \(.+\))?$/g,CR_recent:/^Mozilla\/5\.0 \((Windows NT|Macintosh|X11|(Linux; Android \d\.\d\.\d))(;)?( .*)\) AppleWebKit\/53\d\.\d{1,2} \(KHTML(,)? like Gecko\) Chrome\/(16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33)\.0\.\d{3,4}\.\d{1,3} (Mobile )?Safari\/53\d\.\d{1,2}$/g,
  FF_recent:/^Mozilla\/5\.0 \((Windows NT \d\.\d|Macintosh|Android|X11); (.*)rv\:(9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28)\.0(\.\d{1,2})?\) Gecko\/(\d{8}|(\d{2}\.0)) Firefox\/(9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28)\.0(\.\d{1,2})?$/g,SAF51:/^Mozilla\/5\.0 \((Windows NT \d\.\d|Macintosh)(.*)\) AppleWebKit\/534\.\d{2}(\.\d{1,2})? \(KHTML, like Gecko\) Version\/5\.1\.\d Safari\/534\.\d{2}(\.\d{1,2})?$/g,SAF60:/^Mozilla\/5\.0 \((iPhone|iPad|Macintosh);(.*)\) AppleWebKit\/536\.\d{2}(\.\d{1,2})? \(KHTML like Gecko\) Version\/6\.0(\.\d)? ((Mobile\/\d{2}\w\d{3} )?)Safari\/\d{2,4}\.\d{2}(\.\d{1,2})?$/g,ANDROID_WEBKIT:/^Mozilla\/5\.0 \(Linux;( U;)? Android 4\.(0|1|2|3|4)(\.\d)?; (.*)?\) \w{2}\-\w{2}; (.*)\) AppleWebKit\/5\d{2}.\d{2} \(KHTML like Gecko\) Version\/4\.\d Mobile Safari\/\d{3}\.\d{2}$/g},e.isOld=function(t){if("string"!=typeof t)return!1;for(var e in this.laggards)if(t.match(this.laggards[e]))return!0;return!1}}(this),function(t){"use strict";t.AutoTrackEvent=function(){this.start=function(t){var e={nonInteraction:1},i=t.data("track-category"),n=t.data("track-action"),a=t.data("track-label"),o=t.data("track-value");"string"==typeof a&&(e.label=a),(o||0===o)&&(e.value=o),GOVUK.analytics&&GOVUK.analytics.trackEvent&&GOVUK.analytics.trackEvent(i,n,e)}}}(window.GOVUK.Modules),function(){"use strict";function t(t){this.$el=e(t.el),this._loadOption(t,"name"),this._loadOption(t,"customDimensionIndex",null),this._loadOption(t,"cohorts"),this._loadOption(t,"runImmediately",!0),this._loadOption(t,"defaultWeight",1),this._loadOption(t,"contentExperimentId",null),this.runImmediately&&this.run()}window.GOVUK=window.GOVUK||{};var e=window.$;t.prototype._loadOption=function(t,e,i){if(void 0!==t[e]&&(this[e]=t[e]),void 0===this[e]){if(void 0===i)throw new Error(e+" option is required for a multivariate test");this[e]=i}},t.prototype.run=function(){var t=this.getCohort();t&&(this.setUpContentExperiment(t),this.setCustomVar(t),this.executeCohort(t),this.createDummyEvent(t))},t.prototype.executeCohort=function(t){var e=this.cohorts[t];e.callback&&("string"==typeof e.callback?this[e.callback]():e.callback()),e.html&&(this.$el.html(e.html),this.$el.show())},t.prototype.getCohort=function(){var t=GOVUK.cookie(this.cookieName());return t&&this.cohorts[t]||(t=this.chooseRandomCohort(),GOVUK.cookie(this.cookieName(),t,{days:30})),t},t.prototype.setCustomVar=function(t){this.customDimensionIndex&&GOVUK.analytics.setDimension(this.customDimensionIndex,this.cookieName()+"__"+t)},t.prototype.setUpContentExperiment=function(t){var e=this.contentExperimentId,i=this.cohorts[t].variantId;"undefined"!=typeof e&&"undefined"!=typeof i&&"function"==typeof window.ga&&(window.ga("set","expId",e),window.ga("set","expVar",i))},t.prototype.createDummyEvent=function(t){GOVUK.analytics.trackEvent(this.cookieName(),"run",{nonInteraction:!0})},t.prototype.weightedCohortNames=function(){var t=[],i=this.defaultWeight;return e.each(this.cohorts,function(e,n){var a,o;for(a="undefined"==typeof n.weight?i:n.weight,o=0;a>o;o++)t.push(e)}),t},t.prototype.chooseRandomCohort=function(){var t=this.weightedCohortNames();return t[Math.floor(Math.random()*t.length)]},t.prototype.cookieName=function(){return"multivariatetest_cohort_"+this.name},window.GOVUK.MultivariateTest=t}(),function(){"use strict";window.GOVUK=window.GOVUK||{};var t=function(t,e){this.$el=$(t),this.$extraLinks=this.$el.find("li:not("+e+")"),this.$extraLinks.length>1&&(this.addToggleLink(),this.hideExtraLinks())};t.prototype={toggleText:function(){return this.$extraLinks.length>1?"+"+this.$extraLinks.length+" others":"+"+this.$extraLinks.length+" other"},addToggleLink:function(){this.$toggleLink=$('<a href="#">'+this.toggleText()+"</a>"),this.$toggleLink.click($.proxy(this.toggleLinks,this)),this.$toggleLink.insertAfter(this.$el)},toggleLinks:function(t){t.preventDefault(),this.$toggleLink.remove(),this.showExtraLinks()},hideExtraLinks:function(){this.$extraLinks.addClass("visuallyhidden"),$(window).trigger("govuk.pageSizeChanged")},showExtraLinks:function(){this.$extraLinks.removeClass("visuallyhidden"),$(window).trigger("govuk.pageSizeChanged")}},GOVUK.PrimaryList=t,GOVUK.primaryLinks={init:function(t){$(t).parent().each(function(e,i){new GOVUK.PrimaryList(i,t)})}}}(),function(){"use strict";var t=this,e=t.jQuery;"undefined"==typeof t.GOVUK&&(t.GOVUK={});var i={_hasScrolled:!1,_scrollTimeout:!1,init:function(){var n=e(".js-stick-at-top-when-scrolling");n.length>0&&(i.$els=n,i._scrollTimeout===!1&&(e(t).scroll(i.onScroll),i._scrollTimeout=t.setInterval(i.checkScroll,50)),e(t).resize(i.onResize)),t.GOVUK.stopScrollingAtFooter&&n.each(function(i,n){var a=e(n).find("img");if(a.length>0){var o=new Image;o.onload=function(){t.GOVUK.stopScrollingAtFooter.addEl(e(n),e(n).outerHeight())},o.src=a.attr("src")}else t.GOVUK.stopScrollingAtFooter.addEl(e(n),e(n).outerHeight())})},onScroll:function(){i._hasScrolled=!0},checkScroll:function(){if(i._hasScrolled===!0){i._hasScrolled=!1;var n=e(t).scrollTop();i.$els.each(function(a,o){var s=e(o),r=s.data("scrolled-from");r&&r>n?i.release(s):e(t).width()>768&&n>=s.offset().top&&i.stick(s)})}},stick:function(t){if(!t.hasClass("content-fixed")){t.data("scrolled-from",t.offset().top);var e=Math.max(t.height(),1);t.before('<div class="shim" style="width: '+t.width()+"px; height: "+e+'px">&nbsp;</div>'),t.css("width",t.width()+"px").addClass("content-fixed")}},release:function(t){t.hasClass("content-fixed")&&(t.data("scrolled-from",!1),t.removeClass("content-fixed").css("width",""),t.siblings(".shim").remove())}};t.GOVUK.stickAtTopWhenScrolling=i}.call(this),function(){"use strict";var t=this,e=t.jQuery;"undefined"==typeof t.GOVUK&&(t.GOVUK={});var i={_pollingId:null,_isPolling:!1,_hasScrollEvt:!1,_els:[],addEl:function(n,a){var o;if(n.length){o=parseInt(n.css("top"),10),o=isNaN(o)?0:o,i.updateFooterTop(),e(t).on("govuk.pageSizeChanged",i.updateFooterTop);var s=e("<div></div>");s.insertBefore(n);var r=s.offset().top-s.position().top;s.remove();var l={$fixedEl:n,height:a+o,fixedTop:a+r,state:"fixed"};i._els.push(l),i.initTimeout()}},updateFooterTop:function(){var t=e(".js-footer:eq(0)");return 0===t.length?0:void(i.footerTop=t.offset().top-10)},initTimeout:function(){i._hasScrollEvt===!1&&(e(window).scroll(i.onScroll),i._hasScrollEvt=!0)},onScroll:function(){i._isPolling===!1&&i.startPolling()},startPolling:function(){return window.requestAnimationFrame?function(){var t=function(){i.checkScroll(),i._isPolling===!0&&i.startPolling()};i._pollingId=window.requestAnimationFrame(t),i._isPolling=!0}:function(){i._pollingId=window.setInterval(i.checkScroll,16),i._isPolling=!0}}(),stopPolling:function(){return window.requestAnimationFrame?function(){window.cancelAnimationFrame(i._pollingId),i._isPolling=!1}:function(){window.clearInterval(i._pollingId),i._isPolling=!1}}(),checkScroll:function(){var t=e(window).scrollTop();return t<i.cachedScrollTop+2&&t>i.cachedScrollTop-2?void i.stopPolling():(i.cachedScrollTop=t,void e.each(i._els,function(e,n){var a=t+n.height;a>i.footerTop?i.stick(n):i.unstick(n)}))},stick:function(t){"fixed"===t.state&&"fixed"===t.$fixedEl.css("position")&&(t.$fixedEl.css({position:"absolute",top:i.footerTop-t.fixedTop}),t.state="absolute")},unstick:function(t){"absolute"===t.state&&(t.$fixedEl.css({position:"",top:""}),t.state="fixed")}};t.GOVUK.stopScrollingAtFooter=i,e(t).load(function(){e(t).trigger("govuk.pageSizeChanged")})}.call(this),function(t,e){"use strict";var i,n,a={};a.uaMatch=function(t){t=t.toLowerCase();var e=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}},i=a.uaMatch(t.navigator.userAgent),n={},i.browser&&(a[i.browser]=!0,a.version=i.version),a.webkit&&(a.safari=!0),e.historyBrowserShim=a}(window,jQuery),jQuery.extend({historyCurrentHash:void 0,historyCallback:void 0,historyIframeSrc:void 0,historyNeedIframe:jQuery.historyBrowserShim.msie&&(jQuery.historyBrowserShim.version<8||document.documentMode<8),historyInit:function(t,e){jQuery.historyCallback=t,e&&(jQuery.historyIframeSrc=e);var i=location.hash.replace(/\?.*$/,"");if(jQuery.historyCurrentHash=i,jQuery.historyNeedIframe){""==jQuery.historyCurrentHash&&(jQuery.historyCurrentHash="#"),jQuery("body").prepend('<iframe id="jQuery_history" style="display: none;" src="javascript:false;"></iframe>');var n=jQuery("#jQuery_history")[0],a=n.contentWindow.document;a.open(),a.close(),a.location.hash=i}else jQuery.historyBrowserShim.safari&&(jQuery.historyBackStack=[],jQuery.historyBackStack.length=history.length,jQuery.historyForwardStack=[],jQuery.lastHistoryLength=history.length,jQuery.isFirst=!0);i&&jQuery.historyCallback(i.replace(/^#/,"")),setInterval(jQuery.historyCheck,100)},historyAddHistory:function(t){jQuery.historyBackStack.push(t),jQuery.historyForwardStack.length=0,this.isFirst=!0},historyCheck:function(){if(jQuery.historyNeedIframe){var t=jQuery("#jQuery_history")[0],e=t.contentDocument||t.contentWindow.document,i=e.location.hash.replace(/\?.*$/,"");i!=jQuery.historyCurrentHash&&(location.hash=i,jQuery.historyCurrentHash=i,jQuery.historyCallback(i.replace(/^#/,"")))}else if(jQuery.historyBrowserShim.safari){if(jQuery.lastHistoryLength==history.length&&jQuery.historyBackStack.length>jQuery.lastHistoryLength&&jQuery.historyBackStack.shift(),!jQuery.dontCheck){var n=history.length-jQuery.historyBackStack.length;if(jQuery.lastHistoryLength=history.length,n){if(jQuery.isFirst=!1,0>n)for(var a=0;a<Math.abs(n);a++)jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop());else for(var a=0;n>a;a++)jQuery.historyBackStack.push(jQuery.historyForwardStack.shift());var o=jQuery.historyBackStack[jQuery.historyBackStack.length-1];void 0!=o&&(jQuery.historyCurrentHash=location.hash.replace(/\?.*$/,""),jQuery.historyCallback(o))}else if(void 0==jQuery.historyBackStack[jQuery.historyBackStack.length-1]&&!jQuery.isFirst){if(location.hash){var i=location.hash;jQuery.historyCallback(location.hash.replace(/^#/,""))}else{var i="";jQuery.historyCallback("")}jQuery.isFirst=!0}}}else{var i=location.hash.replace(/\?.*$/,"");i!=jQuery.historyCurrentHash&&(jQuery.historyCurrentHash=i,jQuery.historyCallback(i.replace(/^#/,"")))}},historyLoad:function(t){var e;if(t=decodeURIComponent(t.replace(/\?.*$/,"")),jQuery.historyBrowserShim.safari?e=t:(e="#"+t,location.hash=e),jQuery.historyCurrentHash=e,jQuery.historyNeedIframe){var i=jQuery("#jQuery_history")[0],n=i.contentWindow.document;n.open(),n.close(),n.location.hash=e,jQuery.lastHistoryLength=history.length,jQuery.historyCallback(t)}else if(jQuery.historyBrowserShim.safari){jQuery.dontCheck=!0,this.historyAddHistory(t);var a=function(){jQuery.dontCheck=!1};window.setTimeout(a,200),jQuery.historyCallback(t),location.hash=e}else jQuery.historyCallback(t)}}),jQuery.fn.tabs=function(t){var e=$.extend({trackState:!0,srcPath:"jQuery.history.blank.html",autoRotate:!1,alwaysScrollToTop:!0,selected:null,wrapperTag:"section",defaultTab:null,containerTag:"div",scrollOnload:!1},t),i="tabset",n=function(t){var n=i,a=t.closest(e.containerTag);return a.hasClass("programme-progression")?"none"===t.closest(e.containerTag).css("float")&&(n="accordion"):"none"===t.find("li").css("float")&&(n="accordion"),"accordion"===n?null===e.defaultTab&&(e.defaultTab=-1):null===e.defaultTab&&(e.defaultTab=0),n},a=function(t,e){return"accordion"===i?t.find("header.js-heading-tab"):e.find("li")},o=function(t,i,n){var a,o,s,r=i.find("li"),l=i.closest(e.containerTag).parent();$.each(r,function(t){var i=$(this).find("a"),n=i.attr("href").split("#")[1],r=$('<a href="#'+n+'" class="tab-shiftlink">Return to top of section \u2191</a>');a=l.find("#"+n),o=a.find("header"),o=o.length?o.remove():$("<header><h1 /></header>"),o.addClass("js-heading-tab").removeClass("visuallyhidden"),o.children().html("").append(i),s=a.find(".inner"),s.length?s.addClass("js-tab-pane"):s=$('<div class="inner js-tab-pane" />').html(a.html()),s.attr("id",n),a.replaceWith($("<"+e.wrapperTag+" />").append(s)),a=s.parent(),a.prepend(o).attr("id",n),a.addClass("js-tab-container"),s.append(r)}),i.closest(e.containerTag).remove()};return $(this).each(function(){function t(t,n){if(e.trackState&&!n){var a=t.attr("href").split("#")[1];$.historyLoad(a)}else{p.find("a").attr("aria-selected",!1).attr("tabindex",-1),"accordion"===i?p.find("a").closest(".js-heading-tab").removeClass("active"):p.find("a").parent().filter(".active").removeClass("active"),t.attr("aria-selected",!0).attr("tabindex",0),"accordion"===i?t.closest(".js-heading-tab").addClass("active"):t.parent().addClass("active"),u.find(".tabs-panel-selected").attr("aria-hidden",!0).attr("aria-expanded",!1).removeClass("tabs-panel-selected").hide();var a=t.attr("href").split("#")[1];$("#"+a+h).addClass("tabs-panel-selected").attr("aria-hidden",!1).attr("aria-expanded",!0).show(),e.selected=p.find("a").index(t),l.trigger("tabChanged",a)}}function s(t){p.find("a").attr("aria-selected",!1).attr("tabindex",-1),p.find("a").closest(".js-heading-tab").removeClass("active"),u.find(".tabs-panel-selected").attr("aria-hidden",!0).attr("aria-expanded",!1).removeClass("tabs-panel-selected").hide()}function r(i,n){var a=i||window.location.hash;0==a.indexOf("#")&&(a=a.split("#")[1]);var o=p.find("a[href$=#"+a+"]");return o.size()>0?(t(o,!0),e.scrollOnload&&n&&window.setTimeout(function(){$(document).scrollTop(o.offset().top)},0)):e.defaultTab>-1&&t(p.find("a").eq(e.defaultTab),!0),!!o.size()}var l=$(this),c=l.find(".js-tabs ul, .js-tabs ol");if(0===c.length)return l;var u=$(".js-tab-content"),d="tab-",h="-enhanced";u.addClass("tabs-body").attr("aria-live","polite"),i=n(c),"accordion"===i?o(l,c):c.addClass("tabs-nav").attr("role","tablist"),u.find(".js-tab-pane").each(function(){$(this).addClass("tabs-panel").attr("role","tabpanel").attr("aria-hidden",!0).attr("aria-expanded",!1).attr("aria-labelledby",d+$(this).attr("id")).attr("id",$(this).attr("id")+h).hide()});var p=a(u,c);p.find("a").each(function(t){var e=$(this).attr("href").split("#")[1];$(this).attr("role","tab").attr("id",d+e).attr("aria-controls",e).attr("aria-flowto",e)}),l.on("keydown",function(t){if(!(t.keyCode<$.ui.keyCode.PAGE_UP||t.keyCode>$.ui.keyCode.DOWN)){var i,n;switch(t.keyCode){case $.ui.keyCode.RIGHT:t.preventDefault(),i=e.selected+1;break;case $.ui.keyCode.DOWN:i=e.selected+1;break;case $.ui.keyCode.UP:i=e.selected-1;break;case $.ui.keyCode.LEFT:i=e.selected-1;break;case $.ui.keyCode.END:i=p.length-1;break;case $.ui.keyCode.HOME:i=0;break;case $.ui.keyCode.PAGE_UP:if(!t.ctrlKey)return;i=e.selected+1;break;case $.ui.keyCode.PAGE_DOWN:if(!t.ctrlKey)return;if(i=e.selected+1,!t.ctrlKey)return;i=e.selected-1}return t.preventDefault(),t.stopPropagation(),void 0!==i&&(i=i>=p.length?0:0>i?p.length-1:i,n=p.find("a").eq(i),n.focus(),e.selected=i),!1}}),l.bind("click keydown focus",function(){e.autoRotate&&clearInterval(tabRotator)}),e.trackState&&$.historyInit(r,e.srcPath),r(null,!0),p.on("click","a",function(){return $(this).closest(".js-heading-tab").hasClass("active")?s($(this)):t($(this)),$(this).focus(),!1}),e.alwaysScrollToTop&&$(window)[0].scrollTo(0,0),"undefined"!=typeof GOVUK.stopScrollingAtFooter&&GOVUK.stopScrollingAtFooter.updateFooterTop()})},$(function(){var t=t||{},e=function(){this.$navbar=$("div.article-container aside nav.page-navigation"),this.$navlist=this.$navbar.find("ol"),this.$showAllLink=$('<a href="#" class="show-all-parts">Show all parts of this guide</a>'),this.$pageHeader=$(".multi-page article header h1 span"),this.init()};e.prototype={init:function(){"none"===this.$navbar.closest("aside").css("float")&&this.setup()},control:function(t){var e=$(t.target),i=this;return e.hasClass("show-all-parts-open")?(e.removeClass("show-all-parts-open"),e.text(e.text().replace(/Hide/,"Show")),i.$navbar.removeClass("page-navigation-open"),i.$navbar.addClass("page-navigation-closed")):(e.addClass("show-all-parts-open"),e.text(e.text().replace(/Show/,"Hide")),i.$navbar.removeClass("page-navigation-closed"),i.$navbar.addClass("page-navigation-open")),!1},setup:function(){var t=this;this.$navlist.find("li").length,this.$navlist.find("li.active").index()+1;this.$showAllLink.insertBefore(this.$navbar),this.$navbar.prepend(this.$navbar.find("ol").remove()),this.$pageHeader.length&&this.$pageHeader.html(this.$pageHeader.html().replace(/Part\s(\d+)/,"Part $1 of "+this.$navlist.find("li").length)),this.$showAllLink.on("click",function(e){return t.control(e),!1}),this.$navbar.addClass("page-navigation-closed")}},t.guideTabs=new e}),$(function(){"use strict";function t(){var t=$('<div id="global-browser-prompt"></div>'),e=$('<p><a href="/help/browsers">Upgrade your web browser</a> (the software you use to access the internet), it\u2019s out of date</p>'),i=$('<a href="#" class="dismiss" title="Dismiss this message">Close</a>');return t.append(e.append(i))}if(GOVUK.cookie("seen_cookie_message")){if(suchi.isOld(navigator.userAgent)&&null!==GOVUK.cookie("govuk_not_first_visit")&&null===GOVUK.cookie("govuk_browser_upgrade_dismissed")){var e=t();$("#global-cookie-message").after(e),e.show(),GOVUK.analytics.trackEvent("browser-check","prompt-shown",{value:1,nonInteraction:!0}),e.on("click",".dismiss",function(t){e.hide(),GOVUK.cookie("govuk_browser_upgrade_dismissed","yes",{days:28})})}GOVUK.cookie("govuk_not_first_visit","yes",{days:28})}}),function(){"use strict";var t=this,e=t.jQuery;"undefined"==typeof t.GOVUK&&(t.GOVUK={});var i={shouldOpen:function(){var t=["/changes-affect-tax-credits","/check-if-you-need-a-tax-return/y/employed-even-if-just-for-part-of-the-year/no/no/no-neither-of-us-claimed-child-benefit/no/no/no/none-of-these","/check-if-you-need-a-tax-return/y/retired/no/no-neither-of-us-claimed-child-benefit/no/no/no/none-of-these","/child-tax-credit/how-to-claim","/childcare-costs-for-tax-credits/y/yes/yes/weekly_diff_amount","/childcare-costs-for-tax-credits/y/no/regularly_less_than_year/monthly_diff_amount","/lost-national-insurance-number","/manage-your-tax-credits","/renewing-your-tax-credits-claim","/tax-credits-appeals-complaints","/tax-credits-if-you-have-baby","/tax-credits-overpayments","/vat-registration/changes-to-your-details","/when-is-your-next-tax-credits-payment","/working-tax-credit/how-to-claim"];return e.inArray(window.location.pathname,t)>=0},validOrigin:function(t){return t.match(/gov\.uk$/)||t.match(/alphagov\.co\.uk$/)},sendMessage:function(t){i.$chatFrame.get(0).contentWindow.postMessage(JSON.stringify(t),"https://assets.publishing.service.gov.uk")},receiveMessage:function(t){if(t=t.originalEvent,i.validOrigin(t.origin)){var e=JSON.parse(t.data);"opened"===e.evt?(i.$banner.addClass("open"),i.$banner.attr("aria-hidden",!1),GOVUK.analytics.trackEvent("webchat","offered")):"closed"===e.evt?(i.$banner.removeClass("open"),i.$banner.attr("aria-hidden",!0)):"error"===e.evt&&GOVUK.analytics.trackEvent("webchat","error")}},init:function(){var t;window.sessionStorage&&window.postMessage&&i.shouldOpen()&&(t=e(e(".beta-wrapper").length?".beta-wrapper":"#content > header"),t.after('<div class="webchat-banner" aria-hidden="true"><h2>Talk to an HMRC adviser online</h2><p>You can use web chat instead of calling HMRC\u2019s helpline.</p><a href="#" class="accept">Start web chat</a> <a href="#" class="reject">I\u2019m not interested</a></div>'),i.$chatFrame=e('<iframe class="hidden" />'),i.$banner=e(".webchat-banner"),i.$chatFrame.attr("src","https://assets.publishing.service.gov.uk/static/webchat-iframe-2d543041ba9841c24cb490ff04b8c250cbb7bd7f2178bcf96c11e18d185352ce.html"),i.$chatFrame.on("load",function(){i.sendMessage({evt:"load",url:window.location.href,title:window.document.title})}),i.$chatFrame.appendTo("body"),e(window).on("message",i.receiveMessage),i.$banner.on("click",".accept",function(t){t.preventDefault(),i.sendMessage({evt:"accept"}),GOVUK.analytics.trackEvent("webchat","accepted")}).on("click",".reject",function(t){t.preventDefault(),i.sendMessage({evt:"reject"}),GOVUK.analytics.trackEvent("webchat","rejected")}))}};t.GOVUK.webchat=i}.call(this);