function applyTooltip(n){n=n||$(document);n.find(strImagingThumbClassName+"[title]").applyTooltipToItems()}function downloadOnClick(n){return $(n).find("input:checked").length>0}function generateUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n==="x"?t:t&3|8;return i.toString(16)})}function showLoading(n){var t=$(n),r=t.height(),u=t.width(),i;t.children().hide();t.height(r);t.width(u);t.children().first().before("<div class=loadingOuter><div class=loadingInner> <\/div><\/div>");i=t.find(".loadingOuter");i.length>0&&i.height(r).width(u).fadeIn()}function hideLoading(n){var t;t=typeof n=="undefined"?$("div.loadingOuter").parent():$(n);t.find(".loadingOuter").fadeOut(function(){$(this).remove()});t.children().show()}function disableInputs(n){$(n).addClass("greyedout").find("input, select").attr("disabled",!0);$(n).find(".msgLaunch, .js-control").addClass("disabled")}function enableInputs(n){$(n).removeClass("greyedout").find("input, select").attr("disabled",!1);$(n).find(".msgLaunch, .js-control").removeClass("disabled")}function ajaxError(n,t,i,r,u,f,e){var o,h,c,l,s,a;if(f=f||".jq-ajaxretry",e=e||r.retryLimit,MSG.removeButtonLoading(),t==="timeout"){++r.tryCount<e&&(r.type==="GET"||r.type==="HEAD")?(r.timeout=r.timeout*.5,r.timeout>MAIN.maxAjaxTimeout&&(r.timeout=MAIN.maxAjaxTimeout),$.ajax(r)):(o=function(n,t){console.log("$elmt: "+n.length+"; $message: "+t.length);var i=t.clone().removeClass("jq-ajaxretry jq-ajaxmsgretry").addClass("jq-ajaxretrypanel").show();$(".jq-retryButton",i).on("click",function(t){var u,i;return t.preventDefault(),u=$(this),u.closest(".jq-ajaxretrypanel").remove(),n.find(".jq-ajaxtimeouthidden").removeClass("jq-ajaxtimeouthidden").show(),i=u.parent().parent().find(".ph").show(),i.length>0?(i.removeClass("requested").parent().find(".ajaxErrorInfoMsg").hide(),MAIN.getThumbsForCollection(i)):$.ajax(r),!1});$(".jq-cancelButton",i).on("click",function(n){return n.preventDefault(),$(this).closest(".msgBox").fadeOut("fast",function(){$(this).remove()}),!1});n.append(i)},r.tryCount=0,r.timeout=MAIN.ajaxTimeout,typeof u!="undefined"&&u!==null?(h=u.parent(),o(h,$(f)),u.addClass("jq-ajaxtimeouthidden").hide()):$(".tabLoading").length>0?(c=$(".tabLoading").parent(),o(c,$(".jq-ajaxretry")),$(".tabLoading").remove()):$(".msgLoading").length>0?(l=$(".msgLoading").parents().find(".msgDiv4"),o(l,$(".jq-ajaxmsgretry"))):console.log("ajax timeout unhandled: "+r.url));return}if(s=n.responseText&&n.responseText.substr(0,1750),typeof i!="undefined"&&i&&i.indexOf(i)===-1)if(typeof MSG=="undefined")window.location=i+"?statusCode="+n.status+"&exception="+t+"&errorMessage="+s;else{$(".msgLoading").length>0&&(a=$(".msgLoading").parents().find(".msgDiv4"),a.remove());MSG.show(i+"?statusCode="+n.status+"&exception="+t+"&errorMessage="+s,$(this));return}n.status===0||(n.status===403?alert(n.responseText):n.status===404?alert("Requested URL not found."):n.status===500?(alert("We've run into a problem."),MSG.closeAll()):t==="parsererror"?alert("Error.\nParsing JSON Request failed."):(alert("Unknown Error.\n"+n.responseText),MSG.closeAll()))}function executeFunctionByName(n,t){var i;typeof t=="undefined"&&(t=window);var f=Array.prototype.slice.call(arguments,2),r=n.split("."),u=r.pop();for(i=0;i<r.length;i++)t=t[r[i]];return u===""?!0:t&&t[u]?t[u].apply(t,f):null}var pagerDictionary,MAIN,newsLightbox,country,videoPlayer;(function(n){var i=[].slice,t={},r=n.amplify={publish:function(n){if(typeof n!="string")throw new Error("You must provide a valid topic to publish.");var s=i.call(arguments,1),r,u,o,f=0,e;if(!t[n])return!0;for(r=t[n].slice(),o=r.length;f<o;f++)if(u=r[f],e=u.callback.apply(u.context,s),e===!1)break;return e!==!1},subscribe:function(n,i,r,u){var f,s;if(typeof n!="string")throw new Error("You must provide a valid topic to create a subscription.");arguments.length===3&&typeof r=="number"&&(u=r,r=i,i=null);arguments.length===2&&(r=i,i=null);u=u||10;for(var e=0,h=n.split(/\s/),c=h.length,o;e<c;e++){for(n=h[e],o=!1,t[n]||(t[n]=[]),f=t[n].length-1,s={callback:r,context:i,priority:u};f>=0;f--)if(t[n][f].priority<=u){t[n].splice(f+1,0,s);o=!0;break}o||t[n].unshift(s)}return r},unsubscribe:function(n,i,r){if(typeof n!="string")throw new Error("You must provide a valid topic to remove a subscription.");if(arguments.length===2&&(r=i,i=null),t[n])for(var f=t[n].length,u=0;u<f;u++)t[n][u].callback===r&&(i&&t[n][u].context!==i||(t[n].splice(u,1),u--,f--))}}})(this),function(n,t){function f(n,r){i.addType(n,function(f,e,o){var c,s,v,l,h=e,a=(new Date).getTime();if(!f){h={};l=[];v=0;try{for(f=r.length;f=r.key(v++);)u.test(f)&&(s=JSON.parse(r.getItem(f)),s.expires&&s.expires<=a?l.push(f):h[f.replace(u,"")]=s.data);while(f=l.pop())r.removeItem(f)}catch(y){}return h}if(f="__amplify__"+f,e===t)if(c=r.getItem(f),s=c?JSON.parse(c):{expires:-1},s.expires&&s.expires<=a)r.removeItem(f);else return s.data;else if(e===null)r.removeItem(f);else{s=JSON.stringify({data:e,expires:o.expires?a+o.expires:null});try{r.setItem(f,s)}catch(y){i[n]();try{r.setItem(f,s)}catch(y){throw i.error();}}}return h})}var i=n.store=function(n,t,r){var u=i.type;return r&&r.type&&r.type in i.types&&(u=r.type),i.types[u](n,t,r||{})},u,r;i.types={};i.type=null;i.addType=function(n,t){i.type||(i.type=n);i.types[n]=t;i[n]=function(t,r,u){return u=u||{},u.type=n,i(t,r,u)}};i.error=function(){return"amplify.store quota exceeded"};u=/^__amplify__/;for(r in{localStorage:1,sessionStorage:1})try{window[r].setItem("__amplify__","x");window[r].removeItem("__amplify__");f(r,window[r])}catch(e){}if(!i.types.localStorage&&window.globalStorage)try{f("globalStorage",window.globalStorage[window.location.hostname]);i.type==="sessionStorage"&&(i.type="globalStorage")}catch(e){}(function(){if(!i.types.localStorage){var n=document.createElement("div"),r="amplify";n.style.display="none";document.getElementsByTagName("head")[0].appendChild(n);try{n.addBehavior("#default#userdata");n.load(r)}catch(u){n.parentNode.removeChild(n);return}i.addType("userData",function(u,f,e){n.load(r);var s,o,h,v,l,c=f,a=(new Date).getTime();if(!u){for(c={},l=[],v=0;s=n.XMLDocument.documentElement.attributes[v++];)o=JSON.parse(s.value),o.expires&&o.expires<=a?l.push(s.name):c[s.name]=o.data;while(u=l.pop())n.removeAttribute(u);return n.save(r),c}if(u=u.replace(/[^\-._0-9A-Za-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c-\u200d\u203f\u2040\u2070-\u218f]/g,"-"),u=u.replace(/^-/,"_-"),f===t)if(s=n.getAttribute(u),o=s?JSON.parse(s):{expires:-1},o.expires&&o.expires<=a)n.removeAttribute(u);else return o.data;else f===null?n.removeAttribute(u):(h=n.getAttribute(u),o=JSON.stringify({data:f,expires:e.expires?a+e.expires:null}),n.setAttribute(u,o));try{n.save(r)}catch(y){h===null?n.removeAttribute(u):n.setAttribute(u,h);i.userData();try{n.setAttribute(u,o);n.save(r)}catch(y){h===null?n.removeAttribute(u):n.setAttribute(u,h);throw i.error();}}return c})}})(),function(){function u(n){return n===t?t:JSON.parse(JSON.stringify(n))}var n={},r={};i.addType("memory",function(i,f,e){return i?f===t?u(n[i]):(r[i]&&(clearTimeout(r[i]),delete r[i]),f===null)?(delete n[i],null):(n[i]=f,e.expires&&(r[i]=setTimeout(function(){delete n[i];delete r[i]},e.expires)),f):u(n)})}()}(this.amplify=this.amplify||{}),function(n){"use strict";function t(){}function r(n){return{}.toString.call(n)==="[object Function]"}function i(n){var t=!1;return setTimeout(function(){t=!0},1),function(){var i=this,r=arguments;t?n.apply(i,r):setTimeout(function(){n.apply(i,r)},1)}}n.request=function(u,f,e){var o=u||{};typeof o=="string"&&(r(f)&&(e=f,f={}),o={resourceId:u,data:f||{},success:e});var s={abort:t},h=n.request.resources[o.resourceId],c=o.success||t,l=o.error||t;if(o.success=i(function(t,i){i=i||"success";n.publish("request.success",o,t,i);n.publish("request.complete",o,t,i);c(t,i)}),o.error=i(function(t,i){i=i||"error";n.publish("request.error",o,t,i);n.publish("request.complete",o,t,i);l(t,i)}),!h){if(!o.resourceId)throw"amplify.request: no resourceId provided";throw"amplify.request: unknown resourceId: "+o.resourceId;}if(!n.publish("request.before",o)){o.error(null,"abort");return}return n.request.resources[o.resourceId](o,s),s};n.request.types={};n.request.resources={};n.request.define=function(t,i,r){if(typeof i=="string"){if(!(i in n.request.types))throw"amplify.request.define: unknown type: "+i;r.resourceId=t;n.request.resources[t]=n.request.types[i](r)}else n.request.resources[t]=i}}(amplify),function(n,t,i){"use strict";var u=["status","statusText","responseText","responseXML","readyState"],f=/\{([^\}]+)\}/g,r;n.request.types.ajax=function(r){return r=t.extend({type:"GET"},r),function(f,e){var h,c,v=r.url,a=e.abort,o=t.extend(!0,{},r,{data:f.data}),l=!1,s={readyState:0,setRequestHeader:function(n,t){return h.setRequestHeader(n,t)},getAllResponseHeaders:function(){return h.getAllResponseHeaders()},getResponseHeader:function(n){return h.getResponseHeader(n)},overrideMimeType:function(n){return h.overrideMimeType(n)},abort:function(){l=!0;try{h.abort()}catch(n){}c(null,"abort")},success:function(n,t){f.success(n,t)},error:function(n,t){f.error(n,t)}};c=function(n,r){t.each(u,function(n,t){try{s[t]=h[t]}catch(i){}});/OK$/.test(s.statusText)&&(s.statusText="success");n===i&&(n=null);l&&(r="abort");/timeout|error|abort/.test(r)?s.error(n,r):s.success(n,r);c=t.noop};n.publish("request.ajax.preprocess",r,f,o,s);t.extend(o,{isJSONP:function(){return/jsonp/gi.test(this.dataType)},cacheURL:function(){var n,t;return this.isJSONP()?(n="callback",this.hasOwnProperty("jsonp")&&(this.jsonp!==!1?n=this.jsonp:this.hasOwnProperty("jsonpCallback")&&(n=this.jsonpCallback)),t=new RegExp("&?"+n+"=[^&]*&?","gi"),this.url.replace(t,"")):this.url},success:function(n,t){c(n,t)},error:function(n,t){c(null,t)},beforeSend:function(t,i){h=t;o=i;var u=r.beforeSend?r.beforeSend.call(this,s,o):!0;return u&&n.publish("request.before.ajax",r,f,o,s)}});o.cache&&o.isJSONP()&&t.extend(o,{cache:!0});t.ajax(o);e.abort=function(){s.abort();a.call(this)}}};n.subscribe("request.ajax.preprocess",function(n,i,r){var e=[],u=r.data;typeof u!="string"&&(u=t.extend(!0,{},n.data,u),r.url=r.url.replace(f,function(n,t){if(t in u)return e.push(t),u[t]}),t.each(e,function(n,t){delete u[t]}),r.data=u)});n.subscribe("request.ajax.preprocess",function(n,i,r){var u=r.data,f=n.dataMap;f&&typeof u!="string"&&(t.isFunction(f)?r.data=f(u):(t.each(n.dataMap,function(n,t){n in u&&(u[t]=u[n],delete u[n])}),r.data=u))});r=n.request.cache={_key:function(n,t,i){function e(){return i.charCodeAt(r++)<<24|i.charCodeAt(r++)<<16|i.charCodeAt(r++)<<8|i.charCodeAt(r++)<<0}var f,r,u;for(i=t+i,f=i.length,r=0,u=e();r<f;)u^=e();return"request-"+n+"-"+u},_default:function(){var n={};return function(t,i,u,f){var e=r._key(i.resourceId,u.cacheURL(),u.data),o=t.cache,s;if(e in n)return f.success(n[e]),!1;s=f.success;f.success=function(t){n[e]=t;typeof o=="number"&&setTimeout(function(){delete n[e]},o);s.apply(this,arguments)}}}()};n.store&&(t.each(n.store.types,function(t){r[t]=function(i,u,f,e){var o=r._key(u.resourceId,f.cacheURL(),f.data),s=n.store[t](o),h;if(s)return f.success(s),!1;h=e.success;e.success=function(r){n.store[t](o,r,{expires:i.cache.expires});h.apply(this,arguments)}}}),r.persist=r[n.store.type]);n.subscribe("request.before.ajax",function(n){var t=n.cache;if(t)return t=t.type||t,r[t in r?t:"_default"].apply(this,arguments)});n.request.decoders={jsend:function(n,t,i,r,u){n.status==="success"?r(n.data):n.status==="fail"?u(n.data,"fail"):n.status==="error"?(delete n.status,u(n,"error")):u(null,"error")}};n.subscribe("request.before.ajax",function(i,r,u,f){function o(n,t){h(n,t)}function s(n,t){c(n,t)}var h=f.success,c=f.error,e=t.isFunction(i.decoder)?i.decoder:i.decoder in n.request.decoders?n.request.decoders[i.decoder]:n.request.decoders._default;e&&(f.success=function(n,t){e(n,t,f,o,s)},f.error=function(n,t){e(n,t,f,o,s)})})}(amplify,jQuery);jQuery.fn.evenIfHidden=function(n){return this.each(function(){var i=$(this),r=[],t=i.parents().addBack().filter(":hidden");if(!t.length)return n(i),!0;t.each(function(){var n=$(this).prop("style");n=typeof n=="undefined"?"":n;r.push(n);$(this).prop("style",n+" display: block !important;")});t.eq(0).css("left",-1e4);n(i);t.each(function(){$(this).prop("style",r.shift())})})},function(n){"use strict";typeof define=="function"&&define.amd?define(["jquery"],n):typeof module=="object"&&module.exports?module.exports=n(require("jquery")):jQuery&&!jQuery.fn.hoverIntent&&n(jQuery)}(function(n){"use strict";var e={interval:100,sensitivity:6,timeout:0},o=0,t,i,r=function(n){t=n.pageX;i=n.pageY},u=function(n,f,e,o){if(Math.sqrt((e.pX-t)*(e.pX-t)+(e.pY-i)*(e.pY-i))<o.sensitivity)return f.off(e.event,r),delete e.timeoutId,e.isActive=!0,n.pageX=t,n.pageY=i,delete e.pX,delete e.pY,o.over.apply(f[0],[n]);e.pX=t;e.pY=i;e.timeoutId=setTimeout(function(){u(n,f,e,o)},o.interval)},s=function(n,t,i,r){var u=t.data("hoverIntent");return u&&delete u[i.id],r.apply(t[0],[n])},f=function(n){return typeof n=="function"};n.fn.hoverIntent=function(t,i,h){var l=o++,c=n.extend({},e),a;n.isPlainObject(t)?(c=n.extend(c,t),f(c.out)||(c.out=c.over)):c=f(i)?n.extend(c,{over:t,out:i,selector:h}):n.extend(c,{over:t,out:t,selector:i});a=function(t){var e=n.extend({},t),f=n(this),o=f.data("hoverIntent"),i,h;if(o||f.data("hoverIntent",o={}),i=o[l],i||(o[l]=i={id:l}),i.timeoutId&&(i.timeoutId=clearTimeout(i.timeoutId)),h=i.event="mousemove.hoverIntent.hoverIntent"+l,t.type==="mouseenter"){if(i.isActive)return;i.pX=e.pageX;i.pY=e.pageY;f.off(h,r).on(h,r);i.timeoutId=setTimeout(function(){u(e,f,i,c)},c.interval)}else{if(!i.isActive)return;f.off(h,r);i.timeoutId=setTimeout(function(){s(e,f,i,c.out)},c.timeout)}};return this.on({"mouseenter.hoverIntent":a,"mouseleave.hoverIntent":a},c.selector)}}),function(n){var u=n.document.documentMode,r="onhashchange"in n&&(u===undefined||u>7),t=n.jHash={jhash:"2.1",change:function(t){r?s(n,"hashchange",t):i.push(t)},unbind:function(t){return r?h(n,"hashchange",t):c(i,i.indexOf(t)),this},val:function(n,i){var r=t.query();return arguments.length===2?(r[n.toLowerCase()]=i===null?"":i,this.set(this.root(),r)):arguments.length===1&&typeof n=="string"?r[n.toLowerCase()]:typeof n=="object"?this.set(this.root(),n):r},root:function(t){return t===undefined?v(n.location.hash):this.set(t,this.val())},set:function(t,i){var r=null,u,f;return t===null&&i===null?r=null:i!==undefined?(u=t,f=typeof i=="string"?i:a(i),f.length>0&&(u+="?"),r=u+f):r=t,n.location.hash=r,this},remove:function(n){var i=t.query();return i[n.toLowerCase()]=undefined,this.set(this.root(),i)},query:function(){return l(n.location.hash)},clear:function(){return n.location.hash="",this},clearQuery:function(){return this.set(this.root()),this},clearRoot:function(){return this.set("",this.query()),this},_routes:{},_routeHandlerRegistered:!1,_defaultRoute:null,route:function(n,i){this._routes[n]=i;this._routeHandlerRegistered||(this._routeHandlerRegistered=!0,t.change(o))},processRoute:function(){o()},defaultRoute:function(n,t){if(arguments.length==0)return this._defaultRoute;this._defaultRoute={root:n,query:t}}};r||n.setInterval(function(){var t=n.location.hash,r;if(f!==t)for(r in i)i[r].call(n);f=t},200);var i=[],f=n.location.hash,s=function(n,t,i){n.addEventListener?n.addEventListener(t,i,!1):n.attachEvent?n.attachEvent("on"+t,i):n["on"+t]+=i},h=function(n,t,i){n.removeEventListener?n.removeEventListener(t,i,!1):n.detachEvent?n.detachEvent("on"+t,i):n["on"+t]-=i},c=function(n,t,i){var r=n.slice((i||t)+1||n.length);return n.length=t<0?n.length+t:t,n.push.apply(n,r)},l=function(n){var f={},i=null,t=n.substring(0,n.length),r,u,e;if(n!==null&&n!==undefined&&(t.indexOf("#")===0&&(t=t.substring(1,t.length)),r=t.indexOf("?"),r>-1)){t=t.substring(r+1,t.length);u=t.split("&");for(e in u)i=u[e].split("="),f[i[0].toString().toLowerCase()]=i[1]}return f},a=function(n){var t="";for(var i in n)n[i]!==undefined&&(t.length>0&&(t+="&"),t+=i.toString()+"="+n[i].toString());return t},v=function(n){var t=n.substring(0,n.length);return t.indexOf("#")>-1&&(t=t.substring(1,t.length)),t.indexOf("?")>-1&&(t=t.substring(0,t.indexOf("?"))),t},y="([^/]+)",e=/{([\w\d]+)}/g,p=function(n,t){var i=new RegExp(n.replace(e,y)+"$");return t.match(i)},o=function(){var o=t.root(),u=t.defaultRoute(),i,f,n,h;if((o||"").length===0&&u){t.set(u.root,u.query);return}for(i in t._routes)if(typeof i=="string"&&(f=p(i,o),f!==null)){var c=t._routes[i],s={},r=i.match(e);if(r!==null)for(n=0;n<r.length;n++)h=r[n].substring(1).substring(0,r[n].length-2),s[h]=f[n+1];c.call(s);return}}}(window);var EasyAutocomplete=function(n){return n.Configuration=function(n){function u(){var f,i,e,r,u;if(n.dataType==="xml"&&(n.getValue||(n.getValue=function(n){return $(n).text()}),n.list||(n.list={}),n.list.sort||(n.list.sort={}),n.list.sort.method=function(t,i){return(t=n.getValue(t),i=n.getValue(i),t<i)?-1:t>i?1:0},n.list.match||(n.list.match={}),n.list.match.method=function(n,t){return n.search(t)>-1?!0:!1}),n.categories!==undefined&&n.categories instanceof Array){for(f=[],i=0,e=n.categories.length;i<e;i+=1){r=n.categories[i];for(u in t.categories[0])r[u]===undefined&&(r[u]=t.categories[0][u]);f.push(r)}n.categories=f}}function f(){function i(n,t){var u=n||{};for(var r in n)t[r]!==undefined&&t[r]!==null&&(typeof t[r]!="object"||t[r]instanceof Array?u[r]=t[r]:i(n[r],t[r]));return t.data!==undefined&&t.data!==null&&typeof t.data=="object"&&(u.data=t.data),u}t=i(t,n)}function e(){var i,r,u;t.url!=="list-required"&&typeof t.url!="function"&&(i=t.url,t.url=function(){return i});t.ajaxSettings.url!==undefined&&typeof t.ajaxSettings.url!="function"&&(i=t.ajaxSettings.url,t.ajaxSettings.url=function(){return i});typeof t.listLocation=="string"&&(r=t.listLocation,t.listLocation=t.dataType.toUpperCase()==="XML"?function(n){return $(n).find(r)}:function(n){return n[r]});typeof t.getValue=="string"&&(u=t.getValue,t.getValue=function(n){return n[u]});n.categories!==undefined&&(t.categoriesAssigned=!0)}function o(){t.ajaxSettings=n.ajaxSettings!==undefined&&typeof n.ajaxSettings=="object"?n.ajaxSettings:{}}function s(n){return t[n]!==undefined&&t[n]!==null?!0:!1}function i(n,i){function u(t,i){for(var f in i)t[f]===undefined&&n.log("Property '"+f+"' does not exist in EasyAutocomplete options API."),typeof t[f]=="object"&&$.inArray(f,r)===-1&&u(t[f],i[f])}u(t,i)}var t={data:"list-required",url:"list-required",dataType:"json",listLocation:function(n){return n},xmlElementName:"",getValue:function(n){return n},autocompleteOff:!0,placeholder:!1,ajaxCallback:function(){},matchResponseProperty:!1,list:{sort:{enabled:!1,method:function(n,i){return(n=t.getValue(n),i=t.getValue(i),n<i)?-1:n>i?1:0}},maxNumberOfElements:6,hideOnEmptyPhrase:!0,match:{enabled:!1,caseSensitive:!1,method:function(n,t){return n.search(t)>-1?!0:!1}},showAnimation:{type:"normal",time:400,callback:function(){}},hideAnimation:{type:"normal",time:400,callback:function(){}},onClickEvent:function(){},onSelectItemEvent:function(){},onLoadEvent:function(){},onChooseEvent:function(){},onKeyEnterEvent:function(){},onMouseOverEvent:function(){},onMouseOutEvent:function(){},onShowListEvent:function(){},onHideListEvent:function(){}},highlightPhrase:!0,theme:"",cssClasses:"",minCharNumber:0,requestDelay:0,adjustWidth:!0,ajaxSettings:{},preparePostData:function(n){return n},loggerEnabled:!0,template:"",categoriesAssigned:!1,categories:[{maxNumberOfElements:4}]},r=["ajaxSettings","template"];this.get=function(n){return t[n]};this.equals=function(n,i){return s(n)&&t[n]===i?!0:!1};this.checkDataUrlProperties=function(){return t.url==="list-required"&&t.data==="list-required"?!1:!0};this.checkRequiredProperties=function(){for(var n in t)if(t[n]==="required")return logger.error("Option "+n+" must be defined"),!1;return!0};this.printPropertiesThatDoesntExist=function(n,t){i(n,t)};u();f();t.loggerEnabled===!0&&i(console,n);o();e()},n}(EasyAutocomplete||{}),EasyAutocomplete=function(n){return n.Logger=function(){this.error=function(n){console.log("ERROR: "+n)};this.warning=function(n){console.log("WARNING: "+n)}},n}(EasyAutocomplete||{}),EasyAutocomplete=function(n){return n.Constans=function(){var n={CONTAINER_CLASS:"easy-autocomplete-container",CONTAINER_ID:"eac-container-",WRAPPER_CSS_CLASS:"easy-autocomplete"};this.getValue=function(t){return n[t]}},n}(EasyAutocomplete||{}),EasyAutocomplete=function(n){return n.ListBuilderService=function(n,t){function i(t,i){function f(){var u={},r;return t.xmlElementName!==undefined&&(u.xmlElementName=t.xmlElementName),t.listLocation!==undefined?r=t.listLocation:n.get("listLocation")!==undefined&&(r=n.get("listLocation")),r!==undefined?typeof r=="string"?u.data=$(i).find(r):typeof r=="function"&&(u.data=r(i)):u.data=i,u}function e(){var n={};return t.listLocation!==undefined?typeof t.listLocation=="string"?n.data=i[t.listLocation]:typeof t.listLocation=="function"&&(n.data=t.listLocation(i)):n.data=i,n}var r={},u;return r=n.get("dataType").toUpperCase()==="XML"?f():e(),t.header!==undefined&&(r.header=t.header),t.maxNumberOfElements!==undefined&&(r.maxNumberOfElements=t.maxNumberOfElements),n.get("list").maxNumberOfElements!==undefined&&(r.maxListSize=n.get("list").maxNumberOfElements),t.getValue!==undefined?typeof t.getValue=="string"?(u=t.getValue,r.getValue=function(n){return n[u]}):typeof t.getValue=="function"&&(r.getValue=t.getValue):r.getValue=n.get("getValue"),r}function r(t){var i=[];return t.xmlElementName===undefined&&(t.xmlElementName=n.get("xmlElementName")),$(t.data).find(t.xmlElementName).each(function(){i.push(this)}),i}this.init=function(t){var r=[],i={};return i.data=n.get("listLocation")(t),i.getValue=n.get("getValue"),i.maxListSize=n.get("list").maxNumberOfElements,r.push(i),r};this.updateCategories=function(t,r){var u,f;if(n.get("categoriesAssigned"))for(t=[],u=0;u<n.get("categories").length;u+=1)f=i(n.get("categories")[u],r),t.push(f);return t};this.convertXml=function(t){if(n.get("dataType").toUpperCase()==="XML")for(var i=0;i<t.length;i+=1)t[i].data=r(t[i]);return t};this.processData=function(i,r){for(var u=0,f=i.length;u<f;u+=1)i[u].data=t(n,i[u],r);return i};this.checkIfDataExists=function(n){for(var t=0,i=n.length;t<i;t+=1)if(n[t].data!==undefined&&n[t].data instanceof Array&&n[t].data.length>0)return!0;return!1}},n}(EasyAutocomplete||{}),EasyAutocomplete=function(n){return n.proccess=function(t,i,r){function o(n,i){var u=[],e="",r,o;if(t.get("list").match.enabled)for(r=0,o=n.length;r<o;r+=1)e=t.get("getValue")(n[r]),f(e,i)&&u.push(n[r]);else u=n;return u}function f(n,i){return t.get("list").match.caseSensitive||(typeof n=="string"&&(n=n.toLowerCase()),i=i.toLowerCase()),t.get("list").match.method(n,i)?!0:!1}function s(n){return i.maxNumberOfElements!==undefined&&n.length>i.maxNumberOfElements&&(n=n.slice(0,i.maxNumberOfElements)),n}function h(n){return t.get("list").sort.enabled&&n.sort(t.get("list").sort.method),n}n.proccess.match=f;var u=i.data,e=r;return u=o(u,e),u=s(u),h(u)},n}(EasyAutocomplete||{}),EasyAutocomplete=function(n){return n.Template=function(n){var t={basic:{type:"basic",method:function(n){return n},cssClass:""},description:{type:"description",fields:{description:"description"},method:function(n){return n+" - description"},cssClass:"eac-description"},iconLeft:{type:"iconLeft",fields:{icon:""},method:function(n){return n},cssClass:"eac-icon-left"},iconRight:{type:"iconRight",fields:{iconSrc:""},method:function(n){return n},cssClass:"eac-icon-right"},links:{type:"links",fields:{link:""},method:function(n){return n},cssClass:""},custom:{type:"custom",method:function(){},cssClass:""}},i=function(n){var i=n.fields,r;return n.type==="description"?(r=t.description.method,typeof i.description=="string"?r=function(n,t){return n+" - <span>"+t[i.description]+"<\/span>"}:typeof i.description=="function"&&(r=function(n,t){return n+" - <span>"+i.description(t)+"<\/span>"}),r):n.type==="iconRight"?(typeof i.iconSrc=="string"?r=function(n,t){return n+"<img class='eac-icon' src='"+t[i.iconSrc]+"' />"}:typeof i.iconSrc=="function"&&(r=function(n,t){return n+"<img class='eac-icon' src='"+i.iconSrc(t)+"' />"}),r):n.type==="iconLeft"?(typeof i.iconSrc=="string"?r=function(n,t){return"<img class='eac-icon' src='"+t[i.iconSrc]+"' />"+n}:typeof i.iconSrc=="function"&&(r=function(n,t){return"<img class='eac-icon' src='"+i.iconSrc(t)+"' />"+n}),r):n.type==="links"?(typeof i.link=="string"?r=function(n,t){return"<a href='"+t[i.link]+"' >"+n+"<\/a>"}:typeof i.link=="function"&&(r=function(n,t){return"<a href='"+i.link(t)+"' >"+n+"<\/a>"}),r):n.type==="custom"?n.method:t.basic.method},r=function(n){return!n||!n.type?t.basic.method:n.type&&t[n.type]?i(n):t.basic.method},u=function(n){var i=function(){return""};return!n||!n.type?i:n.type&&t[n.type]?function(){var i=t[n.type].cssClass;return function(){return i}}():i};this.getTemplateClass=u(n);this.build=r(n)},n}(EasyAutocomplete||{}),EasyAutocomplete=function(n){return n.main=function(t,i){function g(){if(u.length===0){a.error("Input field doesn't exist.");return}if(!r.checkDataUrlProperties()){a.error("One of options variables 'data' or 'url' must be defined.");return}if(!r.checkRequiredProperties()){a.error("Will not work without mentioned properties.");return}w();nt()}function w(){function n(){var i=$("<div>"),n=s.getValue("WRAPPER_CSS_CLASS");r.get("theme")&&r.get("theme")!==""&&(n+=" eac-"+r.get("theme"));r.get("cssClasses")&&r.get("cssClasses")!==""&&(n+=" "+r.get("cssClasses"));v.getTemplateClass()!==""&&(n+=" "+v.getTemplateClass());i.addClass(n);u.wrap(i);r.get("adjustWidth")===!0&&t()}function t(){var n=u.outerWidth();u.parent().css("width",n)}function i(){u.unwrap()}function o(){var n=$("<div>").addClass(s.getValue("CONTAINER_CLASS"));n.attr("id",b()).prepend($("<ul>")),function(){n.on("show.eac",function(){var t,i;switch(r.get("list").showAnimation.type){case"slide":t=r.get("list").showAnimation.time;i=r.get("list").showAnimation.callback;n.find("ul").slideDown(t,i);break;case"fade":t=r.get("list").showAnimation.time;i=r.get("list").showAnimation.callback;n.find("ul").fadeIn(t);i;break;default:n.find("ul").show()}r.get("list").onShowListEvent()}).on("hide.eac",function(){var t,i;switch(r.get("list").hideAnimation.type){case"slide":t=r.get("list").hideAnimation.time;i=r.get("list").hideAnimation.callback;n.find("ul").slideUp(t,i);break;case"fade":t=r.get("list").hideAnimation.time;i=r.get("list").hideAnimation.callback;n.find("ul").fadeOut(t,i);break;default:n.find("ul").hide()}r.get("list").onHideListEvent()}).on("selectElement.eac",function(){n.find("ul li").removeClass("selected");n.find("ul li").eq(f).addClass("selected");r.get("list").onSelectItemEvent()}).on("loadElements.eac",function(t,i,o){var w="",y=n.find("ul"),p,s,b,h,c,k;for(y.empty().detach(),e=[],p=0,s=0,b=i.length;s<b;s+=1)if(h=i[s].data,h.length!==0)for(i[s].header!==undefined&&i[s].header.length>0&&y.append("<div class='eac-category' >"+i[s].header+"<\/div>"),c=0,k=h.length;c<k&&p<i[s].maxListSize;c+=1)w=$("<li><div class='eac-item'><\/div><\/li>"),function(){var t=c,n=p,e=i[s].getValue(h[t]);w.find(" > div").on("click",function(){u.val(e).trigger("change");f=n;l(n);r.get("list").onClickEvent();r.get("list").onChooseEvent()}).on("mouseover",function(){f=n;l(n);r.get("list").onMouseOverEvent()}).on("mouseout",function(){r.get("list").onMouseOutEvent()}).html(v.build(a(e,o),h[t]))}(),y.append(w),e.push(h[c]),p+=1;n.append(y);r.get("list").onLoadEvent()})}();u.after(n)}function c(){u.next("."+s.getValue("CONTAINER_CLASS")).remove()}function a(n,t){return r.get("highlightPhrase")&&t!==""?p(n,t):n}function y(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function p(n,t){var i=y(t);return(n+"").replace(new RegExp("("+i+")","gi"),"<b>$1<\/b>")}u.parent().hasClass(s.getValue("WRAPPER_CSS_CLASS"))&&(c(),i());n();o();h=$("#"+b());r.get("placeholder")&&u.attr("placeholder",r.get("placeholder"))}function b(){var n=u.attr("id");return s.getValue("CONTAINER_ID")+n}function nt(){function n(){d("autocompleteOff",!0)&&b();t();i();s();h();v();w()}function t(){u.on("focusout",function(){var i=u.val(),n,t,o;for(r.get("list").match.caseSensitive||typeof i!="string"||(i=i.toLowerCase()),t=0,o=e.length;t<o;t+=1)if(n=r.get("getValue")(e[t]),n&&!r.get("list").match.caseSensitive&&(n=n.toLowerCase()),n===i){f=t;l(f);return}})}function i(){u.off("keyup").on("keyup",function(n){function i(n){function e(){var n={},t=r.get("ajaxSettings")||{};for(var i in t)n[i]=t[i];return n}function s(n,t){return r.get("matchResponseProperty")!==!1?typeof r.get("matchResponseProperty")=="string"?t[r.get("matchResponseProperty")]===n:typeof r.get("matchResponseProperty")=="function"?r.get("matchResponseProperty")(t)===n:!0:!0}var f,i,t;n.length<r.get("minCharNumber")||(r.get("data")!=="list-required"&&(f=r.get("data"),i=o.init(f),i=o.updateCategories(i,f),i=o.processData(i,n),k(i,n),u.parent().find("li").length>0?p():c()),t=e(),(t.url===undefined||t.url==="")&&(t.url=r.get("url")),(t.dataType===undefined||t.dataType==="")&&(t.dataType=r.get("dataType")),t.url!==undefined&&t.url!=="list-required"&&(t.url=t.url(n),t.data=r.get("preparePostData")(t.data,n),$.ajax(t).done(function(t){var i=o.init(t);i=o.updateCategories(i,t);i=o.convertXml(i);s(n,t)&&(i=o.processData(i,n),k(i,n));o.checkIfDataExists(i)&&u.parent().find("li").length>0?p():c();r.get("ajaxCallback")()}).fail(function(){a.warning("Fail to load response data")}).always(function(){})))}switch(n.keyCode){case 27:c();tt();break;case 38:n.preventDefault();e.length>0&&f>0&&(f-=1,u.val(r.get("getValue")(e[f])),l(f));break;case 40:n.preventDefault();e.length>0&&f<e.length-1&&(f+=1,u.val(r.get("getValue")(e[f])),l(f));break;default:if(n.keyCode>40||n.keyCode===8){var t=typeof MAIN=="undefined"?u.val():MAIN.searchBarClean(u.val());r.get("list").hideOnEmptyPhrase===!0&&n.keyCode===8&&t===""?c():r.get("requestDelay")>0?(y!==undefined&&clearTimeout(y),y=setTimeout(function(){i(t)},r.get("requestDelay"))):i(t)}}})}function s(){u.on("keydown",function(n){n=n||window.event;var t=n.keyCode;if(t===38)return suppressKeypress=!0,!1}).on("keydown",function(n){n.keyCode===13&&f>-1&&(u.val(r.get("getValue")(e[f])),r.get("list").onKeyEnterEvent(),r.get("list").onChooseEvent(),f=-1,c(),n.preventDefault())})}function h(){u.off("keypress")}function v(){u.on("focus",function(){u.val()!==""&&e.length>0&&(f=-1,p())})}function w(){u.on("blur",function(){setTimeout(function(){f=-1;c()},250)})}function b(){u.attr("autocomplete","off")}n()}function p(){h.trigger("show.eac")}function c(){h.trigger("hide.eac")}function l(n){h.trigger("selectElement.eac",n)}function k(n,t){h.trigger("loadElements.eac",[n,t])}function tt(){u.trigger("blur")}var s=new n.Constans,r=new n.Configuration(i),a=new n.Logger,v=new n.Template(i.template),o=new n.ListBuilderService(r,n.proccess),d=r.equals,u=t,h="",e=[],f=-1,y;n.consts=s;this.getConstants=function(){return s};this.getConfiguration=function(){return r};this.getContainer=function(){return h};this.getSelectedItemIndex=function(){return f};this.getItems=function(){return e};this.getItemData=function(n){return e.length<n||e[n]===undefined?-1:e[n]};this.getSelectedItemData=function(){return this.getItemData(f)};this.build=function(){w()};this.init=function(){g()}},n.eacHandles=[],n.getHandle=function(t){return n.eacHandles[t]},n.inputHasId=function(n){return $(n).attr("id")!==undefined&&$(n).attr("id").length>0?!0:!1},n.assignRandomId=function(t){var i="";do i="eac-"+Math.floor(Math.random()*1e4);while($("#"+i).length!==0);elementId=n.consts.getValue("CONTAINER_ID")+i;$(t).attr("id",i)},n.setHandle=function(t,i){n.eacHandles[i]=t},n}(EasyAutocomplete||{});(function(n){n.fn.easyAutocomplete=function(t){return this.each(function(){var i=n(this),r=new EasyAutocomplete.main(i,t);EasyAutocomplete.inputHasId(i)||EasyAutocomplete.assignRandomId(i);r.init();EasyAutocomplete.setHandle(r,i.attr("id"))})};n.fn.getSelectedItemIndex=function(){var t=n(this).attr("id");return t!==undefined?EasyAutocomplete.getHandle(t).getSelectedItemIndex():-1};n.fn.getItems=function(){var t=n(this).attr("id");return t!==undefined?EasyAutocomplete.getHandle(t).getItems():-1};n.fn.getItemData=function(t){var i=n(this).attr("id");return i!==undefined&&t>-1?EasyAutocomplete.getHandle(i).getItemData(t):-1};n.fn.getSelectedItemData=function(){var t=n(this).attr("id");return t!==undefined?EasyAutocomplete.getHandle(t).getSelectedItemData():-1}})(jQuery);var imagingThumbClassName=imagingThumbClassName||"imagingThumb",strImagingThumbClassName=imagingThumbClassName==""?"":"."+imagingThumbClassName,imagingTickBoxClassName=imagingTickBoxClassName||"imagingTickBox",strImagingTickBoxClassName=imagingTickBoxClassName==""?"":"."+imagingTickBoxClassName,imagingFilesizeClassName=imagingFilesizeClassName||"imagingFilesize",imagingSelectAllClassName=imagingSelectAllClassName||"imagingSelectAll";jQuery.fn.applyTooltipToItems=function(){return this.each(function(){var t=$(this),n=$(".jq-thumbTooltipTemplate:first").clone().removeClass("jq-thumbTooltipTemplate"),r=t.data("tooltip")||t.prop("title")||"",i;r!==""&&n.length!==0&&(i=$(".jq-content:first",n),i.length===0&&(i=n),i.html(r),t.removeData("tooltip").removeAttr("title").after(n),toolTips.toolTip(t,n))}),this};$(function(){$("div"+strImagingTickBoxClassName+" input:checkbox").on("click",function(){$(this).siblings("input:checkbox").attr("checked",!1)});jQuery.fn.updateZipSize=function(){return this.each(function(){var n=0,t;jQuery(this).find("input:checkbox").each(function(){this.checked&&(n+=jQuery(this).data("filesize"))});t=n>12e5||n==0?(n/1048576).toFixed(0)+"MB":n>1024?(n/1024).toFixed(0)+"kB":"1kB";jQuery(this).find("."+imagingFilesizeClassName).html(t);n==0?$(this).find("div."+imagingSelectAllClassName).children("a:last").hide().siblings("a:first").show():$(this).find("div."+imagingSelectAllClassName).children("a:first").hide().siblings("a:last").show()}),this};$("form").each(function(){$(this).updateZipSize().find("input:checkbox").on("click",function(){$(this.form).updateZipSize()})});$("div."+imagingSelectAllClassName).children("a:last").on("click",function(){return $(this).closest("form").find("input:checkbox").each(function(){this.checked=!1}),$(this).closest("form").updateZipSize(),!1});$("div."+imagingSelectAllClassName).children("a:first").on("click",function(){return $(this).closest("form").find("input:checkbox[id^=a]").each(function(){this.checked=!0}),$(this).closest("form").updateZipSize(),!1})}),function(n,t,i){n.fn.miniTwitter=function(t){function h(){return n.ajax({url:c(),dataType:"jsonp"})}function c(){var n="https:"==i.location.protocol?"https:":"http:",t=r.max===null?r.limit:r.max,u;return r.favorite?n+"//api.twitter.com/favorites/"+r.username[0]+".json?page="+r.page+"&count="+t+"&include_entities=1&callback=?":r.list?n+"//api.twitter.com/1/"+r.username[0]+"/lists/"+r.list+"/statuses.json?page="+r.page+"&per_page="+t+"&include_entities=1&callback=?":r.query===null&&r.username.length==1?n+"//api.twitter.com/1/statuses/user_timeline.json?screen_name="+r.username[0]+"&count="+t+(r.retweet?"&include_rts=1":"")+"&page="+r.page+"&include_entities=1&callback=?":(u=r.query||"from:"+r.username.join(" OR from:"),n+"//search.twitter.com/search.json?&q="+encodeURIComponent(u)+"&rpp="+t+"&page="+r.page+"&include_entities=1&callback=?")}function e(n){return Date.parse(n.replace(/^([a-z]{3})( [a-z]{3} \d\d?)(.*)( \d{4})$/i,"$1,$2$4$3"))}function l(n){var t=(new Date).getTime()-e(n),i=new Date(e(n));return t>864e5?t=i.getDate()+" "+["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][i.getMonth()]:t>36e5?t=parseInt(t/36e5)+"h":t>6e4?t=parseInt(t/6e4)+"m":t>1e3&&(t=parseInt(t/1e3)+"s"),t}function o(t,i){return function(){var r=[];return this.each(function(){r.push(this.replace(t,i))}),n(r)}}function s(n){return n.replace(/</g,"&lt;").replace(/>/g,"^&gt;")}function u(){return r.nofollow?'rel="nofollow"':""}function f(){return r.blank?'target="_blank"':""}function a(n,t){return n.replace(/(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w-]+@([\w][\w\-]+\.)+[a-zA-Z]{2,3})/g,function(n){for(var i,r=/^[a-z]+:/i.test(n)?n:"http://"+n,o=n,e=0;e<t.length;++e)if(i=t[e],i.url==r&&i.expanded_url){r=i.expanded_url;o=i.display_url;break}return"<a "+u()+" "+f()+' href="'+s(r)+'">'+s(o)+"<\/a>"})}function v(t){var i={};return i.text=t.text,i.tweetId=t.id_str,i.tweetUrl=i.userUrl+"/status/"+i.tweetId,i.retweet=typeof t.retweeted_status!="undefined",i.screenName=i.retweet?t.retweeted_status.user.screen_name:t.from_user||t.user.screen_name,i.realName=i.retweet?t.retweeted_status.user.name:t.from_user_name||t.user.name,i.userUrl=i.retweet?"http://twitter.com/"+t.retweeted_status.user.screen_name:"http://twitter.com/"+i.screenName,i.tweetTime=l(t.created_at),i.image=i.retweet?t.retweeted_status.user.profile_image_url:t.profile_image_url||t.user.profile_image_url,i.replyUrl="http://twitter.com/intent/tweet?in_reply_to="+r.tweetId,i.retweetUrl="http://twitter.com/intent/retweet?tweet_id="+r.tweetId,i.favoriteUrl="http://twitter.com/intent/favorite?tweet_id="+r.tweetId,i.entities=t.entities?(t.entities.urls||[]).concat(t.entities.media||[]):[],i.retweetScreenName=i.retweet&&t.retweeted_status.user.screen_name,i.retweetName=i.retweet&&t.retweeted_status.user.name,i.writeTweet=i.retweet?t.retweeted_status.text:t.text,i.finalText=n([a(i.writeTweet,i.entities)]).linkUser().linkHash()[0],i.header='<div class="mt_header"> <a '+u()+" "+f()+' class="mt_user" href="'+i.userUrl+'">'+i.realName+'<\/a> <span class="mt_screen_name">@'+i.screenName+'<\/span> <div class="time">'+i.tweetTime+"<\/div><\/div>",i.avatar='<div class="tweet"><div class="avatar"><a '+u()+" "+f()+' class="mt_avatar" href="'+i.userUrl+'"><img src="'+i.image+'" alt="'+i.realName+'\'s avatar" border="0"/><\/a><\/div>',i.textTweet='<div class="mt_text">'+i.finalText+"<\/div>",i.footer=i.retweet?'<div class="mt_footer"><span class="image_r"><\/span>Retweeted by <a '+u()+" "+f()+' class="mt_retweet" href="http://twitter.com/'+t.user.screen_name+'">'+t.user.name+'<\/a><\/div><div style="clear:both;"><\/div><\/div>':'<div class="mt_footer"><\/div><div style="clear:both;"><\/div><\/div>',i}function y(t){h().done(function(i){tweets=n.map(i.results||i,function(n){return v(n)});for(var r=0;r<tweets.length;r++)n(t).append(tweets[r].avatar+tweets[r].header+tweets[r].textTweet+tweets[r].footer)})}var r=n.extend({username:["webdevdesigner"],list:null,favorite:!1,query:null,limit:5,max:null,page:1,retweet:!0,refresh:null,linkColor:null,nofollow:!0,blank:!0,tweetId:0},t);return n.fn.extend({linkUser:o(/(^|[\W])@(\w+)/gi,"$1<a "+u()+" "+f()+' href="http://twitter.com/$2">@$2<\/a>'),linkHash:o(/(?:^| )[\#]+([\w\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u00ff\u0600-\u06ff]+)/gi," <a "+u()+" "+f()+' href="http://search.twitter.com/search?q=&tag=$1&lang=all">#$1<\/a>')}),this.each(function(n,i){typeof t=="string"&&(r.username=[t]);r.username&&typeof r.username=="string"&&(r.username=[r.username]);y(i);r.refresh!=null})}}(jQuery,window,document);jQuery.fn.outerHTML=function(){return jQuery("<div />").append(this.eq(0).clone()).html()},function(n){n.fn.tipTip=function(t){var e={activation:"hover",keepAlive:!1,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:!1,enter:function(){},exit:function(){}},i=n.extend(e,t);if(n("#tiptip_holder").length<=0){var r=n('<div id="tiptip_holder" style="max-width:'+i.maxWidth+';"><\/div>'),f=n('<div id="tiptip_content"><\/div>'),u=n('<div id="tiptip_arrow"><\/div>');n("body").append(r.html(f).prepend(u.html('<div id="tiptip_arrow_inner"><\/div>')))}else var r=n("#tiptip_holder"),f=n("#tiptip_content"),u=n("#tiptip_arrow");return this.each(function(){var t=n(this),o,e;if(o=i.content?i.content:t.attr(i.attribute),o!=""){i.content||t.removeAttr(i.attribute);e=!1;i.activation=="hover"?(t.hover(function(){h()},function(){i.keepAlive||s()}),i.keepAlive&&r.hover(function(){},function(){s()})):i.activation=="focus"?t.focus(function(){h()}).blur(function(){s()}):i.activation=="click"&&(t.click(function(){return h(),!1}).hover(function(){},function(){i.keepAlive||s()}),i.keepAlive&&r.hover(function(){},function(){s()}));function h(){var nt,tt,k,d;i.enter.call(this);f.html(o);r.hide().removeAttr("class").css("margin","0");u.removeAttr("style");var c=parseInt(t.offset().top),a=parseInt(t.offset().left),it=parseInt(t.outerWidth()),y=parseInt(t.outerHeight()),v=r.outerWidth(),l=r.outerHeight(),b=Math.round((it-v)/2),rt=Math.round((y-l)/2),p=Math.round(a+b),h=Math.round(c+y+i.edgeOffset),s="",w="",g=Math.round(v-12)/2;i.defaultPosition=="bottom"?s="_bottom":i.defaultPosition=="top"?s="_top":i.defaultPosition=="left"?s="_left":i.defaultPosition=="right"&&(s="_right");nt=b+a<parseInt(n(window).scrollLeft());tt=v+a>parseInt(n(window).width());nt&&b<0||s=="_right"&&!tt||s=="_left"&&a<v+i.edgeOffset+5?(s="_right",w=Math.round(l-13)/2,g=-12,p=Math.round(a+it+i.edgeOffset),h=Math.round(c+rt)):(tt&&b<0||s=="_left"&&!nt)&&(s="_left",w=Math.round(l-13)/2,g=Math.round(v),p=Math.round(a-(v+i.edgeOffset+5)),h=Math.round(c+rt));k=c+y+i.edgeOffset+l+8>parseInt(n(window).height()+n(window).scrollTop());d=c+y-(i.edgeOffset+l+8)<0;k||s=="_bottom"&&k||s=="_top"&&!d?(s=s=="_top"||s=="_bottom"?"_top":s+"_top",w=l,h=Math.round(c-(l+5+i.edgeOffset))):(d|(s=="_top"&&d)||s=="_bottom"&&!k)&&(s=s=="_top"||s=="_bottom"?"_bottom":s+"_bottom",w=-12,h=Math.round(c+y+i.edgeOffset));s=="_right_top"||s=="_left_top"?h=h+5:(s=="_right_bottom"||s=="_left_bottom")&&(h=h-5);(s=="_left_top"||s=="_left_bottom")&&(p=p+5);u.css({"margin-left":g+"px","margin-top":w+"px"});r.css({"margin-left":p+"px","margin-top":h+"px"}).attr("class","tip"+s);e&&clearTimeout(e);e=setTimeout(function(){r.stop(!0,!0).fadeIn(i.fadeIn)},i.delay)}function s(){i.exit.call(this);e&&clearTimeout(e);r.fadeOut(i.fadeOut)}}})}}(jQuery),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):n(jQuery)}(function(n){function o(i,r,f,o){var s={data:o||o===0||o===!1?o:r?r.data:{},_wrap:r?r._wrap:null,tmpl:null,parent:r||null,nodes:[],calls:d,nest:g,wrap:nt,html:tt,update:it};return i&&n.extend(s,i,{nodes:[],parent:r}),f&&(s.tmpl=f,s._ctnt=s._ctnt||s.tmpl(n,s),s.key=++e,(c.length?u:t)[e]=s),s}function s(t,i,u){var f,e=u?n.map(u,function(n){return typeof n=="string"?t.key?n.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+r+'="'+t.key+'" $2'):n:s(n,t,n._ctnt)}):t;return i?e:(e=e.join(""),e.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(t,i,r,u){f=n(r).get();b(f);i&&(f=l(i).concat(f));u&&(f=f.concat(l(u)))}),f?f:l(e))}function l(t){var i=document.createElement("div");return i.innerHTML=t,n.makeArray(i.childNodes)}function p(t){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+t.trim().replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(t,i,r,u,f,e,o){var c=n.tmpl.tag[r],l,s,a;if(!c)throw"Unknown template tag: "+r;return l=c._default||[],e&&!/\w$/.test(f)&&(f+=e,e=""),f?(f=h(f),o=o?","+h(o)+")":e?")":"",s=e?f.indexOf(".")>-1?f+h(e):"("+f+").call($item"+o:f,a=e?s:"(typeof("+f+")==='function'?("+f+").call($item):("+f+"))"):a=s=l.$1||"null",u=h(u),"');"+c[i?"close":"open"].split("$notnull_1").join(f?"typeof("+f+")!=='undefined' && ("+f+")!=null":"true").split("$1a").join(a).split("$1").join(s).split("$2").join(u||l.$2||"")+"__.push('"})+"');}return __;")}function w(t,i){t._wrap=s(t,!0,Array.isArray(i)?i:[v.test(i)?i:n(i).html()]).join("")}function h(n){return n?n.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function k(n){var t=document.createElement("div");return t.appendChild(n.cloneNode(!0)),t.innerHTML}function b(f){function p(f){function p(n){n=n+a;s=v[n]=v[n]||o(s,t[s.parent.key+a]||s.parent)}var y,h=f,c,s,l;if(l=f.getAttribute(r)){while(h.parentNode&&(h=h.parentNode).nodeType===1&&!(y=h.getAttribute(r)));y!==l&&(h=h.parentNode?h.nodeType===11?0:h.getAttribute(r)||0:0,(s=t[l])||(s=u[l],s=o(s,t[h]||u[h]),s.key=++e,t[e]=s),i&&p(l));f.removeAttribute(r)}else i&&(s=n.data(f,"tmplItem"))&&(p(s.key),t[s.key]=s,h=n.data(f.parentNode,"tmplItem"),h=h?h.key:0);if(s){for(c=s;c&&c.key!=h;)c.nodes.push(f),c=c.parent;delete s._ctnt;delete s._wrap;n.data(f,"tmplItem",s)}}for(var a="_"+i,c,l,v={},h,s=0,y=f.length;s<y;s++)if((c=f[s]).nodeType===1){for(l=c.getElementsByTagName("*"),h=l.length-1;h>=0;h--)p(l[h]);p(c)}}function d(n,t,i,r){if(!n)return c.pop();c.push({_:n,tmpl:t,item:this,data:i,options:r})}function g(t,i,r){return n.tmpl(n.template(t),i,r,this)}function nt(t,i){var r=t.options||{};return r.wrapped=i,n.tmpl(n.template(t.tmpl),t.data,r,t.item)}function tt(t,i){var r=this._wrap;return n.map(n(Array.isArray(r)?r.join(""):r).filter(t||"*"),function(n){return i?n.innerText||n.textContent:n.outerHTML||k(n)})}function it(){var t=this.nodes;n.tmpl(null,null,null,this).insertBefore(t[0]);n(t).remove()}var a=n.fn.domManip,r="_tmplitem",v=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,t={},u={},f,y={key:0,data:{}},e=0,i=0,c=[];n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(r,u){n.fn[r]=function(e){var o=[],h=n(e),c,s,a,v,l=this.length===1&&this[0].parentNode;if(f=t||{},l&&l.nodeType===11&&l.childNodes.length===1&&h.length===1)h[u](this[0]),o=this;else{for(s=0,a=h.length;s<a;s++)i=s,c=(s>0?this.clone(!0):this).get(),n(h[s])[u](c),o=o.concat(c);i=0;o=this.pushStack(o,r,h.selector)}return v=f,f=null,n.tmpl.complete(v),o}});n.fn.extend({tmpl:function(t,i,r){return n.tmpl(this[0],t,i,r)},tmplItem:function(){return n.tmplItem(this[0])},template:function(t){return n.template(t,this[0])},domManip:function(r,u,e){if(r[0]&&Array.isArray(r[0])){for(var o=n.makeArray(arguments),s=r[0],l=s.length,h=0,c;h<l&&!(c=n.data(s[h++],"tmplItem")););c&&i&&(o[2]=function(t){n.tmpl.afterManip(this,t,e)});a.apply(this,o)}else a.apply(this,arguments);return i=0,f||n.tmpl.complete(t),this}});n.extend({tmpl:function(i,r,f,e){var h,c=!e;if(c)e=y,i=n.template[i]||n.template(null,i),u={};else if(!i)return i=e.tmpl,t[e.key]=e,e.nodes=[],e.wrapped&&w(e,e.wrapped),n(s(e,null,e.tmpl(n,e)));return i?(typeof r=="function"&&(r=r.call(e||{})),f&&f.wrapped&&w(f,f.wrapped),h=Array.isArray(r)?n.map(r,function(n){return n?o(f,e,i,n):null}):[o(f,e,i,r)],c?n(s(e,null,h)):h):[]},tmplItem:function(t){var i;for(t instanceof n&&(t=t[0]);t&&t.nodeType===1&&!(i=n.data(t,"tmplItem"))&&(t=t.parentNode););return i||y},template:function(t,i){return i?(typeof i=="string"?i=p(i):i instanceof n&&(i=i[0]||{}),i.nodeType&&(i=n.data(i,"tmpl")||n.data(i,"tmpl",p(i.innerHTML))),typeof t=="string"?n.template[t]=i:i):t?typeof t!="string"?n.template(null,t):n.template[t]||n.template(null,v.test(t)?t:n(t)):null},encode:function(n){return(""+n).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});n.extend(n.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(){t={}},afterManip:function(t,r,u){var f=r.nodeType===11?n.makeArray(r.childNodes):r.nodeType===1?[r]:[];u.call(t,r);b(f);i++}})}),function(n){var t,r,i;typeof define=="function"&&define.amd&&(define(n),t=!0);typeof exports=="object"&&(module.exports=n(),t=!0);t||(r=window.Cookies,i=window.Cookies=n(),i.noConflict=function(){return window.Cookies=r,i})}(function(){function n(){for(var n=0,r={},t,i;n<arguments.length;n++){t=arguments[n];for(i in t)r[i]=t[i]}return r}function t(n){return n.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function i(r){function u(){}function f(t,i,f){var s,o,e;if(typeof document!="undefined"){f=n({path:"/"},u.defaults,f);typeof f.expires=="number"&&(f.expires=new Date(new Date*1+f.expires*864e5));f.expires=f.expires?f.expires.toUTCString():"";try{s=JSON.stringify(i);/^[\{\[]/.test(s)&&(i=s)}catch(h){}i=r.write?r.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent);t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);o="";for(e in f)f[e]&&(o+="; "+e,f[e]!==!0)&&(o+="="+f[e].split(";")[0]);return document.cookie=t+"="+i+o}}function e(n,i){var s,u,f;if(typeof document!="undefined"){for(var e={},h=document.cookie?document.cookie.split("; "):[],o=0;o<h.length;o++){s=h[o].split("=");u=s.slice(1).join("=");i||u.charAt(0)!=='"'||(u=u.slice(1,-1));try{if(f=t(s[0]),u=(r.read||r)(u,f)||t(u),i)try{u=JSON.parse(u)}catch(c){}if(e[f]=u,n===f)break}catch(c){}}return n?e[n]:e}}return u.set=f,u.get=function(n){return e(n,!1)},u.getJSON=function(n){return e(n,!0)},u.remove=function(t,i){f(t,"",n(i,{expires:-1}))},u.defaults={},u.withConverter=i,u}return i(function(){})});typeof JSON!="object"&&(JSON={}),function(){"use strict";function i(n){return n<10?"0"+n:n}function o(n){return e.lastIndex=0,e.test(n)?'"'+n.replace(e,function(n){var t=s[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function u(i,f){var s,l,h,a,v=n,c,e=f[i];e&&typeof e=="object"&&typeof e.toJSON=="function"&&(e=e.toJSON(i));typeof t=="function"&&(e=t.call(f,i,e));switch(typeof e){case"string":return o(e);case"number":return isFinite(e)?String(e):"null";case"boolean":case"null":return String(e);case"object":if(!e)return"null";if(n+=r,c=[],Object.prototype.toString.apply(e)==="[object Array]"){for(a=e.length,s=0;s<a;s+=1)c[s]=u(s,e)||"null";return h=c.length===0?"[]":n?"[\n"+n+c.join(",\n"+n)+"\n"+v+"]":"["+c.join(",")+"]",n=v,h}if(t&&typeof t=="object")for(a=t.length,s=0;s<a;s+=1)typeof t[s]=="string"&&(l=t[s],h=u(l,e),h&&c.push(o(l)+(n?": ":":")+h));else for(l in e)Object.prototype.hasOwnProperty.call(e,l)&&(h=u(l,e),h&&c.push(o(l)+(n?": ":":")+h));return h=c.length===0?"{}":n?"{\n"+n+c.join(",\n"+n)+"\n"+v+"}":"{"+c.join(",")+"}",n=v,h}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var f=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,r,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t;typeof JSON.stringify!="function"&&(JSON.stringify=function(i,f,e){var o;if(n="",r="",typeof e=="number")for(o=0;o<e;o+=1)r+=" ";else typeof e=="string"&&(r=e);if(t=f,f&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw new Error("JSON.stringify");return u("",{"":i})});typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(n,t){var r,u,i=n[t];if(i&&typeof i=="object")for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(u=walk(i,r),u!==undefined?i[r]=u:delete i[r]);return reviver.call(n,t,i)}var j;if(text=String(text),f.lastIndex=0,f.test(text)&&(text=text.replace(f,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse");})}(),function(n,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):n.moment=t()}(this,function(){"use strict";function t(){return uf.apply(null,arguments)}function ys(n){uf=n}function at(n){return n instanceof Array||Object.prototype.toString.call(n)==="[object Array]"}function vi(n){return n!=null&&Object.prototype.toString.call(n)==="[object Object]"}function ps(n){for(var t in n)return!1;return!0}function yi(n){return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}function ff(n,t){for(var r=[],i=0;i<n.length;++i)r.push(t(n[i],i));return r}function l(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function vt(n,t){for(var i in t)l(t,i)&&(n[i]=t[i]);return l(t,"toString")&&(n.toString=t.toString),l(t,"valueOf")&&(n.valueOf=t.valueOf),n}function rt(n,t,i,r){return so(n,t,i,r,!0).utc()}function ws(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function u(n){return n._pf==null&&(n._pf=ws()),n._pf}function pr(n){if(n._isValid==null){var t=u(n),r=ef.call(t.parsedDateParts,function(n){return n!=null}),i=!isNaN(n._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(n._strict&&(i=i&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===undefined),Object.isFrozen!=null&&Object.isFrozen(n))return i;n._isValid=i}return n._isValid}function pi(n){var t=rt(NaN);return n!=null?vt(u(t),n):u(t).userInvalidated=!0,t}function b(n){return n===void 0}function wr(n,t){var f,i,r;if(b(t._isAMomentObject)||(n._isAMomentObject=t._isAMomentObject),b(t._i)||(n._i=t._i),b(t._f)||(n._f=t._f),b(t._l)||(n._l=t._l),b(t._strict)||(n._strict=t._strict),b(t._tzm)||(n._tzm=t._tzm),b(t._isUTC)||(n._isUTC=t._isUTC),b(t._offset)||(n._offset=t._offset),b(t._pf)||(n._pf=u(t)),b(t._locale)||(n._locale=t._locale),wi.length>0)for(f in wi)i=wi[f],r=t[i],b(r)||(n[i]=r);return n}function si(n){wr(this,n);this._d=new Date(n._d!=null?n._d.getTime():NaN);bi===!1&&(bi=!0,t.updateOffset(this),bi=!1)}function yt(n){return n instanceof si||n!=null&&n._isAMomentObject!=null}function k(n){return n<0?Math.ceil(n)||0:Math.floor(n)}function f(n){var t=+n,i=0;return t!==0&&isFinite(t)&&(i=k(t)),i}function of(n,t,i){for(var e=Math.min(n.length,t.length),o=Math.abs(n.length-t.length),u=0,r=0;r<e;r++)(i&&n[r]!==t[r]||!i&&f(n[r])!==f(t[r]))&&u++;return u+o}function sf(n){t.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+n)}function d(n,i){var r=!0;return vt(function(){var e,u,f,o;if(t.deprecationHandler!=null&&t.deprecationHandler(null,n),r){for(e=[],f=0;f<arguments.length;f++){if(u="",typeof arguments[f]=="object"){u+="\n["+f+"] ";for(o in arguments[0])u+=o+": "+arguments[0][o]+", ";u=u.slice(0,-2)}else u=arguments[f];e.push(u)}sf(n+"\nArguments: "+Array.prototype.slice.call(e).join("")+"\n"+(new Error).stack);r=!1}return i.apply(this,arguments)},i)}function kr(n,i){t.deprecationHandler!=null&&t.deprecationHandler(n,i);br[n]||(sf(i),br[n]=!0)}function et(n){return n instanceof Function||Object.prototype.toString.call(n)==="[object Function]"}function bs(n){var t;for(var i in n)t=n[i],et(t)?this[i]=t:this["_"+i]=t;this._config=n;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function hf(n,t){var r=vt({},n);for(var i in t)l(t,i)&&(vi(n[i])&&vi(t[i])?(r[i]={},vt(r[i],n[i]),vt(r[i],t[i])):t[i]!=null?r[i]=t[i]:delete r[i]);for(i in n)l(n,i)&&!l(t,i)&&vi(n[i])&&(r[i]=vt({},r[i]));return r}function dr(n){n!=null&&this.set(n)}function ks(n,t,i){var r=this._calendar[n]||this._calendar.sameElse;return et(r)?r.call(t,i):r}function ds(n){var t=this._longDateFormat[n],i=this._longDateFormat[n.toUpperCase()];return t||!i?t:(this._longDateFormat[n]=i.replace(/MMMM|MM|DD|dddd/g,function(n){return n.slice(1)}),this._longDateFormat[n])}function gs(){return this._invalidDate}function nh(n){return this._ordinal.replace("%d",n)}function th(n,t,i,r){var u=this._relativeTime[i];return et(u)?u(n,t,i,r):u.replace(/%d/i,n)}function ih(n,t){var i=this._relativeTime[n>0?"future":"past"];return et(i)?i(t):i.replace(/%s/i,t)}function p(n,t){var i=n.toLowerCase();ri[i]=ri[i+"s"]=ri[t]=n}function g(n){return typeof n=="string"?ri[n]||ri[n.toLowerCase()]:undefined}function gr(n){var r={},t;for(var i in n)l(n,i)&&(t=g(i),t&&(r[t]=n[i]));return r}function w(n,t){nu[n]=t}function rh(n){var t=[];for(var i in n)t.push({unit:i,priority:nu[i]});return t.sort(function(n,t){return n.priority-t.priority}),t}function ui(n,i){return function(r){return r!=null?(bf(this,n,r),t.updateOffset(this,i),this):ki(this,n)}}function ki(n,t){return n.isValid()?n._d["get"+(n._isUTC?"UTC":"")+t]():NaN}function bf(n,t,i){n.isValid()&&n._d["set"+(n._isUTC?"UTC":"")+t](i)}function uh(n){return(n=g(n),et(this[n]))?this[n]():this}function fh(n,t){var r,i;if(typeof n=="object")for(n=gr(n),r=rh(n),i=0;i<r.length;i++)this[r[i].unit](n[r[i].unit]);else if(n=g(n),et(this[n]))return this[n](t);return this}function ot(n,t,i){var r=""+Math.abs(n),u=t-r.length,f=n>=0;return(f?i?"+":"":"-")+Math.pow(10,Math.max(0,u)).toString().substr(1)+r}function r(n,t,i,r){var u=r;typeof r=="string"&&(u=function(){return this[r]()});n&&(fi[n]=u);t&&(fi[t[0]]=function(){return ot(u.apply(this,arguments),t[1],t[2])});i&&(fi[i]=function(){return this.localeData().ordinal(u.apply(this,arguments),n)})}function eh(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function oh(n){for(var t=n.match(kf),i=0,r=t.length;i<r;i++)t[i]=fi[t[i]]?fi[t[i]]:eh(t[i]);return function(i){for(var f="",u=0;u<r;u++)f+=t[u]instanceof Function?t[u].call(i,n):t[u];return f}}function iu(n,t){return n.isValid()?(t=df(t,n.localeData()),tu[t]=tu[t]||oh(t),tu[t](n)):n.localeData().invalidDate()}function df(n,t){function r(n){return t.longDateFormat(n)||n}var i=5;for(di.lastIndex=0;i>=0&&di.test(n);)n=n.replace(di,r),di.lastIndex=0,i-=1;return n}function i(n,t,i){fu[n]=et(t)?t:function(n){return n&&i?i:t}}function sh(n,t){return l(fu,n)?fu[n](t._strict,t._locale):new RegExp(hh(n))}function hh(n){return dt(n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,t,i,r,u){return t||i||r||u}))}function dt(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function s(n,t){var i,r=t;for(typeof n=="string"&&(n=[n]),typeof t=="number"&&(r=function(n,i){i[t]=f(n)}),i=0;i<n.length;i++)ur[n[i]]=r}function ci(n,t){s(n,function(n,i,r,u){r._w=r._w||{};t(n,r._w,r,u)})}function ch(n,t,i){t!=null&&l(ur,n)&&ur[n](t,i._a,i,n)}function eu(n,t){return new Date(Date.UTC(n,t+1,0)).getUTCDate()}function vh(n,t){return n?at(this._months)?this._months[n.month()]:this._months[(this._months.isFormat||ou).test(t)?"format":"standalone"][n.month()]:this._months}function yh(n,t){return n?at(this._monthsShort)?this._monthsShort[n.month()]:this._monthsShort[ou.test(t)?"format":"standalone"][n.month()]:this._monthsShort}function ph(n,t,i){var u,r,e,f=n.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],u=0;u<12;++u)e=rt([2e3,u]),this._shortMonthsParse[u]=this.monthsShort(e,"").toLocaleLowerCase(),this._longMonthsParse[u]=this.months(e,"").toLocaleLowerCase();return i?t==="MMM"?(r=v.call(this._shortMonthsParse,f),r!==-1?r:null):(r=v.call(this._longMonthsParse,f),r!==-1?r:null):t==="MMM"?(r=v.call(this._shortMonthsParse,f),r!==-1)?r:(r=v.call(this._longMonthsParse,f),r!==-1?r:null):(r=v.call(this._longMonthsParse,f),r!==-1)?r:(r=v.call(this._shortMonthsParse,f),r!==-1?r:null)}function wh(n,t,i){var r,u,f;if(this._monthsParseExact)return ph.call(this,n,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if((u=rt([2e3,r]),i&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(u,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(u,"").replace(".","")+"$","i")),i||this._monthsParse[r]||(f="^"+this.months(u,"")+"|^"+this.monthsShort(u,""),this._monthsParse[r]=new RegExp(f.replace(".",""),"i")),i&&t==="MMMM"&&this._longMonthsParse[r].test(n))||i&&t==="MMM"&&this._shortMonthsParse[r].test(n)||!i&&this._monthsParse[r].test(n))return r}function ee(n,t){var i;if(!n.isValid())return n;if(typeof t=="string")if(/^\d+$/.test(t))t=f(t);else if(t=n.localeData().monthsParse(t),typeof t!="number")return n;return i=Math.min(n.date(),eu(n.year(),t)),n._d["set"+(n._isUTC?"UTC":"")+"Month"](t,i),n}function oe(n){return n!=null?(ee(this,n),t.updateOffset(this,!0),this):ki(this,"Month")}function bh(){return eu(this.year(),this.month())}function kh(n){return this._monthsParseExact?(l(this,"_monthsRegex")||ce.call(this),n?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=se),this._monthsShortStrictRegex&&n?this._monthsShortStrictRegex:this._monthsShortRegex)}function dh(n){return this._monthsParseExact?(l(this,"_monthsRegex")||ce.call(this),n?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=he),this._monthsStrictRegex&&n?this._monthsStrictRegex:this._monthsRegex)}function ce(){function f(n,t){return t.length-n.length}for(var i=[],r=[],t=[],u,n=0;n<12;n++)u=rt([2e3,n]),i.push(this.monthsShort(u,"")),r.push(this.months(u,"")),t.push(this.months(u,"")),t.push(this.monthsShort(u,""));for(i.sort(f),r.sort(f),t.sort(f),n=0;n<12;n++)i[n]=dt(i[n]),r[n]=dt(r[n]);for(n=0;n<24;n++)t[n]=dt(t[n]);this._monthsRegex=new RegExp("^("+t.join("|")+")","i");this._monthsShortRegex=this._monthsRegex;this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i");this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function li(n){return le(n)?366:365}function le(n){return n%4==0&&n%100!=0||n%400==0}function gh(){return le(this.year())}function nc(n,t,i,r,u,f,e){var o=new Date(n,t,i,r,u,f,e);return n<100&&n>=0&&isFinite(o.getFullYear())&&o.setFullYear(n),o}function fr(n){var t=new Date(Date.UTC.apply(null,arguments));return n<100&&n>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(n),t}function er(n,t,i){var r=7+t-i,u=(7+fr(n,0,r).getUTCDay()-t)%7;return-u+r-1}function ae(n,t,i,r,u){var s=(7+i-r)%7,h=er(n,r,u),f=1+7*(t-1)+s+h,e,o;return f<=0?(e=n-1,o=li(e)+f):f>li(n)?(e=n+1,o=f-li(n)):(e=n,o=f),{year:e,dayOfYear:o}}function ai(n,t,i){var e=er(n.year(),t,i),r=Math.floor((n.dayOfYear()-e-1)/7)+1,f,u;return r<1?(u=n.year()-1,f=r+ni(u,t,i)):r>ni(n.year(),t,i)?(f=r-ni(n.year(),t,i),u=n.year()+1):(u=n.year(),f=r),{week:f,year:u}}function ni(n,t,i){var r=er(n,t,i),u=er(n+1,t,i);return(li(n)-r+u)/7}function tc(n){return ai(n,this._week.dow,this._week.doy).week}function ic(){return this._week.dow}function rc(){return this._week.doy}function uc(n){var t=this.localeData().week(this);return n==null?t:this.add((n-t)*7,"d")}function fc(n){var t=ai(this,1,4).week;return n==null?t:this.add((n-t)*7,"d")}function ec(n,t){return typeof n!="string"?n:isNaN(n)?(n=t.weekdaysParse(n),typeof n=="number")?n:null:parseInt(n,10)}function oc(n,t){return typeof n=="string"?t.weekdaysParse(n)%7||7:isNaN(n)?null:n}function sc(n,t){return n?at(this._weekdays)?this._weekdays[n.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][n.day()]:this._weekdays}function hc(n){return n?this._weekdaysShort[n.day()]:this._weekdaysShort}function cc(n){return n?this._weekdaysMin[n.day()]:this._weekdaysMin}function lc(n,t,i){var f,r,e,u=n.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)e=rt([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(e,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(e,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(e,"").toLocaleLowerCase();return i?t==="dddd"?(r=v.call(this._weekdaysParse,u),r!==-1?r:null):t==="ddd"?(r=v.call(this._shortWeekdaysParse,u),r!==-1?r:null):(r=v.call(this._minWeekdaysParse,u),r!==-1?r:null):t==="dddd"?(r=v.call(this._weekdaysParse,u),r!==-1)?r:(r=v.call(this._shortWeekdaysParse,u),r!==-1)?r:(r=v.call(this._minWeekdaysParse,u),r!==-1?r:null):t==="ddd"?(r=v.call(this._shortWeekdaysParse,u),r!==-1)?r:(r=v.call(this._weekdaysParse,u),r!==-1)?r:(r=v.call(this._minWeekdaysParse,u),r!==-1?r:null):(r=v.call(this._minWeekdaysParse,u),r!==-1)?r:(r=v.call(this._weekdaysParse,u),r!==-1)?r:(r=v.call(this._shortWeekdaysParse,u),r!==-1?r:null)}function ac(n,t,i){var r,u,f;if(this._weekdaysParseExact)return lc.call(this,n,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++)if((u=rt([2e3,1]).day(r),i&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(u,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(u,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(u,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(f="^"+this.weekdays(u,"")+"|^"+this.weekdaysShort(u,"")+"|^"+this.weekdaysMin(u,""),this._weekdaysParse[r]=new RegExp(f.replace(".",""),"i")),i&&t==="dddd"&&this._fullWeekdaysParse[r].test(n))||i&&t==="ddd"&&this._shortWeekdaysParse[r].test(n)||i&&t==="dd"&&this._minWeekdaysParse[r].test(n)||!i&&this._weekdaysParse[r].test(n))return r}function vc(n){if(!this.isValid())return n!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return n!=null?(n=ec(n,this.localeData()),this.add(n-t,"d")):t}function yc(n){if(!this.isValid())return n!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return n==null?t:this.add(n-t,"d")}function pc(n){if(!this.isValid())return n!=null?this:NaN;if(n!=null){var t=oc(n,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function wc(n){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||hu.call(this),n?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=be),this._weekdaysStrictRegex&&n?this._weekdaysStrictRegex:this._weekdaysRegex)}function bc(n){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||hu.call(this),n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ke),this._weekdaysShortStrictRegex&&n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function kc(n){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||hu.call(this),n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=de),this._weekdaysMinStrictRegex&&n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function hu(){function u(n,t){return t.length-n.length}for(var e=[],i=[],r=[],t=[],f,o,s,h,n=0;n<7;n++)f=rt([2e3,1]).day(n),o=this.weekdaysMin(f,""),s=this.weekdaysShort(f,""),h=this.weekdays(f,""),e.push(o),i.push(s),r.push(h),t.push(o),t.push(s),t.push(h);for(e.sort(u),i.sort(u),r.sort(u),t.sort(u),n=0;n<7;n++)i[n]=dt(i[n]),r[n]=dt(r[n]),t[n]=dt(t[n]);this._weekdaysRegex=new RegExp("^("+t.join("|")+")","i");this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function cu(){return this.hours()%12||12}function dc(){return this.hours()||24}function ge(n,t){r(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function no(n,t){return t._meridiemParse}function gc(n){return(n+"").toLowerCase().charAt(0)==="p"}function nl(n,t,i){return n>11?i?"pm":"PM":i?"am":"AM"}function ro(n){return n?n.toLowerCase().replace("_","-"):n}function il(n){for(var r=0,i,t,f,u;r<n.length;){for(u=ro(n[r]).split("-"),i=u.length,t=ro(n[r+1]),t=t?t.split("-"):null;i>0;){if(f=uo(u.slice(0,i).join("-")),f)return f;if(t&&t.length>=i&&of(u,t,!0)>=i-1)break;i--}r++}return null}function uo(n){var t=null;if(!a[n]&&typeof module!="undefined"&&module&&module.exports)try{t=or._abbr;require("./locale/"+n);ei(t)}catch(i){}return a[n]}function ei(n,t){var i;return n&&(i=b(t)?pt(n):fo(n,t),i&&(or=i)),or._abbr}function fo(n,t){if(t!==null){var i=io;return t.abbr=n,a[n]!=null?(kr("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=a[n]._config):t.parentLocale!=null&&(a[t.parentLocale]!=null?i=a[t.parentLocale]._config:kr("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),a[n]=new dr(hf(i,t)),ei(n),a[n]}return delete a[n],null}function rl(n,t){if(t!=null){var i,r=io;a[n]!=null&&(r=a[n]._config);t=hf(r,t);i=new dr(t);i.parentLocale=a[n];a[n]=i;ei(n)}else a[n]!=null&&(a[n].parentLocale!=null?a[n]=a[n].parentLocale:a[n]!=null&&delete a[n]);return a[n]}function pt(n){var t;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return or;if(!at(n)){if(t=uo(n),t)return t;n=[n]}return il(n)}function ul(){return cf(a)}function lu(n){var i,t=n._a;return t&&u(n).overflow===-2&&(i=t[st]<0||t[st]>11?st:t[ut]<1||t[ut]>eu(t[tt],t[st])?ut:t[y]<0||t[y]>24||t[y]===24&&(t[it]!==0||t[ht]!==0||t[gt]!==0)?y:t[it]<0||t[it]>59?it:t[ht]<0||t[ht]>59?ht:t[gt]<0||t[gt]>999?gt:-1,u(n)._overflowDayOfYear&&(i<tt||i>ut)&&(i=ut),u(n)._overflowWeeks&&i===-1&&(i=lh),u(n)._overflowWeekday&&i===-1&&(i=ah),u(n).overflow=i),n}function eo(n){var t,r,o=n._i,i=fl.exec(o)||el.exec(o),s,e,f,h;if(i){for(u(n).iso=!0,t=0,r=sr.length;t<r;t++)if(sr[t][1].exec(i[1])){e=sr[t][0];s=sr[t][2]!==!1;break}if(e==null){n._isValid=!1;return}if(i[3]){for(t=0,r=au.length;t<r;t++)if(au[t][1].exec(i[3])){f=(i[2]||" ")+au[t][0];break}if(f==null){n._isValid=!1;return}}if(!s&&f!=null){n._isValid=!1;return}if(i[4])if(ol.exec(i[4]))h="Z";else{n._isValid=!1;return}n._f=e+(f||"")+(h||"");yu(n)}else n._isValid=!1}function hl(n){var i=sl.exec(n._i);if(i!==null){n._d=new Date(+i[1]);return}eo(n);n._isValid===!1&&(delete n._isValid,t.createFromInputFallback(n))}function oi(n,t,i){return n!=null?n:t!=null?t:i}function cl(n){var i=new Date(t.now());return n._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function vu(n){var t,i,r=[],f,e;if(!n._d){for(f=cl(n),n._w&&n._a[ut]==null&&n._a[st]==null&&ll(n),n._dayOfYear&&(e=oi(n._a[tt],f[tt]),n._dayOfYear>li(e)&&(u(n)._overflowDayOfYear=!0),i=fr(e,0,n._dayOfYear),n._a[st]=i.getUTCMonth(),n._a[ut]=i.getUTCDate()),t=0;t<3&&n._a[t]==null;++t)n._a[t]=r[t]=f[t];for(;t<7;t++)n._a[t]=r[t]=n._a[t]==null?t===2?1:0:n._a[t];n._a[y]===24&&n._a[it]===0&&n._a[ht]===0&&n._a[gt]===0&&(n._nextDay=!0,n._a[y]=0);n._d=(n._useUTC?fr:nc).apply(null,r);n._tzm!=null&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm);n._nextDay&&(n._a[y]=24)}}function ll(n){var t,o,f,i,r,e,h,s;t=n._w;t.GG!=null||t.W!=null||t.E!=null?(r=1,e=4,o=oi(t.GG,n._a[tt],ai(c(),1,4).year),f=oi(t.W,1),i=oi(t.E,1),(i<1||i>7)&&(s=!0)):(r=n._locale._week.dow,e=n._locale._week.doy,o=oi(t.gg,n._a[tt],ai(c(),r,e).year),f=oi(t.w,1),t.d!=null?(i=t.d,(i<0||i>6)&&(s=!0)):t.e!=null?(i=t.e+r,(t.e<0||t.e>6)&&(s=!0)):i=r);f<1||f>ni(o,r,e)?u(n)._overflowWeeks=!0:s!=null?u(n)._overflowWeekday=!0:(h=ae(o,f,i,r,e),n._a[tt]=h.year,n._dayOfYear=h.dayOfYear)}function yu(n){if(n._f===t.ISO_8601){eo(n);return}n._a=[];u(n).empty=!0;for(var i=""+n._i,r,f,s,c=i.length,h=0,o=df(n._f,n._locale).match(kf)||[],e=0;e<o.length;e++)f=o[e],r=(i.match(sh(f,n))||[])[0],r&&(s=i.substr(0,i.indexOf(r)),s.length>0&&u(n).unusedInput.push(s),i=i.slice(i.indexOf(r)+r.length),h+=r.length),fi[f]?(r?u(n).empty=!1:u(n).unusedTokens.push(f),ch(f,r,n)):n._strict&&!r&&u(n).unusedTokens.push(f);u(n).charsLeftOver=c-h;i.length>0&&u(n).unusedInput.push(i);n._a[y]<=12&&u(n).bigHour===!0&&n._a[y]>0&&(u(n).bigHour=undefined);u(n).parsedDateParts=n._a.slice(0);u(n).meridiem=n._meridiem;n._a[y]=al(n._locale,n._a[y],n._meridiem);vu(n);lu(n)}function al(n,t,i){var r;return i==null?t:n.meridiemHour!=null?n.meridiemHour(t,i):n.isPM!=null?(r=n.isPM(i),r&&t<12&&(t+=12),r||t!==12||(t=0),t):t}function vl(n){var t,e,f,r,i;if(n._f.length===0){u(n).invalidFormat=!0;n._d=new Date(NaN);return}for(r=0;r<n._f.length;r++)(i=0,t=wr({},n),n._useUTC!=null&&(t._useUTC=n._useUTC),t._f=n._f[r],yu(t),pr(t))&&(i+=u(t).charsLeftOver,i+=u(t).unusedTokens.length*10,u(t).score=i,(f==null||i<f)&&(f=i,e=t));vt(n,e||t)}function yl(n){if(!n._d){var t=gr(n._i);n._a=ff([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)});vu(n)}}function pl(n){var t=new si(lu(oo(n)));return t._nextDay&&(t.add(1,"d"),t._nextDay=undefined),t}function oo(n){var t=n._i,i=n._f;return(n._locale=n._locale||pt(n._l),t===null||i===undefined&&t==="")?pi({nullInput:!0}):(typeof t=="string"&&(n._i=t=n._locale.preparse(t)),yt(t))?new si(lu(t)):(at(i)?vl(n):yi(t)?n._d=t:i?yu(n):wl(n),pr(n)||(n._d=null),n)}function wl(n){var i=n._i;i===undefined?n._d=new Date(t.now()):yi(i)?n._d=new Date(i.valueOf()):typeof i=="string"?hl(n):at(i)?(n._a=ff(i.slice(0),function(n){return parseInt(n,10)}),vu(n)):typeof i=="object"?yl(n):typeof i=="number"?n._d=new Date(i):t.createFromInputFallback(n)}function so(n,t,i,r,u){var f={};return typeof i=="boolean"&&(r=i,i=undefined),(vi(n)&&ps(n)||at(n)&&n.length===0)&&(n=undefined),f._isAMomentObject=!0,f._useUTC=f._isUTC=u,f._l=i,f._i=n,f._f=t,f._strict=r,pl(f)}function c(n,t,i,r){return so(n,t,i,r,!1)}function lo(n,t){var r,i;if(t.length===1&&at(t[0])&&(t=t[0]),!t.length)return c();for(r=t[0],i=1;i<t.length;++i)(!t[i].isValid()||t[i][n](r))&&(r=t[i]);return r}function bl(){var n=[].slice.call(arguments,0);return lo("isBefore",n)}function kl(){var n=[].slice.call(arguments,0);return lo("isAfter",n)}function hr(n){var t=gr(n),i=t.year||0,r=t.quarter||0,u=t.month||0,f=t.week||0,e=t.day||0,o=t.hour||0,s=t.minute||0,h=t.second||0,c=t.millisecond||0;this._milliseconds=+c+h*1e3+s*6e4+o*36e5;this._days=+e+f*7;this._months=+u+r*3+i*12;this._data={};this._locale=pt();this._bubble()}function pu(n){return n instanceof hr}function wu(n){return n<0?Math.round(-1*n)*-1:Math.round(n)}function vo(n,t){r(n,0,0,function(){var n=this.utcOffset(),i="+";return n<0&&(n=-n,i="-"),i+ot(~~(n/60),2)+t+ot(~~n%60,2)})}function cr(n,t){var r=(t||"").match(n)||[],e=r[r.length-1]||[],i=(e+"").match(yo)||["-",0,0],u=+(i[1]*60)+f(i[2]);return i[0]==="+"?u:-u}function bu(n,i){var r,u;return i._isUTC?(r=i.clone(),u=(yt(n)||yi(n)?n.valueOf():c(n).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+u),t.updateOffset(r,!1),r):c(n).local()}function ku(n){return-Math.round(n._d.getTimezoneOffset()/15)*15}function dl(n,i){var r=this._offset||0,u;return this.isValid()?n!=null?(typeof n=="string"?n=cr(rr,n):Math.abs(n)<16&&(n=n*60),!this._isUTC&&i&&(u=ku(this)),this._offset=n,this._isUTC=!0,u!=null&&this.add(u,"m"),r!==n&&(!i||this._changeInProgress?ns(this,wt(n-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?r:ku(this):n!=null?this:NaN}function gl(n,t){return n!=null?(typeof n!="string"&&(n=-n),this.utcOffset(n,t),this):-this.utcOffset()}function na(n){return this.utcOffset(0,n)}function ta(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(ku(this),"m")),this}function ia(){if(this._tzm)this.utcOffset(this._tzm);else if(typeof this._i=="string"){var n=cr(re,this._i);n===0?this.utcOffset(0,!0):this.utcOffset(cr(re,this._i))}return this}function ra(n){return this.isValid()?(n=n?c(n).utcOffset():0,(this.utcOffset()-n)%60==0):!1}function ua(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function fa(){var n,t;return b(this._isDSTShifted)?(n={},wr(n,this),n=oo(n),n._a?(t=n._isUTC?rt(n._a):c(n._a),this._isDSTShifted=this.isValid()&&of(n._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted):this._isDSTShifted}function ea(){return this.isValid()?!this._isUTC:!1}function oa(){return this.isValid()?this._isUTC:!1}function po(){return this.isValid()?this._isUTC&&this._offset===0:!1}function wt(n,t){var i=n,r=null,u,e,o;return pu(n)?i={ms:n._milliseconds,d:n._days,M:n._months}:typeof n=="number"?(i={},t?i[t]=n:i.milliseconds=n):(r=wo.exec(n))?(u=r[1]==="-"?-1:1,i={y:0,d:f(r[ut])*u,h:f(r[y])*u,m:f(r[it])*u,s:f(r[ht])*u,ms:f(wu(r[gt]*1e3))*u}):(r=bo.exec(n))?(u=r[1]==="-"?-1:1,i={y:ti(r[2],u),M:ti(r[3],u),w:ti(r[4],u),d:ti(r[5],u),h:ti(r[6],u),m:ti(r[7],u),s:ti(r[8],u)}):i==null?i={}:typeof i=="object"&&("from"in i||"to"in i)&&(o=sa(c(i.from),c(i.to)),i={},i.ms=o.milliseconds,i.M=o.months),e=new hr(i),pu(n)&&l(n,"_locale")&&(e._locale=n._locale),e}function ti(n,t){var i=n&&parseFloat(n.replace(",","."));return(isNaN(i)?0:i)*t}function ko(n,t){var i={milliseconds:0,months:0};return i.months=t.month()-n.month()+(t.year()-n.year())*12,n.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+n.clone().add(i.months,"M"),i}function sa(n,t){var i;return(n.isValid()&&t.isValid())?(t=bu(t,n),n.isBefore(t)?i=ko(n,t):(i=ko(t,n),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function go(n,t){return function(i,r){var u,f;return r===null||isNaN(+r)||(kr(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),f=i,i=r,r=f),i=typeof i=="string"?+i:i,u=wt(i,r),ns(this,u,n),this}}function ns(n,i,r,u){var o=i._milliseconds,f=wu(i._days),e=wu(i._months);n.isValid()&&(u=u==null?!0:u,o&&n._d.setTime(n._d.valueOf()+o*r),f&&bf(n,"Date",ki(n,"Date")+f*r),e&&ee(n,ki(n,"Month")+e*r),u&&t.updateOffset(n,f||e))}function ha(n,t){var i=n.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function ca(n,i){var u=n||c(),f=bu(u,this).startOf("day"),r=t.calendarFormat(this,f)||"sameElse",e=i&&(et(i[r])?i[r].call(this,u):i[r]);return this.format(e||this.localeData().calendar(r,this,c(u)))}function la(){return new si(this)}function aa(n,t){var i=yt(n)?n:c(n);return(this.isValid()&&i.isValid())?(t=g(b(t)?"millisecond":t),t==="millisecond"?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(t).valueOf()):!1}function va(n,t){var i=yt(n)?n:c(n);return(this.isValid()&&i.isValid())?(t=g(b(t)?"millisecond":t),t==="millisecond"?this.valueOf()<i.valueOf():this.clone().endOf(t).valueOf()<i.valueOf()):!1}function ya(n,t,i,r){return r=r||"()",(r[0]==="("?this.isAfter(n,i):!this.isBefore(n,i))&&(r[1]===")"?this.isBefore(t,i):!this.isAfter(t,i))}function pa(n,t){var i=yt(n)?n:c(n),r;return(this.isValid()&&i.isValid())?(t=g(t||"millisecond"),t==="millisecond"?this.valueOf()===i.valueOf():(r=i.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function wa(n,t){return this.isSame(n,t)||this.isAfter(n,t)}function ba(n,t){return this.isSame(n,t)||this.isBefore(n,t)}function ka(n,t,i){var f,e,u,r;return this.isValid()?(f=bu(n,this),!f.isValid())?NaN:(e=(f.utcOffset()-this.utcOffset())*6e4,t=g(t),t==="year"||t==="month"||t==="quarter"?(r=da(this,f),t==="quarter"?r=r/3:t==="year"&&(r=r/12)):(u=this-f,r=t==="second"?u/1e3:t==="minute"?u/6e4:t==="hour"?u/36e5:t==="day"?(u-e)/864e5:t==="week"?(u-e)/6048e5:u),i?r:k(r)):NaN}function da(n,t){var r=(t.year()-n.year())*12+(t.month()-n.month()),i=n.clone().add(r,"months"),u,f;return t-i<0?(u=n.clone().add(r-1,"months"),f=(t-i)/(i-u)):(u=n.clone().add(r+1,"months"),f=(t-i)/(u-i)),-(r+f)||0}function ga(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function nv(){var n=this.clone().utc();return 0<n.year()&&n.year()<=9999?et(Date.prototype.toISOString)?this.toDate().toISOString():iu(n,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):iu(n,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function tv(n){n||(n=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var i=iu(this,n);return this.localeData().postformat(i)}function iv(n,t){return this.isValid()&&(yt(n)&&n.isValid()||c(n).isValid())?wt({to:this,from:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function rv(n){return this.from(c(),n)}function uv(n,t){return this.isValid()&&(yt(n)&&n.isValid()||c(n).isValid())?wt({from:this,to:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function fv(n){return this.to(c(),n)}function rs(n){var t;return n===undefined?this._locale._abbr:(t=pt(n),t!=null&&(this._locale=t),this)}function us(){return this._locale}function ev(n){n=g(n);switch(n){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return n==="week"&&this.weekday(0),n==="isoWeek"&&this.isoWeekday(1),n==="quarter"&&this.month(Math.floor(this.month()/3)*3),this}function ov(n){return(n=g(n),n===undefined||n==="millisecond")?this:(n==="date"&&(n="day"),this.startOf(n).add(1,n==="isoWeek"?"week":n).subtract(1,"ms"))}function sv(){return this._d.valueOf()-(this._offset||0)*6e4}function hv(){return Math.floor(this.valueOf()/1e3)}function cv(){return new Date(this.valueOf())}function lv(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]}function av(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}}function vv(){return this.isValid()?this.toISOString():null}function yv(){return pr(this)}function pv(){return vt({},u(this))}function wv(){return u(this).overflow}function bv(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function lr(n,t){r(0,[n,n.length],0,t)}function kv(n){return fs.call(this,n,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function dv(n){return fs.call(this,n,this.isoWeek(),this.isoWeekday(),1,4)}function gv(){return ni(this.year(),1,4)}function ny(){var n=this.localeData()._week;return ni(this.year(),n.dow,n.doy)}function fs(n,t,i,r,u){var f;return n==null?ai(this,r,u).year:(f=ni(n,r,u),t>f&&(t=f),ty.call(this,n,t,i,r,u))}function ty(n,t,i,r,u){var e=ae(n,t,i,r,u),f=fr(e.year,0,e.dayOfYear);return this.year(f.getUTCFullYear()),this.month(f.getUTCMonth()),this.date(f.getUTCDate()),this}function iy(n){return n==null?Math.ceil((this.month()+1)/3):this.month((n-1)*3+this.month()%3)}function ry(n){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return n==null?t:this.add(n-t,"d")}function uy(n,t){t[gt]=f(("0."+n)*1e3)}function fy(){return this._isUTC?"UTC":""}function ey(){return this._isUTC?"Coordinated Universal Time":""}function oy(n){return c(n*1e3)}function sy(){return c.apply(null,arguments).parseZone()}function hs(n){return n}function ar(n,t,i,r){var u=pt(),f=rt().set(r,t);return u[i](f,n)}function cs(n,t,i){if(typeof n=="number"&&(t=n,n=undefined),n=n||"",t!=null)return ar(n,t,i,"month");for(var u=[],r=0;r<12;r++)u[r]=ar(n,r,i,"month");return u}function tf(n,t,i,r){var o,f,u,e;if(typeof n=="boolean"?(typeof t=="number"&&(i=t,t=undefined),t=t||""):(t=n,i=t,n=!1,typeof t=="number"&&(i=t,t=undefined),t=t||""),o=pt(),f=n?o._week.dow:0,i!=null)return ar(t,(i+f)%7,r,"day");for(e=[],u=0;u<7;u++)e[u]=ar(t,(u+f)%7,r,"day");return e}function hy(n,t){return cs(n,t,"months")}function cy(n,t){return cs(n,t,"monthsShort")}function ly(n,t,i){return tf(n,t,i,"weekdays")}function ay(n,t,i){return tf(n,t,i,"weekdaysShort")}function vy(n,t,i){return tf(n,t,i,"weekdaysMin")}function yy(){var n=this._data;return this._milliseconds=ft(this._milliseconds),this._days=ft(this._days),this._months=ft(this._months),n.milliseconds=ft(n.milliseconds),n.seconds=ft(n.seconds),n.minutes=ft(n.minutes),n.hours=ft(n.hours),n.months=ft(n.months),n.years=ft(n.years),this}function ls(n,t,i,r){var u=wt(t,i);return n._milliseconds+=r*u._milliseconds,n._days+=r*u._days,n._months+=r*u._months,n._bubble()}function py(n,t){return ls(this,n,t,1)}function wy(n,t){return ls(this,n,t,-1)}function as(n){return n<0?Math.floor(n):Math.ceil(n)}function by(){var r=this._milliseconds,n=this._days,t=this._months,i=this._data,u,f,e,s,o;return r>=0&&n>=0&&t>=0||r<=0&&n<=0&&t<=0||(r+=as(rf(t)+n)*864e5,n=0,t=0),i.milliseconds=r%1e3,u=k(r/1e3),i.seconds=u%60,f=k(u/60),i.minutes=f%60,e=k(f/60),i.hours=e%24,n+=k(e/24),o=k(vs(n)),t+=o,n-=as(rf(o)),s=k(t/12),t%=12,i.days=n,i.months=t,i.years=s,this}function vs(n){return n*4800/146097}function rf(n){return n*146097/4800}function ky(n){var t,r,i=this._milliseconds;if(n=g(n),n==="month"||n==="year")return t=this._days+i/864e5,r=this._months+vs(t),n==="month"?r:r/12;t=this._days+Math.round(rf(this._months));switch(n){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return t*24+i/36e5;case"minute":return t*1440+i/6e4;case"second":return t*86400+i/1e3;case"millisecond":return Math.floor(t*864e5)+i;default:throw new Error("Unknown unit "+n);}}function dy(){return this._milliseconds+this._days*864e5+this._months%12*2592e6+f(this._months/12)*31536e6}function kt(n){return function(){return this.as(n)}}function op(n){return n=g(n),this[n+"s"]()}function ii(n){return function(){return this._data[n]}}function pp(){return k(this.days()/7)}function wp(n,t,i,r,u){return u.relativeTime(t||1,!!i,n,r)}function bp(n,t,i){var r=wt(n).abs(),h=ct(r.as("s")),f=ct(r.as("m")),e=ct(r.as("h")),o=ct(r.as("d")),s=ct(r.as("M")),c=ct(r.as("y")),u=h<lt.s&&["s",h]||f<=1&&["m"]||f<lt.m&&["mm",f]||e<=1&&["h"]||e<lt.h&&["hh",e]||o<=1&&["d"]||o<lt.d&&["dd",o]||s<=1&&["M"]||s<lt.M&&["MM",s]||c<=1&&["y"]||["yy",c];return u[2]=t,u[3]=+n>0,u[4]=i,wp.apply(null,u)}function kp(n){return n===undefined?ct:typeof n=="function"?(ct=n,!0):!1}function dp(n,t){return lt[n]===undefined?!1:t===undefined?lt[n]:(lt[n]=t,!0)}function gp(n){var t=this.localeData(),i=bp(this,!n,t);return n&&(i=t.pastFuture(+this,i)),t.postformat(i)}function yr(){var t=vr(this._milliseconds)/1e3,a=vr(this._days),i=vr(this._months),n,e,o;n=k(t/60);e=k(n/60);t%=60;n%=60;o=k(i/12);i%=12;var s=o,h=i,c=a,r=e,u=n,f=t,l=this.asSeconds();return l?(l<0?"-":"")+"P"+(s?s+"Y":"")+(h?h+"M":"")+(c?c+"D":"")+(r||u||f?"T":"")+(r?r+"H":"")+(u?u+"M":"")+(f?f+"S":""):"P0D"}var uf,ef,wi,bi,br,cf,lf,af,vf,yf,pf,wf,ri,nu,ur,ou,ue,fe,se,he,su,ve,ye,pe,we,be,ke,de,to,ho,co,ao,yo,wo,bo,ts,is,du,gu,es,os,bt,ss,n,nf,o,ft,ct,lt,vr,e;ef=Array.prototype.some?Array.prototype.some:function(n){for(var i=Object(this),r=i.length>>>0,t=0;t<r;t++)if(t in i&&n.call(this,i[t],t,i))return!0;return!1};wi=t.momentProperties=[];bi=!1;br={};t.suppressDeprecationWarnings=!1;t.deprecationHandler=null;cf=Object.keys?Object.keys:function(n){var t,i=[];for(t in n)l(n,t)&&i.push(t);return i};lf={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};af={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};vf="Invalid date";yf="%d";pf=/\d{1,2}/;wf={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};ri={};nu={};var kf=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,di=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,tu={},fi={};var gf=/\d/,nt=/\d\d/,ne=/\d{3}/,ru=/\d{4}/,gi=/[+-]?\d{6}/,h=/\d\d?/,te=/\d\d\d\d?/,ie=/\d\d\d\d\d\d?/,nr=/\d{1,3}/,uu=/\d{1,4}/,tr=/[+-]?\d{1,6}/,ir=/[+-]?\d+/,re=/Z|[+-]\d\d:?\d\d/gi,rr=/Z|[+-]\d\d(?::?\d\d)?/gi,hi=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,fu={};ur={};var tt=0,st=1,ut=2,y=3,it=4,ht=5,gt=6,lh=7,ah=8,v;v=Array.prototype.indexOf?Array.prototype.indexOf:function(n){for(var t=0;t<this.length;++t)if(this[t]===n)return t;return-1};r("M",["MM",2],"Mo",function(){return this.month()+1});r("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)});r("MMMM",0,0,function(n){return this.localeData().months(this,n)});p("month","M");w("month",8);i("M",h);i("MM",h,nt);i("MMM",function(n,t){return t.monthsShortRegex(n)});i("MMMM",function(n,t){return t.monthsRegex(n)});s(["M","MM"],function(n,t){t[st]=f(n)-1});s(["MMM","MMMM"],function(n,t,i,r){var f=i._locale.monthsParse(n,r,i._strict);f!=null?t[st]=f:u(i).invalidMonth=n});ou=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/;ue="January_February_March_April_May_June_July_August_September_October_November_December".split("_");fe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");se=hi;he=hi;r("Y",0,0,function(){var n=this.year();return n<=9999?""+n:"+"+n});r(0,["YY",2],0,function(){return this.year()%100});r(0,["YYYY",4],0,"year");r(0,["YYYYY",5],0,"year");r(0,["YYYYYY",6,!0],0,"year");p("year","y");w("year",1);i("Y",ir);i("YY",h,nt);i("YYYY",uu,ru);i("YYYYY",tr,gi);i("YYYYYY",tr,gi);s(["YYYYY","YYYYYY"],tt);s("YYYY",function(n,i){i[tt]=n.length===2?t.parseTwoDigitYear(n):f(n)});s("YY",function(n,i){i[tt]=t.parseTwoDigitYear(n)});s("Y",function(n,t){t[tt]=parseInt(n,10)});t.parseTwoDigitYear=function(n){return f(n)+(f(n)>68?1900:2e3)};su=ui("FullYear",!0);r("w",["ww",2],"wo","week");r("W",["WW",2],"Wo","isoWeek");p("week","w");p("isoWeek","W");w("week",5);w("isoWeek",5);i("w",h);i("ww",h,nt);i("W",h);i("WW",h,nt);ci(["w","ww","W","WW"],function(n,t,i,r){t[r.substr(0,1)]=f(n)});ve={dow:0,doy:6};r("d",0,"do","day");r("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)});r("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)});r("dddd",0,0,function(n){return this.localeData().weekdays(this,n)});r("e",0,0,"weekday");r("E",0,0,"isoWeekday");p("day","d");p("weekday","e");p("isoWeekday","E");w("day",11);w("weekday",11);w("isoWeekday",11);i("d",h);i("e",h);i("E",h);i("dd",function(n,t){return t.weekdaysMinRegex(n)});i("ddd",function(n,t){return t.weekdaysShortRegex(n)});i("dddd",function(n,t){return t.weekdaysRegex(n)});ci(["dd","ddd","dddd"],function(n,t,i,r){var f=i._locale.weekdaysParse(n,r,i._strict);f!=null?t.d=f:u(i).invalidWeekday=n});ci(["d","e","E"],function(n,t,i,r){t[r]=f(n)});ye="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");pe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");we="Su_Mo_Tu_We_Th_Fr_Sa".split("_");be=hi;ke=hi;de=hi;r("H",["HH",2],0,"hour");r("h",["hh",2],0,cu);r("k",["kk",2],0,dc);r("hmm",0,0,function(){return""+cu.apply(this)+ot(this.minutes(),2)});r("hmmss",0,0,function(){return""+cu.apply(this)+ot(this.minutes(),2)+ot(this.seconds(),2)});r("Hmm",0,0,function(){return""+this.hours()+ot(this.minutes(),2)});r("Hmmss",0,0,function(){return""+this.hours()+ot(this.minutes(),2)+ot(this.seconds(),2)});ge("a",!0);ge("A",!1);p("hour","h");w("hour",13);i("a",no);i("A",no);i("H",h);i("h",h);i("HH",h,nt);i("hh",h,nt);i("hmm",te);i("hmmss",ie);i("Hmm",te);i("Hmmss",ie);s(["H","HH"],y);s(["a","A"],function(n,t,i){i._isPm=i._locale.isPM(n);i._meridiem=n});s(["h","hh"],function(n,t,i){t[y]=f(n);u(i).bigHour=!0});s("hmm",function(n,t,i){var r=n.length-2;t[y]=f(n.substr(0,r));t[it]=f(n.substr(r));u(i).bigHour=!0});s("hmmss",function(n,t,i){var r=n.length-4,e=n.length-2;t[y]=f(n.substr(0,r));t[it]=f(n.substr(r,2));t[ht]=f(n.substr(e));u(i).bigHour=!0});s("Hmm",function(n,t){var i=n.length-2;t[y]=f(n.substr(0,i));t[it]=f(n.substr(i))});s("Hmmss",function(n,t){var i=n.length-4,r=n.length-2;t[y]=f(n.substr(0,i));t[it]=f(n.substr(i,2));t[ht]=f(n.substr(r))});to=/[ap]\.?m?\.?/i;var tl=ui("Hours",!0),io={calendar:lf,longDateFormat:af,invalidDate:vf,ordinal:yf,ordinalParse:pf,relativeTime:wf,months:ue,monthsShort:fe,week:ve,weekdays:ye,weekdaysMin:we,weekdaysShort:pe,meridiemParse:to},a={},or;var fl=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,el=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ol=/Z|[+-]\d\d(?::?\d\d)?/,sr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],au=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],sl=/^\/?Date\((\-?\d+)/i;for(t.createFromInputFallback=d("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))}),t.ISO_8601=function(){},ho=d("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=c.apply(null,arguments);return this.isValid()&&n.isValid()?n<this?this:n:pi()}),co=d("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=c.apply(null,arguments);return this.isValid()&&n.isValid()?n>this?this:n:pi()}),ao=function(){return Date.now?Date.now():+new Date},vo("Z",":"),vo("ZZ",""),i("Z",rr),i("ZZ",rr),s(["Z","ZZ"],function(n,t,i){i._useUTC=!0;i._tzm=cr(rr,n)}),yo=/([\+\-]|\d\d)/gi,t.updateOffset=function(){},wo=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,bo=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/,wt.fn=hr.prototype,ts=go(1,"add"),is=go(-1,"subtract"),t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]",du=d("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){return n===undefined?this.localeData():this.locale(n)}),r(0,["gg",2],0,function(){return this.weekYear()%100}),r(0,["GG",2],0,function(){return this.isoWeekYear()%100}),lr("gggg","weekYear"),lr("ggggg","weekYear"),lr("GGGG","isoWeekYear"),lr("GGGGG","isoWeekYear"),p("weekYear","gg"),p("isoWeekYear","GG"),w("weekYear",1),w("isoWeekYear",1),i("G",ir),i("g",ir),i("GG",h,nt),i("gg",h,nt),i("GGGG",uu,ru),i("gggg",uu,ru),i("GGGGG",tr,gi),i("ggggg",tr,gi),ci(["gggg","ggggg","GGGG","GGGGG"],function(n,t,i,r){t[r.substr(0,2)]=f(n)}),ci(["gg","GG"],function(n,i,r,u){i[u]=t.parseTwoDigitYear(n)}),r("Q",0,"Qo","quarter"),p("quarter","Q"),w("quarter",7),i("Q",gf),s("Q",function(n,t){t[st]=(f(n)-1)*3}),r("D",["DD",2],"Do","date"),p("date","D"),w("date",9),i("D",h),i("DD",h,nt),i("Do",function(n,t){return n?t._ordinalParse:t._ordinalParseLenient}),s(["D","DD"],ut),s("Do",function(n,t){t[ut]=f(n.match(h)[0],10)}),gu=ui("Date",!0),r("DDD",["DDDD",3],"DDDo","dayOfYear"),p("dayOfYear","DDD"),w("dayOfYear",4),i("DDD",nr),i("DDDD",ne),s(["DDD","DDDD"],function(n,t,i){i._dayOfYear=f(n)}),r("m",["mm",2],0,"minute"),p("minute","m"),w("minute",14),i("m",h),i("mm",h,nt),s(["m","mm"],it),es=ui("Minutes",!1),r("s",["ss",2],0,"second"),p("second","s"),w("second",15),i("s",h),i("ss",h,nt),s(["s","ss"],ht),os=ui("Seconds",!1),r("S",0,0,function(){return~~(this.millisecond()/100)}),r(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),r(0,["SSS",3],0,"millisecond"),r(0,["SSSS",4],0,function(){return this.millisecond()*10}),r(0,["SSSSS",5],0,function(){return this.millisecond()*100}),r(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),r(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),r(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),r(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),p("millisecond","ms"),w("millisecond",16),i("S",nr,gf),i("SS",nr,nt),i("SSS",nr,ne),bt="SSSS";bt.length<=9;bt+="S")i(bt,/\d+/);for(bt="S";bt.length<=9;bt+="S")s(bt,uy);ss=ui("Milliseconds",!1);r("z",0,0,"zoneAbbr");r("zz",0,0,"zoneName");n=si.prototype;n.add=ts;n.calendar=ca;n.clone=la;n.diff=ka;n.endOf=ov;n.format=tv;n.from=iv;n.fromNow=rv;n.to=uv;n.toNow=fv;n.get=uh;n.invalidAt=wv;n.isAfter=aa;n.isBefore=va;n.isBetween=ya;n.isSame=pa;n.isSameOrAfter=wa;n.isSameOrBefore=ba;n.isValid=yv;n.lang=du;n.locale=rs;n.localeData=us;n.max=co;n.min=ho;n.parsingFlags=pv;n.set=fh;n.startOf=ev;n.subtract=is;n.toArray=lv;n.toObject=av;n.toDate=cv;n.toISOString=nv;n.toJSON=vv;n.toString=ga;n.unix=hv;n.valueOf=sv;n.creationData=bv;n.year=su;n.isLeapYear=gh;n.weekYear=kv;n.isoWeekYear=dv;n.quarter=n.quarters=iy;n.month=oe;n.daysInMonth=bh;n.week=n.weeks=uc;n.isoWeek=n.isoWeeks=fc;n.weeksInYear=ny;n.isoWeeksInYear=gv;n.date=gu;n.day=n.days=vc;n.weekday=yc;n.isoWeekday=pc;n.dayOfYear=ry;n.hour=n.hours=tl;n.minute=n.minutes=es;n.second=n.seconds=os;n.millisecond=n.milliseconds=ss;n.utcOffset=dl;n.utc=na;n.local=ta;n.parseZone=ia;n.hasAlignedHourOffset=ra;n.isDST=ua;n.isLocal=ea;n.isUtcOffset=oa;n.isUtc=po;n.isUTC=po;n.zoneAbbr=fy;n.zoneName=ey;n.dates=d("dates accessor is deprecated. Use date instead.",gu);n.months=d("months accessor is deprecated. Use month instead",oe);n.years=d("years accessor is deprecated. Use year instead",su);n.zone=d("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gl);n.isDSTShifted=d("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",fa);nf=n;o=dr.prototype;o.calendar=ks;o.longDateFormat=ds;o.invalidDate=gs;o.ordinal=nh;o.preparse=hs;o.postformat=hs;o.relativeTime=th;o.pastFuture=ih;o.set=bs;o.months=vh;o.monthsShort=yh;o.monthsParse=wh;o.monthsRegex=dh;o.monthsShortRegex=kh;o.week=tc;o.firstDayOfYear=rc;o.firstDayOfWeek=ic;o.weekdays=sc;o.weekdaysMin=cc;o.weekdaysShort=hc;o.weekdaysParse=ac;o.weekdaysRegex=wc;o.weekdaysShortRegex=bc;o.weekdaysMinRegex=kc;o.isPM=gc;o.meridiem=nl;ei("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var t=n%10,i=f(n%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return n+i}});t.lang=d("moment.lang is deprecated. Use moment.locale instead.",ei);t.langData=d("moment.langData is deprecated. Use moment.localeData instead.",pt);ft=Math.abs;var gy=kt("ms"),np=kt("s"),tp=kt("m"),ip=kt("h"),rp=kt("d"),up=kt("w"),fp=kt("M"),ep=kt("y");var sp=ii("milliseconds"),hp=ii("seconds"),cp=ii("minutes"),lp=ii("hours"),ap=ii("days"),vp=ii("months"),yp=ii("years");return ct=Math.round,lt={s:45,m:45,h:22,d:26,M:11},vr=Math.abs,e=hr.prototype,e.abs=yy,e.add=py,e.subtract=wy,e.as=ky,e.asMilliseconds=gy,e.asSeconds=np,e.asMinutes=tp,e.asHours=ip,e.asDays=rp,e.asWeeks=up,e.asMonths=fp,e.asYears=ep,e.valueOf=dy,e._bubble=by,e.get=op,e.milliseconds=sp,e.seconds=hp,e.minutes=cp,e.hours=lp,e.days=ap,e.weeks=pp,e.months=vp,e.years=yp,e.humanize=gp,e.toISOString=yr,e.toString=yr,e.toJSON=yr,e.locale=rs,e.localeData=us,e.toIsoString=d("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",yr),e.lang=du,r("X",0,0,"unix"),r("x",0,0,"valueOf"),i("x",ir),i("X",/[+-]?\d+(\.\d{1,3})?/),s("X",function(n,t,i){i._d=new Date(parseFloat(n,10)*1e3)}),s("x",function(n,t,i){i._d=new Date(f(n))}),t.version="2.15.1",ys(c),t.fn=nf,t.min=bl,t.max=kl,t.now=ao,t.utc=rt,t.unix=oy,t.months=hy,t.isDate=yi,t.locale=ei,t.invalid=pi,t.duration=wt,t.isMoment=yt,t.weekdays=ly,t.parseZone=sy,t.localeData=pt,t.isDuration=pu,t.monthsShort=cy,t.weekdaysMin=vy,t.defineLocale=fo,t.updateLocale=rl,t.locales=ul,t.weekdaysShort=ay,t.normalizeUnits=g,t.relativeTimeRounding=kp,t.relativeTimeThreshold=dp,t.calendarFormat=ha,t.prototype=nf,t});pagerDictionary={};$(function(){$(document).on("click",".ajaxpager",function(n){var t,u,r,i,f;n.preventDefault();t=$(this).data("containerid")||"";t!==""&&t[0]!=="#"&&t[0]!=="."&&(t="#"+t);u=pagerDictionary[this.id]||1;pagerDictionary[this.id]=u+1;r=$("#"+this.id.replace("more-","placeholder-"));i=$(this);i.addClass("butLoading");typeof newsPaging!="undefined"&&newsPaging!==null&&newsPaging.checkPager(i);f=i.data("ajaxurl").replace("999999",u+1);$.get(f,null,function(f){var e,s,h,o;i.removeClass("butLoading");e=MSG.refreshContent(f);i.hasClass("ajaxreplace")?(s=!1,t===""&&r.length>0?r.siblings().fadeOut("fast",function(){$(this).remove();s||r.before(f);s=!0}):$(t).html(e)):r.length>0&&(t===""||$(t).length===0)?(r.before(e),typeof newsPaging!="undefined"&&newsPaging!==null&&newsPaging.setPageHistory(u),typeof catIndex!="undefined"&&catIndex!==null&&catIndex.setPageHistory(u)):$(t).append(e);f.indexOf("<!-- EOF -->")>=0||f.length===0?i.hide():n.screenX===0&&n.screenY===0&&(h=e.find(".jq-focus,a:not([aria-hidden='true'])").first(),h.attr("tabindex",0).trigger("focus"));o=i.data("pagerevent")||r.data("pagerevent");typeof o!="undefined"&&o!==null&&o!==""&&executeFunctionByName(o,window,i,r,e);MAIN.itemItalics()})})});var datechoose={disabledNonSelectedFields:function(n){n.find("input").prop("disabled",!1);n.find("input:radio:not(:checked)").closest("li").find("input:not(:radio)").attr("disabled","disabled")},setUpSelects:function(n,t){typeof t=="undefined"&&(t=$(".jq-earliestdate",n).val());n.find(".jq-dateSelectorOption").off("change").on("change",function(){var i=$(this);datechoose.checkNearest(i);datechoose.dateChange(i,t);datechoose.disabledNonSelectedFields(n);typeof MSG!="undefined"&&MSG.changesMade()}).on("click",function(n){n.stopPropagation()});datechoose.disabledNonSelectedFields(n);n.find("input:radio").on("change",function(){datechoose.disabledNonSelectedFields(n)})},checkNearest:function(n){n.parent().find(":radio").trigger("click")},dateChange:function(n,t){for(var i=n.parent(),r=i.find(".day"),f=i.find(".month"),e=i.find(".year"),u,o,s;!datechoose.isDate(r.val(),f.val(),e.val());)r[0].selectedIndex--;if((u=i.find(".jq-timezone:first"),u.length>0&&(o=generateUUID(),s=u.data("checkurl"),$.get(s,{guid:o,day:r.val(),month:f.val(),year:e.val(),hour:i.find(".hour").val(),minute:i.find(".minute").val(),timezone:u.html()},function(n){n.Guid===o&&(u.html(n.DisplayName),i.find(".jq-timezoneid:first").html(n.DisplayName))})),typeof t!="undefined"&&t!==null&&t!==0)&&(t=new Date(t),t instanceof Date)){var h=i.find(".hour"),c=i.find(".minute"),l=new Date(e.val(),f.val()-1,r.val(),h.val(),c.val());l<t&&(h.val(t.getHours()),c.val(("0"+t.getMinutes()).slice(-2)),r.val(("0"+t.getDate()).slice(-2)),f.val(t.getMonth()+1),e.val(t.getFullYear()),$(".jq-dateerror-tooearly").each(function(){var n=$(this);n.html(n.data("errmsg")).fadeIn("fast",function(){setTimeout(function(){$(".jq-dateerror-tooearly").fadeOut("slow",function(){$(this).html("")})},3e3)})}))}},isDate:function(n,t,i){return(t==4||t==6||t==9||t==11)&&n==31?!1:t==2&&(n>29||n==29&&!(i%4==0&&(i%100!=0||i%400==0)))?!1:!0}},FilesLightbox={current:null,imageWidth:null,imageHeight:null,imageSize:null,maxHeightMultiplier:4,disabled:!1,containerName:"",previewWidth:0,downloadUrl:"",init:function(n,t,i,r,u){if(FilesLightbox.containerName=r,FilesLightbox.maxHeightMultiplier=u,FilesLightbox.downloadUrl=t,!n){FilesLightbox.disabled=!0;return}FilesLightbox.previewWidth=i;FilesLightbox.addViewButton($("#pageContainer"));$("#FilesLightboxClose,#FilesLightboxWindow").on("click",function(n){n.preventDefault();$("#FilesLightboxContainer").fadeOut("fast",function(){$("#FilesLightboxInner").empty()});$("body").removeClass("lightboxOpen")});$(window).on("resize",function(){FilesLightbox.resize()});$("#FilesLightboxDownload a").on("click",function(n){n.preventDefault();var t=$(this);return FilesLightbox.downloadClickEvent(t,!1,t.hasClass("ag")),!1})},downloadClickEvent:function(n,t,i,r){var u,f;if(r||n.hasClass("jq-credit"))return typeof zipSupport!="undefined"&&(u=FilesLightbox.current.closest(".tn").find(".thumbOptions."+(t?"jpgcopy":"original")+" input:first"),u.is(":checked")||u.attr("checked",!0).trigger("change"),zipSupport.openPanel()),!1;if(i&&!MAIN.ageGateClick())return!1;f=FilesLightbox.downloadUrl.replace("~~~file~~~",escape(n.data("hyper"))).replace("~~~enc~~~",n.data("enc")).replace("~~~fileGuid~~~",n.data("fileguid"));t&&(f+="&jpgVersion=True");$.ajax({url:f,method:"GET",success:function(n){var t=n.path.replace(/^.*(\\|\/|\:)/,"");MAIN.downloadFromPath(t,n.path)}})},setupData:function(n){var f=FilesLightbox.current.attr("href"),t=FilesLightbox.current.find("img"),v=t.attr("src"),u,h,s,l,a;if(typeof v!="undefined"){var r=FilesLightbox.previewWidth,i=t.data("origw"),e=t.data("origh");if(typeof i!="undefined"&&i<FilesLightbox.previewWidth&&(r=i),u=t.data("rot"),(typeof u=="undefined"||typeof i=="undefined"||typeof e=="undefined")&&(u=!1),u&&(i=e,e=t.data("origw")),h=FilesLightbox.containerName===""?f:"/cdn/"+FilesLightbox.containerName+t.data("hyper"),n){$("#FilesLightboxInner").empty().append('<img id="FilesLightBoxTemp" src="'+v+'" style="opacity:0.5"><div id="FilesLightboxLoading"><\/div><div id="FilesLightboxImage"><\/div>');$("#FilesLightboxImage, #FilesLightboxLoading").hide();var y=setTimeout(function(){$("#FilesLightboxLoading").fadeIn("fast")},2e3),o=f.split("?")[0].toLowerCase(),c=f.indexOf("watermark=")>=0,p=c||typeof i=="undefined"||r<i||u||!o.endsWith(".jpg")&&!o.endsWith(".gif")&&!o.endsWith(".png"),w=p?h+(h.indexOf("?")===-1?"?":"&")+"w="+r+"&maxheight="+r*FilesLightbox.maxHeightMultiplier+"&mode=pad&format="+(o.endsWith(".gif")&&!c?"gif":o.endsWith(".png")?"png":"jpg")+(u?"&autorotate=true":""):f;$("#FilesLightboxImage").append('<img id="theImage" src="'+w+'">');$("#theImage").on("load",function(){$("#FilesLightboxImage").fadeIn("fast");clearTimeout(y)});$("#FilesLightboxDesc").empty().append(FilesLightbox.current.siblings(".thumbActions").find(".thumbDescription").text())}c?$("#FilesLightboxDownload").find("a").attr("href","#").addClass("jq-credit").data("fileguid","").data("enc","").data("hyper",""):$("#FilesLightboxDownload a").attr("href",f).removeClass("jq-credit").data("fileguid",t.data("fileguid")).data("enc",t.data("enc")).data("hyper",t.data("hyper")).toggleClass("ag",t.closest(".assetSet").hasClass("ag"));n&&(FilesLightbox.imageWidth=r,FilesLightbox.imageHeight=typeof e=="undefined"?null:e/i*r,FilesLightbox.imageSize=t.data("origsz"),$("#FilesLightboxDetails span.jq-size").html(t.data("origszformatted")),$("#FilesLightboxDetails span.jq-otherinfo").html(t.data("info").replace(/\|/g,'<span class="dividerbar"><\/span>')),FilesLightbox.resize())}if(n&&($("#FilesLightboxContainer").fadeIn(),$("body").hasClass("lightboxOpen")||($("#FilesLightboxClose").trigger("focus"),$("body").addClass("lightboxOpen")),$("#FilesLightboxNext").add("#FilesLightboxPrev").off("click"),s=FilesLightbox.current.data("index"),typeof s!="undefined")){if(l=FilesLightbox.current.closest(".assetSet").find("a.thumbView.thumbProcessed.jq-index"+(s+1)),l.length>0)$("#FilesLightboxNext").show().on("click",function(n){return n.preventDefault(),$("#FilesLightboxContainerInner").fadeOut("fast",function(){l.trigger("click");$("#FilesLightboxContainerInner").fadeIn("fast")}),!1});else $("#FilesLightboxNext").hide();if(a=FilesLightbox.current.closest(".assetSet").find("a.thumbView.thumbProcessed.jq-index"+(s-1)),a.length>0)$("#FilesLightboxPrev").show().on("click",function(n){return n.preventDefault(),$("#FilesLightboxContainerInner").fadeOut("fast",function(){a.trigger("click");$("#FilesLightboxContainerInner").fadeIn("fast")}),!1});else $("#FilesLightboxPrev").hide()}},addViewButton:function(n){if(!FilesLightbox.disabled&&!(n.closest("#msgContainer").length>0)){n.find("a.thumbView:not(.thumbProcessed)").addClass("thumbProcessed").each(function(n){var t=$(this),i=$("<div class=thumbViewButton><\/div>").attr("title",t.find("img").attr("title"));t.addClass("jq-index"+n).data("index",n).append(i);i.applyTooltipToItems()}).on("click",function(n){var t=$(this);if($(".tipContent").css("display","none"),!t.hasClass("jq-collapsed"))return n.preventDefault(),FilesLightbox.current=t,FilesLightbox.setupData(!0),!1});n.find(".jq-filedl .imagingThumb").applyTooltipToItems();$(".jq-thumbdl",n).each(function(){var t=$(this),i=t.closest(".jq-tn"),n=i.find("a:first");if(n.length===0){console.log("something not right with the anchor. Content of $tn is "+i.html());return}t.toggleClass("ag",n.closest(".assetSet").hasClass("ag")).on("click",function(i){i.preventDefault();FilesLightbox.current=n;FilesLightbox.setupData(!1);var r=n.closest(".assetSet").data("sponsoror")===""&&zipSupport.proStatus!=="Pro";return FilesLightbox.downloadClickEvent(n.find(".imagingThumb:first"),t.data("jpgversion"),t.hasClass("ag"),r),!1})})}},resize:function(){if(!FilesLightbox.disabled){var n=$(window).width(),e=$(window).height(),o=$("#FilesLightboxInner").find("img"),t=n*.7,i=e*.7,r=1,u=1,f=1;FilesLightbox.imageWidth!==null&&FilesLightbox.imageHeight!==null&&(FilesLightbox.imageWidth>t&&(r=t/FilesLightbox.imageWidth),FilesLightbox.imageHeight>i&&(u=i/FilesLightbox.imageHeight),f=r<u?r:u,t=FilesLightbox.imageWidth*f,i=FilesLightbox.imageHeight*f);$("#FilesLightboxContainer").css({width:n,height:$(document).height()});$("#FilesLightboxWindow").css({width:n,height:$(window).height()});FilesLightbox.imageHeight!==null&&o.css({height:i});$("#FilesLightboxContainerInner").css({"margin-top":$(window).scrollTop()-30});$("#FilesLightboxContainerInner").css({"padding-left":(n-t)/2,"padding-right":(n-t)/2,"padding-top":(e-i)/2})}}},gTagManager={itemDetails:function(n,t,i,r,u,f){u===!0&&typeof dataLayer!="undefined"&&f===!1&&(window.dataLayer.push({assetId:n,asssetType:t,forProducts:[i],singleProduct:i,fromCompany:r,companyMetric:1}),gTagManager.singleProductTracking([i]))},assetDetails:function(n,t,i,r,u,f){u===!0&&typeof dataLayer!="undefined"&&f===!1&&((i===""||typeof i!="undefined"&&i.length<1)&&(i=undefined),window.dataLayer.push({assetId:n,assetType:t,forProducts:i,fromCompany:r,companyMetric:1}),gTagManager.singleProductTracking(i))},companyDetails:function(n){typeof dataLayer!="undefined"&&window.dataLayer.push({fromCompany:n,companyMetric:1})},singleProductTracking:function(n){var t,r,i;if(typeof dataLayer!="undefined"&&(t=typeof n=="undefined"?"":n,r="singleProductTracker",t!==""))for(i=0;i<t.length;i++)window.dataLayer.push({nonInteraction:1,label:t[i],event:r,singleProduct:t[i],productMetric:1})},partnerCompanyTracking:function(n){typeof n!="undefined"&&window.dataLayer.push({partnerCompany:n,partnerCompanyMetric:1})}};$.validator.setDefaults({highlight:function(n){$(n).closest(".form-group").addClass("has-error")},unhighlight:function(n){$(n).closest(".form-group").removeClass("has-error")}});jQuery.fn.appendVal=function(n){return this.each(function(){$(this).val($(this).val()+n)})};jQuery.fn.showHidden=function(){return this.each(function(){var n=$(this);n.find(".jsshow").show();n.find(".jshide").hide()}),this};jQuery.fn.findAndSelf=function(n){return this.find(n).add(this.filter(n))};jQuery.extend(jQuery.easing,{easeInCirc:function(n){return 1-Math.sqrt(1-Math.pow(n,2))},easeOutCirc:function(n){return Math.sqrt(1-Math.pow(n-1,2))},easeOutQuad:function(n){return 1-(1-n)*(1-n)}});MAIN={isDebug:!1,ajaxTimeout:3e4,maxAjaxTimeout:12e4,ajaxThumbnailsUrl:"",selectAllText:"",deselectAllText:"",tickAllText:"",untickAllText:"",fileCollectionIdsAlreadyClicked:[],errorActionUrl:"",reported:!1,prodItalicsArray:[],videoCheckUrl:"",ie:function(){for(var i,n=3,t=document.createElement("div");t.innerHTML="<!--[if gt IE "+ ++n+"]><i><\/i><![endif]-->",t.getElementsByTagName("i")[0];);return n>4?n:i},usingOldIE:function(){var n=MAIN.ie;return n!==MAIN.ie.undef&&n<8},isIE11orLess:navigator.userAgent.indexOf(".NET CLR")>-1||navigator.appVersion.indexOf("MSIE")!==-1,isChrome:navigator.userAgent.toLowerCase().indexOf("chrome")>-1,refreshContent:function(n,t){return typeof TABBOX!="undefined"&&TABBOX.init(n),typeof ADMIN!="undefined"&&ADMIN.hover(n),typeof translation!="undefined"&&translation.turnOn(n),typeof videoPlayer!="undefined"&&videoPlayer.addPlayButton(n),typeof FilesLightbox!="undefined"?FilesLightbox.addViewButton(n):typeof applyTooltip!="undefined"&&applyTooltip(n),MAIN.loadThumbnails(n,$(window).height()+$(window).scrollTop()),MAIN.displayThumbnails(n,$(window).height()+$(window).scrollTop()),MAIN.firstParaOnlyInit(n),MAIN.tickTrigger(n),MAIN.externalLinkTrigger(n),MAIN.applyNonImgTooltips(n),MAIN.groupItems(n),MAIN.wtf(n),MAIN.turnOffAutoComplete(n),MAIN.addForToLabels(n),MAIN.tabSkipSetup(n),MAIN.checkForVideoThumbs(n),typeof t!="undefined"&&t(n),n},tickTrigger:function(n){$(".jq-ticktrigger",n).off("click").on("click",function(){$(this).closest(".jq-tickcontainer").find(".jq-ticktarget").trigger("click")})},externalLinkTrigger:function(n){n.find(".jq-externalScript").each(function(){var n=$(this),t=n.data("src"),i;typeof t!="undefined"&&(i=setTimeout(function(){var i=t,r=n;i.indexOf("vimeo")!==-1&&videoPlayer.vimeoThumbPlaceholder(i,r)},1500),$.ajax({url:t,dataType:"script",success:function(){n.remove();clearTimeout(i)}}))})},init:function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w){var k,d,b;n&&(MAIN.ajaxTimeout=0,MAIN.isDebug=n);MAIN.ajaxThumbnailsUrl=t;MAIN.selectAllText=f;MAIN.deselectAllText=e;MAIN.tickAllText=o;MAIN.untickAllText=s;MAIN.errorActionUrl=l;MAIN.plusOverflowMoreText=y;w.length&&(MAIN.prodItalicsArray=w.split("|"));MAIN.videoCheckUrl=u;typeof translation!="undefined"&&translation.init(i,r);window.usingOldIE=MAIN.usingOldIE;MAIN.ie<7&&$("body".addclass("ltIE7"));$.ajaxPrefilter(function(n,t,i){var r=$("meta[name='__AjaxRequestVerificationToken']").attr("content");r&&i.setRequestHeader("X-Request-Verification-Token",r)});$.ajaxSetup({tryCount:0,retryLimit:3,timeout:MAIN.ajaxTimeout,cache:!1,error:function(n,t){ajaxError(n,t,MAIN.errorActionUrl,this)}});$.ajaxTransport("+binary",function(n,t,i){if(window.FormData&&(n.dataType&&n.dataType=="binary"||n.data&&(window.ArrayBuffer&&n.data instanceof ArrayBuffer||window.Blob&&n.data instanceof Blob)))return{send:function(t,i){var r=new XMLHttpRequest,f=n.url,e=n.type,o=n.async||!0,s=n.responseType||"blob",h=n.data||null,c=n.username||null,l=n.password||null,u;r.addEventListener("load",function(){var t={};t[n.dataType]=r.response;i(r.status,r.statusText,t,r.getAllResponseHeaders())});r.open(e,f,o,c,l);for(u in t)r.setRequestHeader(u,t[u]);r.responseType=s;r.send(h)},abort:function(){i.abort()}}});$("body").on("click",".thumbnailset:not(.jq-blockHyper) a",function(n){var i=$(this),r=i.attr("href")||i.parent().attr("href"),t,u,f;if(!r||r.indexOf("://")>=0||i.hasClass("jq-filedl")||(t=i.find("img").data("fileguid"),t===null||typeof t=="undefined"))return!0;if(a===""){if($.inArray(t,MAIN.fileCollectionIdsAlreadyClicked)>-1)return!0;u=function(){i.trigger("click")};MAIN.fileCollectionIdsAlreadyClicked.push(t);$.ajax({url:c,data:{fileGuid:t},complete:u,error:u,type:"POST"})}else n.preventDefault(),f=a.replace("~~~file~~~",escape(r)).replace("~~~enc~~~",i.find("img").data("enc")).replace("~~~fileGuid~~~",t),window.location=f;return!1});$(window).on("scroll",function(){if($("body").hasClass("lightboxOpen")&&$("#NewsLightbox").length>0){var t=$(window).height(),i=$(document).scrollTop(),e=i+t,r=$("#NewsLightbox .lightboxInner"),n=r.offset().top,u=r.outerHeight(!0),f=n+u;u>t?(i<n&&$(document).scrollTop(n),f<e&&$(document).scrollTop(f-t)):$(document).scrollTop(n)}});toolTips.init(h);toolTips.toolTips(".tipContainer");country.init();$(document).showHidden();shutters.init();MAIN.firstParaOnlyInit($("#pagebody"));$("body").on("click",".linkContainer",function(){var n=$(this).find("a:first").attr("href");typeof n!="undefined"&&(window.location.href=n)});if(typeof FilterList!="undefined"&&FilterList.init(),$("body.hasThumbs").length>0){MAIN.loadThumbnails($("body"),$(window).height()+$(window).scrollTop());MAIN.displayThumbnails($("body"),$(window).height()+$(window).scrollTop());$(window).on("scroll",function(){MAIN.loadThumbnails($("body"),$(window).height()+$(window).scrollTop());MAIN.displayThumbnails($("body"),$(window).height()+$(window).scrollTop())})}MAIN.initThumbnailsetCollapseCtrls();$("form.searchForm").on("submit",function(n){var t=$(this),e=$("input.searchtext",t).val(),u=t.hasClass("ajax"),f,i,r;return e!==""?u?(t.find("button").addClass("butLoading"),f=t.serialize(),i=t.attr("method"),(typeof i=="undefined"||i==="")&&(i="POST"),$.ajax({url:t.attr("action"),type:i,data:f,complete:$(".butLoading").removeClass("butLoading"),success:function(n){var i=t.data("onsuccess");typeof i!="undefined"&&i!==""&&executeFunctionByName(i,window,n)},error:function(n,t){ajaxError(n,t,MAIN.errorActionUrl,this)}}),!1):!0:(u&&(r=t.data("onempty"),typeof r!="undefined"&&r!==""&&executeFunctionByName(r,window)),n.preventDefault(),!1)});k=function(){var n=$(this);n.find("input").prop("checked")?n.addClass("ticked"):n.removeClass("ticked")};$(".optionList label").each(k).on("change",k);$("body").on("change","select.autosubmit",function(){$(this).closest("form").find(":submit").trigger("click")});$("body").on("click",".jq-table-row-click tr",function(){var n=$(this).find("a").first().attr("href");typeof n!="undefined"&&window.location.assign(n)});$("body").on("paste",".jq-trim",function(){var n=$(this);setTimeout(function(){var t=n.val().trim();n.val(t)},100)});TABBOX.init($("#maincontent"));$(window).on("resize",function(){MSG.resize($(".msgBox"))});if($("iframe").each(function(){var t=$(this),n=t.attr("src");typeof n!="undefined"&&n!==null&&(n.indexOf(" ? ")>0?$(this).attr({src:n+"&wmode=transparent",wmode:"Opaque"}):$(this).attr({src:n+"?wmode=transparent",wmode:"Opaque"}))}),d="placeholder"in document.createElement("input"),!d){$("input[placeholder]").each(function(){var n=$(this);n.val(n.attr("placeholder")).addClass("placeholder")});$("body").on("focus","input[placeholder]",function(){var n=$(this);n.val()===n.attr("placeholder")&&n.val("").removeClass("placeholder")});$("body").on("blur","input[placeholder]",function(){var n=$(this);n.val()===""&&n.val(n.attr("placeholder")).addClass("placeholder")})}$("body").on("click","a.toggle",function(){var n=$(this).parents("ul");n.find(".togglevisible-True, .togglevisible-False").toggleClass("togglevisible-True togglevisible-False");n.find(".togglevisible-False").hide();n.find(".togglevisible-True").show()}).on("click",".jq-anchor",function(n){var t,i;return(n.preventDefault(),t=$(this),t.hasClass("jq-anchorback"))?(i=t.data("backcount")||1,history.go(-i),!1):(window.location.href=t.data("href"),!1)});$(".jq-todo").off("click").on("click",function(n){return n.preventDefault(),n.stopPropagation(),MSG.show("/Working/WIP",$(this)),!1});$(".jq-fetch").each(function(){var n=$(this).removeClass("jq-fetch"),t=n.data("func")||"",i=t!=="";$.ajax({url:n.data("href"),method:"GET",dataType:i?"json":"html",success:function(r){i?executeFunctionByName(t,window,r):n.html(r)}})});MAIN.ageGateMechanism=p;$(document).on("click",".ag a:not(.thumbView) .imagingThumb",function(n){MAIN.ageGateClick(n)}).on("click",".jq-submitloading",function(){var t=$(this),n=t.closest("form");n.length>0&&!n.valid()||$(this).addClass("butLoading")});MENU.initMenu(b);MAIN.panelFetchUrl=v;b=$("body");$(function(){MAIN.groupItems(b);MAIN.tickTrigger(b);MAIN.externalLinkTrigger(b);MAIN.applyNonImgTooltips(b);MAIN.wtf(b);MAIN.turnOffAutoComplete(b);$(".jq-cookie-button").on("click",function(n){n.preventDefault();var t=$(this),i=t.closest("form"),r=t.closest(".jq-cookie-container").slideUp();return $.ajax({url:i.prop("action"),method:i.prop("method"),data:t.prop("name")+"="+encodeURI(t.val()),error:function(){r.slideDown()},success:function(n){typeof Cookies!="undefined"&&(n.add?Cookies.set(n.cookie,!0,{expires:730,sameSite:"strict"}):Cookies.remove(n.cookie))}}),!1});MAIN.addForToLabels(b);MAIN.tabSkipSetup(b);MAIN.checkForVideoThumbs(b)});$(document).on("change",".jq-anchor-jump",function(){var n=$(this).val();n!==""&&n.indexOf("://")===-1&&n.indexOf("..")===-1&&(window.location=n)})},tabSkipSetup:function(n){setTimeout(function(){$(".jq-tabskip:not(.jq-tabskip-done)",n).each(function(){var n=$(this),i=n.data("tabskipcount")||0,t=n.data("tabskipselector"),r=typeof t=="undefined"?n:$(t,n);if(r.length===0){if(i<10){n.data("tabskipcount",++i);MAIN.tabSkipSetup(n.parent());return}console.log("Could not find item matching "+(typeof t=="undefined"?"this":t));return}r.prop("tabindex","-1").prop("aria-hidden",!0);n.addClass("jq-tabskip-done")})},1e3)},turnOffAutoComplete:function(n){$("form",n).not(".jq-allowautocomplete").each(function(){var n=$(this).prop("autocomplete","off");n.find("input:text,textarea").prop("autocomplete",n.prop("autocomplete")||"off")})},addForToLabels:function(n){$("label.jq-needsfor",n).each(function(){var n=$(this);(n.prop("for")||!0)&&n.prop("for",n.parent().find("input[id]:visible:first").prop("id"))})},wtf:function(n){var t,i;(typeof n=="undefined"||n===null)&&(n=$("body"));t=n.find(".notlive:not(.status-exclusive)");t.length>0&&typeof ADMIN=="undefined"&&!MAIN.reported&&(MAIN.reported=!0,MAIN.isDebug?(alert("Showing admin stuff when it shouldn't"),t.each(function(){alert($(this).outerHTML())})):(i=[],t.each(function(){i.push($(this).outerHTML())}),t.remove(),$.ajax({type:"POST",url:"/Site/CarefulNow",dataType:"json",contentType:"application/json",data:JSON.stringify({elements:i,url:window.location.href})})))},ageGateClick:function(n,t){if(MAIN.ageGateMechanism==="Javascript"){var i=$(".jq-agegatecontent:first");return(t=t||$("span:last",i).html()||i.html(),!t||confirm(t))?!0:(typeof n!="undefined"&&(n.preventDefault(),n.stopPropagation()),!1)}return!0},firstParaOnlyInit:function(n){var t=$("#moreparasbutton");$(".firstParaOnly",n).each(function(n){var i=$(this).removeClass("firstParaOnly"),u=i.find("p");if(u.length>1){u.hide();t.clone().css("display","block").prop("id","moreParas"+n).appendTo($("p:first-child",i).show()).on("click",function(n){return n.preventDefault(),$(this).hide(),u.slideDown(),!1});return}var r=i.html(),e=new RegExp("(<br\\s*\\/?>\\s*){2,}","gmi"),f=r.search(e);if(f>=0){i.html(r.substr(0,f));i.data("content",r);t.clone().prop("id","moreParas"+n).css("display","block").appendTo(i).on("click",function(n){return n.preventDefault(),i.html(r),!1})}else console.log("No paras or line breaks found")})},getThumbsForCollection:function(n){n.each(function(){var t=$(this),n;t.hasClass("requested")||(t.addClass("requested"),n=t.parent(),$.ajax({url:MAIN.ajaxThumbnailsUrl,cache:!0,data:t.data("x"),dataType:"html",timeout:MAIN.ajaxTimeout,success:function(i){var u,r;n.hide();i.length>1?(u=t.slideDown().closest(".assetSet"),t.replaceWith(i),r=u.find(".butTickAll"),$(".jq-tn",u).length>0&&r.fadeIn(),typeof zipSupport!="undefined"&&r.hasClass("untick")&&zipSupport.tickAll(r,!0),typeof videoPlayer!="undefined"&&videoPlayer.addPlayButton(n),typeof FilesLightbox!="undefined"?FilesLightbox.addViewButton(n):applyTooltip(n),MAIN.hideExcessThumbs(n),n.fadeIn(function(){if(n.data("onthumbload")){var t=n.data("onthumbload");executeFunctionByName(t,window,n)}MAIN.externalLinkTrigger(n)})):(t.replaceWith("<li><div class=thumbActions>--<\/div><\/li>"),n.fadeIn())},error:function(n,i){ajaxError(n,i,null,this,t,null,1)},complete:function(){var i=n.parents("div.tabboxOuter").filter(":visible"),t;i.length>0?(MAIN.displayThumbnails(n),MAIN.loadThumbnails(i[0])):(MAIN.displayThumbnails($(document)),MAIN.loadThumbnails($(document)));$(".jq-chooseLogo").data("currentthumb")&&(t=$(".tabbox").data("currentthumb"),$(".jq-chooseLogo").find("img[data-fileguid='"+t+"']").length>0&&($(".jq-chooseLogo").find("img[data-fileguid='"+t+"']").closest("li").addClass("currentImageThumb"),$(".jq-chooseLogo").removeData("currentthumb")))}}))})},hideExcessThumbs:function(n){typeof MAIN.plusOverflowMoreText=="undefined"&&(MAIN.plusOverflowMoreText="+ {OverflowCount} more");n.each(function(){var n=$(this),i=n.data("display-limit"),t;if(typeof i=="number"&&(t=n.find(".tn:gt("+(i-1)+")").addClass("hidden"),t.length>0))$("<li class='tn-more'><a>"+MAIN.plusOverflowMoreText.replace("{OverflowCount}",t.length)+"<\/a><\/li>").appendTo(n).on("click",function(){$(this).parents(".thumbnailset").find(".tn.hidden").removeClass("hidden").css("display","inline-block");MAIN.displayThumbnails($("body"),$(window).height()+$(window).scrollTop());$(this).remove()})})},displayThumbnails:function(n){$(".tn:not(.hidden) .imagingThumb.lazy",n).each(function(){var n=$(this);if(n.offset().top<=$(window).scrollTop()+window.innerHeight)n.removeClass("lazy").css("opacity",0).attr("src",n.data("src")).on("load",function(){n.css("opacity",1)})});$(".attachedAssets input:checkbox").length<1?$("aside .filedownloadcontainer").hide():$("aside .filedownloadcontainer").show()},loadThumbnails:function(n){var t,i;(!MSG.active||$(n).parents(".msgBoxBody").length>0)&&($(".ag:first").length>0&&$(".jq-agegatecontent").fadeIn(),t=$(".ph:visible:first",n),t.length>0&&t.parents(".collapsed").length===0&&(i=t.closest(".assetSet"),i.offset().top<=$(window).scrollTop()+window.innerHeight&&MAIN.getThumbsForCollection(t)))},initThumbnailsetCollapseCtrls:function(){$("body").on("click",".assetsListItem.collapsed",function(){console.log("Open");var n=$(this),t=$(".ph",n);t.length>0?(t.addClass("fetching"),MAIN.getThumbsForCollection(t)):n.find(".thumbnailset").slideDown(400,"easeOutQuad");n.removeClass("collapsed")});$("body").on("click",".expandable-close",function(){var n=$(this).parents(".assetsListItem");n.addClass("collapsed");n.find(".thumbnailset").slideUp(400,"easeOutQuad")})},regionSelectSetup:function(n){$("body").on("click","a.jq-country-clicked",function(t){t.preventDefault();var i=$(this),r=i.closest("form");return r.length===0&&(r=i.closest(".countrylist").siblings(".regionForm")),i.data("id")!==n&&(r.find(".jq-selectedRegionHidden").val(i.data("id")).fadeOut(),r.find("button").trigger("click"),$("#countrytext").html($("#countrytext").data("loadingmsg"))),!1})},regionSelectPostback:function(n){location.href=unescape(n[0])},loginResponse:function(n){var r=n[1]||"body",t=$(".jq-login",$(r)),i=t.filter(".jq-loginfirst:first");i.length===0&&(i=t.first());i.before(n[0]);t.remove()},loginError:function(n){$("div.validation-summary-errors").hide();$("#loginErrorMessage").addClass("validation-summary-errors").show().find(".jq-errormessage").html(n[0]);n[1]&&n[1].length>0&&n[1].indexOf("//")===-1&&MAIN.redirect(n[1])},redirect:function(n){typeof n=="object"&&(n=n[1]);window.location=n},selectMenu:function(n){$("li.menuactive").removeClass("active menuactive");$("li.menu-"+n).addClass("active menuactive")},setupLinkCheck:function(n,t){$(".urlTest",n).hide();var i=$(".jq-invalidUrl",n),r=$(".jq-checkingUrl",n),u=$(".jq-validUrl",n);$("input.jq-externalLink",n).on("focusout",function(){r.show();u.hide();i.hide();var n=$(this);$.ajax({url:t,data:"url="+n.val()+"&requiresProtocol="+n.hasClass("jq-requiresProtocol"),type:"POST",success:function(n){r.hide();n.args[0]==="false"?i.text(n.args[1]).show():u.show()}})})},getUploaderObject:function(){return typeof fineUploaderSupport!="undefined"?fineUploaderSupport:typeof pluploadSupport!="undefined"?pluploadSupport:null},applyNonImgTooltips:function(n){typeof $.fn.wTooltip!="undefined"&&n.find(".jq-tooltip[title]").wTooltip({delay:200,fadeIn:200,fadeOut:100,style:!1,className:"wTooltip",offsetX:8,offsetY:19})},groupItems:function(n){var t="";$(".jq-grouping",n).each(function(){var n=$(this),i=n.find(".jq-groupby:first"),r=i.length>0?i.html():n.html();t===r?n.hide():(n.show(),t=r)})},removeAccents:function(n){const t="ÀÁÂÃÄÅĄàáâãäåąßÒÓÔÕÕÖØŐòóôőõöøĎďDŽdžÈÉÊËĘèéêëęðÇçČčĆćÐÌÍÎÏìíîïÙÚÛÜŰùűúûüĽĹŁľĺłÑŇŃňñńŔŕŠŚšśŤťŸÝÿýŽŻŹžżź",i="AAAAAAAaaaaaaasOOOOOOOOoooooooDdDZdzEEEEEeeeeeeCcCcCcDIIIIiiiiUUUUUuuuuuLLLlllNNNnnnRrSSssTtYYyyZZZzzz";return n.split("").map(function(n){const r=t.indexOf(n);return r!==-1?i[r]:n}).join("")},encodeSearchPhrase:function(n){return n.replace(/&/,"%26")},autoCompleteSearchBox:function(n,t,i){var r="";$("#searchtext").easyAutocomplete({url:function(t){return r=t,n+"&id="+MAIN.encodeSearchPhrase(t)},categories:[{listLocation:"ProductList",header:t,maxNumberOfElements:1e3,getValue:"Name"},{listLocation:"CompaniesList",header:i,maxNumberOfElements:1e3,getValue:"Name"}],matchResponseProperty:"Phrase",theme:"bootstrap",adjustWidth:!1,list:{maxNumberOfElements:1e3,showAnimation:{type:"slide",time:150},hideAnimation:{type:"slide",time:150},onShowListEvent:function(){$("body").addClass("autocomplete-active")},onHideListEvent:function(){$("body").removeClass("autocomplete-active")},onSelectItemEvent:function(){$("#searchtext").val(r)},onChooseEvent:function(){$("#searchtext").val(r);var n=$("#searchtext").getSelectedItemData().Url;typeof n!="undefined"&&n&&(window.location.href=n)}},template:{type:"custom",method:function(n,t){var i;t.Value=n;switch(t.Type){case 0:t.Separator=t.Platforms.length>0?" &#124; ":"";i="#AutoCompleteProductTemplate";break;case 1:i="#AutoCompleteCompanyTemplate";break;default:i="#AutoCompleteMoreTemplate"}return $.tmpl($(i),t).prop("outerHTML")}},requestDelay:500})},itemItalics:function(n){$(function(){var t,r,i,u;((typeof n=="undefined"||n==="")&&(n=!1),t=MAIN.prodItalicsArray,typeof t!="undefined"&&t!==[]&&t!==""&&t.length!==0)&&(t.push('^".*?"$'),r=".prod-name",i=$("body").find(r).not(".jq-prod-formatted"),typeof i!="undefined"&&i.length!==0)&&(u=new RegExp(t.join("|"),"gi"),i.each(function(t,i){var r=$(i),e=r.text(),f=e.replace(u,function(n){return"<span class='prod-normal'>"+n+"<\/span>"});n===!0?(r.contents().last()[0].textContent="",r.append(f),r.addClass("jq-prod-formatted")):(r.html(f),r.addClass("jq-prod-formatted"))}),console.log("products formatted!"))})},searchBarClean:function(n){return(n.indexOf("<")!==-1||n.indexOf(">")!==-1)&&(n=n.replace("<","").replace(">",""),$(".jq-searchAutocomplete").val(n)),n},checkForVideoThumbs:function(n,t){if(typeof MAIN.videoCheckUrl!="undefined"&&MAIN.videoCheckUrl!==null&&MAIN.videoCheckUrl!==""){typeof n=="undefined"&&(n=$(document));typeof n=="string"&&(n=$("<div/>").html(n));var i=$(".jq-videothumb",n),r=i.removeClass("jq-videothumb").addClass("jq-videothumbfetching").map(function(){var n=$(this);return n.prop("id")+"|"+n.closest(".jq-fig").data("emptyfileids")}).get();if(r.length===0){typeof t=="function"&&t(n.html());return}$.ajax({url:MAIN.videoCheckUrl,data:"ids="+r.join(";"),method:"POST",dataType:"json",success:function(i){if(typeof i.args!="undefined"){var r=JSON.parse(i.args[0]);$.each(r,function(n,t){var i=$("#"+t.rowGuid).removeClass("jq-videothumbfetching");(t.src||!1)&&i.prop("src",t.src)})}typeof t=="function"&&t(n.html())},complete:function(){$(".jq-videothumbfetching",i).addClass("jq-videothumb").removeClass("jq-videothumbfetching")}})}},downloadFile:function(n,t){var u,r,i;typeof window.navigator.msSaveBlob!="undefined"?window.navigator.msSaveBlob(t,n):(u=window.URL||window.webkitURL,r=u.createObjectURL(t),n?(i=document.createElement("a"),typeof i.download=="undefined"?window.location.href=r:(i.href=r,i.download=n,document.body.appendChild(i),i.click())):window.location.href=r,setTimeout(function(){u.revokeObjectURL(r)},100))},downloadFromPath:function(n,t){var i=document.createElement("a");i.href=t;i.download=n;i.click()}};var MENU={initMenu:function(n){$("#mainmenuinner > ul > li:has(ul)",n).hoverIntent(function(){var n=$("ul:first",this);n.stop(!0,!0);clearTimeout(n.data("timeoutId"));$("#mainmenuinner > ul > li > ul").not(n).hide().find("li > ul").hide();usingOldIE?n.show():n.fadeTo("fast",1)},function(){var n=$("ul:first",this),t=setTimeout(function(){usingOldIE?n.hide().find("ul").hide():n.fadeOut("fast").find("ul").hide()},650);n.data("timeoutId",t)});$("#mainmenuinner > ul > li > ul > li:has(ul)",n).hoverIntent(function(){var n=$("ul:first",this);n.stop(!0,!0);clearTimeout(n.data("timeoutId"));$("#mainmenuinner > ul > li > ul > li > ul").not(n).hide();usingOldIE?n.show():n.fadeTo("fast",1)},function(){var n=$("ul:first",this),t=setTimeout(function(){usingOldIE?n.hide():n.fadeOut("fast")},650);n.data("timeoutId",t)});$("#mainmenuinner > ul > li > ul > li > ul > li:has(ul)",n).hoverIntent(function(){var n=$("ul:first",this);n.stop(!0,!0);clearTimeout(n.data("timeoutId"));$("#mainmenuinner > ul > li > ul > li > ul > li > ul").not(n).hide();usingOldIE?n.show():n.fadeTo("fast",1)},function(){var n=$("ul:first",this),t=setTimeout(function(){usingOldIE?n.hide():n.fadeOut("fast")},650);n.data("timeoutId",t)});$("#mainmenuinner ul li ul li",n).has("ul").children("a, div").addClass("hassubmenu");$("#mainmenuinner > ul",n).find("ul").has("ul").each(function(){var n=$(this),t;n.evenIfHidden(function(n){t=n.outerWidth()});n.children().children("ul").css("left",t)});$(".jq-darkmodetoggle",n).on("click",function(n){n.preventDefault();var t=$("body");return t.toggleClass("dark-mode"),t.hasClass("dark-mode")?Cookies.set("CssTheme","dark-mode",{expires:365}):Cookies.remove("CssTheme"),!1})}},MSG={active:!1,current:null,previous:[],fadeInTime:400,fadeOutTime:400,centeringSpeed:300,minTopMargin:20,$msgContainer:$("#msgContainer"),destroyOnComplete:!1,closeAll:function(){while(MSG.current)MSG.hide();$("div.msgBox").remove()},show:function(n,t,i){var f=!0,e,r,o,u,s,h,c;return(typeof t=="undefined"||t===null)&&(t=$(document)),e=n.replace(/[^A-Za-z0-9]/g,"_"),r=$("#"+e),r.length>0&&t.hasClass("msgDestroy")&&r.remove(),r.length===0||t.hasClass("msgDestroy")?($('<div class="msgBox" id='+e+'><div class=\'msgBg\'><\/div><div class=msgDiv2><div class="msgDiv3 msgLoading" style="position:relative"><div class=msgDiv4><div class=msgDiv5 style="height:150px"><\/div><\/div><\/div><\/div><\/div>').appendTo("#msgContainer"),MSG.$msgContainer.fadeIn(MSG.fadeOutTime,"easeOutCirc"),r=$("#"+e),r.data("prevScrollTop",$(window).scrollTop()),MSG.resize(r),o=$(".msgVisible").length,r.addClass("msgVisible").css({zIndex:2001+o,display:"block"}),o===0&&r.addClass("msgFirst"),r.fadeTo(MSG.fadeInTime,1,"easeOutCirc"),r.updateLocal=!1,u=r.find(".msgDiv4"),typeof i=="undefined"?(n[0]==="#"?(MSG.setCurrent(r),s=$(n),s.length&&MSG.copyform(s,u),MSG.resize(r),MSG.current.updateLocal=!0,MSG.current.updateId=n,u.parent().removeClass("msgLoading"),MSG.resizeOnLoad(r),MSG.display(r),f=!1):(h="GET",c="",t&&(t.hasClass("msgPost")&&(h="POST",c=t.closest("form").serialize()),t.hasClass("msgShowLoading")&&t.addClass("butLoading")),$.ajax({url:n+"#messagecontent",method:h,data:c,success:function(i){typeof i.redirectLocation!="undefined"&&i.redirectLocation==="#"&&location.reload();MSG.setCurrent(r,n);u.html(i);u.parent().removeClass("msgLoading");t&&t.removeClass("butLoading msgSubmitted");MSG.removeButtonLoading();MSG.resizeOnLoad(r);r.find(".msgContent").fadeTo(MSG.fadeInTime,1);MSG.validate(r);toolTips.toolTips(r.find(".jq-tipTrigger"))},error:MSG.ajaxError})),r.data("$caller",t),MSG.displayCallback(t.data("msgcallback"),r)):(f=!1,MSG.setCurrent(r),u.find(".msgDiv5").replaceWith(i),u.parent().removeClass("msgLoading"),MSG.resizeOnLoad(r),r.find(".msgContent").fadeTo(MSG.fadeInTime,1),MSG.validate(r))):(f=!1,MSG.display(r),MSG.validate(r),r.data("$caller",t),MSG.displayCallback(t.data("msgcallback"),r)),MSG.active=!0,f},reload:function(){var t=MSG.current,n,i;(typeof t.messageHref=="undefined"||t.messageHref.substr(0,1)==="#")&&alert("Cannot reload msg window");n=$(t);i=n.find(".msgDiv4");i.parent().addClass("msgLoading");$.ajax({url:t.messageHref+"#messagecontent",method:"GET",success:function(t){i.html(t);i.parent().removeClass("msgLoading");MSG.removeButtonLoading();MSG.resizeOnLoad(n);n.find(".msgContent").fadeTo(MSG.fadeInTime,1);MSG.validate(n)}})},display:function(n){MSG.resize(n);var t=n.hasClass("msgVisible")?$(".msgVisible").length-1:$(".msgVisible").length;n.find(".msgContent").css("opacity",0);n.addClass("msgVisible").css({zIndex:2001+t,display:"block"});t===0&&n.addClass("msgFirst");MSG.$msgContainer.fadeTo(MSG.fadeInTime,1);n.find(".msgContent").fadeTo(MSG.fadeInTime,1,"easeOutCirc");MSG.setCurrent(n)},setCurrent:function(n,t){MSG.current&&MSG.current!==n[0]&&($(MSG.current).addClass("formInactive"),MSG.previous.push(MSG.current));MSG.current=n[0];MSG.current.messageHref=t},validate:function(n){n.find("form").each(function(){$.validator.unobtrusive.parse($(this).removeData("validator").removeData("unobtrusiveValidation"))})},resizeOnLoad:function(n){MSG.refreshContent(n);var i=n.find("img"),t=i.length;t===0?MSG.resize(n):i.on("load",function(){t--;t===0&&MSG.resize(n)}).each(function(){this.complete&&$(this).trigger("load")})},successRefresh:function(n){n[0]===".PressKitList"&&MSG.changesMade();MSG.refreshContent(n[1].trim(),n[0])},append:function(n){var i=$(n[0]),t=$($.parseHTML(n[1].replace(/^\s+|\s+$/g,""),!0));i.append(t);MSG.refreshContent(t).contentReveal()},refreshContent:function(n,t,i,r){return n instanceof jQuery||(n=$($.parseHTML(n.trim(),!0))),typeof i=="undefined"&&(i=!1),typeof t!="undefined"&&t&&(t instanceof jQuery||(t=$(t)),i?t.html(n):t.replaceWith(n)),MAIN.refreshContent(n,r),n},displayCallback:function(n,t){n!==""&&typeof n!="undefined"&&executeFunctionByName(n,window,t)},resize:function(n){var i=n.find(".msgDiv4"),r=i.height(),t;t=($(window).height()-r)/3;t<0&&(t=0);i.css("margin-top",$(window).scrollTop()+t);MSG.resizeBG(n)},resizeBG:function(n){n.css("height",$(document).height());MSG.$msgContainer.css("height",$(document).height())},height:function(n){var r=n.find(".msgDiv4"),i,t;return r.evenIfHidden(function(n){i=n.height()}),t=r.find(".tabboxOuter.active:first"),t.length===0&&(t=r.find(".tabboxOuter:first")),t.length>0&&t.evenIfHidden(function(n){i=i+n.height()}),i},destroy:function(n){n.remove();MSG.destroyOnComplete=!1},hide:function(n,t,i){typeof i=="undefined"&&(i=MSG.destroyOnComplete);typeof n=="undefined"&&(n=$(MSG.current));$(".formDisable",n).hide();MSG.current=MSG.previous.pop();$(MSG.current).removeClass("formInactive");n.hasClass("msgFirst")&&(MSG.$msgContainer.fadeOut(MSG.fadeOutTime,"easeOutCirc"),MSG.active=!1);n.removeClass("msgVisible").removeClass("formInactive").fadeOut(MSG.fadeOutTime,"easeOutCirc",function(){i&&MSG.destroy(n);n.removeClass("msgFirst");t&&t()});$("html,body").animate({scrollTop:n.data("prevScrollTop")},250,"easeOutCirc")},center:function(){},copyform:function(n,t){t.html(n.html());$(":input[name]:not(:checkbox, :radio)",n).each(function(){$(":input[name="+$(this).attr("name").replace(".","\\.")+"]",n).each(function(n){var i=$(this);$("[name="+i.attr("name").replace(".","\\.")+"]:eq("+n+")",t).val(i.val())})});$(":checkbox, :radio",n).each(function(){var n=$(this),i=n.attr("checked")==="checked";$(":input[name="+n.attr("name").replace(".","\\.")+']:not([value!="'+n.attr("value")+'"])',t).attr("checked",i)})},initButtons:function(n){return n},removeButtonLoading:function(){$(".butLoading").removeClass("butLoading msgSubmitted unclickable").prop("disabled",!1)},changesMade:function(){$("div.jq-confirmChanges:first").addClass("jq-changesMade")},ajaxFormComplete:function(n){var i={newpanel:function(n){if(n.hide&&MSG.hide($(MSG.current)),n.html)MSG.show(generateUUID(),$(document),n.html);else{if(!n.url||n.url===""){alert("No url supplied for new panel");return}MSG.show(n.url)}},redirect:function(n){var t=function(){$(window).off("beforeunload");n.redirectLocation==="#"?location.reload(!0):window.location=unescape(n.redirectLocation)};MSG.current?MSG.hide($(MSG.current),function(){t()}):t()},success:function(n){typeof MSG.current=="undefined"||MSG.current===null||n.retain?n.onsuccess&&n.onsuccess!==""&&executeFunctionByName(n.onsuccess,window,typeof n.args=="undefined"?n:n.args):MSG.hide($(MSG.current),function(){n.onsuccess&&n.onsuccess!==""&&executeFunctionByName(n.onsuccess,window,typeof n.args=="undefined"?n:n.args,$(MSG.current))})},failure:function(n){n.onerror&&n.onerror!==""&&executeFunctionByName(n.onerror,window,typeof n.args=="undefined"?n:n.args);n.errorMessage&&alert(n.errorMessage)},validationError:function(n){n.onerror&&n.onerror!==""&&executeFunctionByName(n.onerror,window,typeof n.args=="undefined"?n:n.args);var i={},t=null;n.errors.forEach(function(n){i[n.fieldName]=n.message;t===null&&(t=$("#"+n.fieldName).closest("form"))});t&&t.validate().showErrors(i)},update:function(n){var t=$(MSG.current);t.length>0?MSG.hide(t,function(){MSG.show(generateUUID(),$(document),n)}):MSG.show(generateUUID(),$(document),n)},attachment:function(n){var t=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(disposition),i,r;t!=null&&t[1]&&(filename=t[1].replace(/['"]/g,""));i=n.getResponseHeader("Content-Type");r=new Blob([n.responseText],{type:i});MAIN.downloadFile(filename,r);MSG.hide()}},t;if(n&&n.responseText)try{t=JSON.parse(n.responseText);switch(t.result){case"p":MSG.removeButtonLoading();i.newpanel(t);break;case"r":i.redirect(t);return;case"y":MSG.removeButtonLoading();i.success(t);break;case"n":MSG.removeButtonLoading();i.failure(t);break;case"v":MSG.removeButtonLoading();i.validationError(t)}t.oncomplete&&t.oncomplete!==""&&executeFunctionByName(t.oncomplete,window,typeof t.args=="undefined"?t:t.args)}catch(r){i.update(n.responseText)}else i.attachment(n)},submit:function(n,t,i,r){var e,s,o,u,f;return(MSG.previous.length>0&&n.parents(".msgContent").hasClass("jq-reportChanges")&&(console.log("msgSubmit event within confirmChanges msgbox"),$(MSG.previous[MSG.previous.length-1]).find(".jq-confirmChanges").addClass("jq-changesMade")),e=n.closest("form"),e.length===0||n.hasClass("msgSubmitted"))?!1:e.valid()?(n.addClass("butLoading msgSubmitted"),n.hasClass("msgDestroy")&&(MSG.destroyOnComplete=!0),s=e.serialize(),n[0].name!==""&&n[0].value!==""&&(s+=(s===""?"":"&")+n[0].name+"="+escape(n[0].value)),o=n.hasClass("get")?"GET":e.attr("method"),(typeof o=="undefined"||o==="")&&(o="POST"),u={url:typeof t!="string"?e.attr("action"):t,type:o,data:s,complete:MSG.ajaxFormComplete,error:function(n,t){ajaxError(n,t,MAIN.errorActionUrl,this)}},typeof n.data("ajax-tryCount")!="undefined"&&(u.tryCount=n.data("ajax-tryCount")),typeof n.data("ajax-timeout")!="undefined"&&(u.timeout=n.data("ajax-timeout")),typeof n.data("ajax-retryLimit")!="undefined"&&(u.retryLimit=n.data("ajax-retryLimit")),typeof n.data("ajax-cache")!="undefined"&&(u.cache=n.data("ajax-cache")),typeof i!="undefined"&&i!==null&&(typeof i.tryCount!="undefined"&&(u.tryCount=i.tryCount),typeof i.timeout!="undefined"&&(u.timeout=i.timeout),typeof i.retryLimit!="undefined"&&(u.retryLimit=i.retryLimit),typeof i.cache!="undefined"&&(u.cache=i.cache),typeof i.ajaxError!="undefined"&&(u.error=function(t,r){MSG.show(i.ajaxError+"?statusCode="+t.status+"&exception="+r+"&errorMessage="+(t.responseText&&t.responseText.substr(0,1750)),n)})),typeof n.data("ajax-tryCount")!="undefined"&&(u.tryCount=n.data("ajax-tryCount")),typeof n.data("ajax-timeout")!="undefined"&&(u.timeout=n.data("ajax-timeout")),typeof n.data("ajax-retryLimit")!="undefined"&&(u.retryLimit=n.data("ajax-retryLimit")),typeof n.data("ajax-cache")!="undefined"&&(u.cache=n.data("ajax-cache")),typeof n.data("ajax-error")!="undefined"&&(u.error=function(t,i){MSG.show(n.data("ajax-error")+"?statusCode="+t.status+"&exception="+i+"&errorMessage="+(t.responseText&&t.responseText.substr(0,1750)),n)}),r||!1?(f=new XMLHttpRequest,f.open("POST",u.url,!0),f.responseType="arraybuffer",f.setRequestHeader("Content-type","application/x-www-form-urlencoded"),f.timeout=u.timeout,f.onload=function(){var i,e,c,o,l,s,h,r,t;if(this.status===200){if(typeof MSG.onSuccess=="function")MSG.onSuccess(this,n);n.hasClass("msgKeep")||MSG.hide();i="";e=f.getResponseHeader("Content-Disposition");e&&e.indexOf("attachment")!==-1&&(c=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/,o=c.exec(e),o!=null&&o[1]&&(i=o[1].replace(/['"]/g,"")));l=f.getResponseHeader("Content-Type");s=new Blob([this.response],{type:l});typeof window.navigator.msSaveBlob!="undefined"?window.navigator.msSaveBlob(s,i):(h=window.URL||window.webkitURL,r=h.createObjectURL(s),i?(t=document.createElement("a"),typeof t.download=="undefined"?window.location=r:(t.href=r,t.download=i,document.body.appendChild(t),t.click())):window.location=r,setTimeout(function(){h.revokeObjectURL(r)},100))}else if(typeof MSG.onError=="undefined")u.error(this.status);else MSG.onError(this,n);typeof callback=="function"&&callback()},f.send(u.data)):$.ajax(u),!0):(MSG.removeButtonLoading(),$(".validation-summary-errors, .errorAlert:not(.manualError), .field-validation-error",e).slideDown(),!1)},getHref:function(n){var o=typeof n=="string"?n:n.data("href")||n.attr("href"),s=/---form---([^-]+)-/g,f,e=typeof MSG.current=="undefined"||MSG.current===null?$(document):$(MSG.current),u=o;for((typeof MSG=="undefined"||typeof MSG.current=="undefined")&&(MSG.current=null);f=s.exec(o);){console.log("found match = "+f[0]);var r=null,t=f[1],i=$("."+t,e);i.length===0&&(i=$("#"+t,e));i.length===0?(i=$("input:checked[name='"+t+"']",e),i.length===0?(console.log("Couldn't find anything with the class or id "+t),MAIN.isDebug&&alert("Haven't been able to find an element with class or id or name of "+t)):r=i.map(function(){return this.value}).get().join()):r=i.first().val();r!==null&&(u=u.replace("---form---"+t+"-",escape(r)),console.log("ElementId = "+t+"; elementVal = "+r+"; href = "+u))}return u},cancel:function(n){if(MSG.removeButtonLoading(),typeof ADMIN!="undefined"&&ADMIN.confirmUnsavedChangesUrl!==""){var t=n.closest(".jq-changesMade",$(MSG.current));if(t.length>0)return t.removeClass("jq-changesMade"),MSG.show(ADMIN.confirmUnsavedChangesUrl),!1}MSG.hide($(MSG.current),n.hasClass("msgReset")?function(){var t=n.closest("form");t.length>0&&(t.get(0).reset(),t.find("div.validation-summary-valid, span.field-validation-valid").hide())}:null,n.hasClass("msgDestroy"))}},$body=$("body");$body.on("click",".msgLaunch",function(n){n.preventDefault();var t=$(this);t.hasClass("disabled")||MSG.show(MSG.getHref(t),t)});$body.on("click",".msgNext",function(n){n.preventDefault();MSG.hide($(MSG.current));var t=$(this);MSG.show(MSG.getHref(t),t)});$body.on("click",".msgBack",function(n){n.preventDefault();MSG.hide($(MSG.current));$(MSG.current).removeClass("formInactive");MSG.display($(MSG.current))});$body.on("click",".msgCancel",function(n){return n.preventDefault(),n.stopPropagation(),MSG.cancel($(this)),!1});$body.on("click",".msgClose",function(n){var r=$(this),t,i;r.hasClass("msgContinue")||n.preventDefault();MSG.current.updateLocal&&(t=$(MSG.current.updateId),i=$(MSG.current).find("div > div > div"),$(this).hasClass("msgUndo")?MSG.copyform(t,i):MSG.copyform(i,t));MSG.hide($(MSG.current),null,$(this).hasClass("msgDestroy"))});$body.on("click",".msgClosePrevious",function(n){return n.preventDefault(),MSG.hide($(MSG.current),function(){var n=$(".msgCancel:first",$(MSG.current));n.length>0?n.trigger("click"):MSG.cancel(n)},$(this).hasClass("msgDestroy")),!1});$body.on("click",".jq-adminOptionList:not(.jq-adminOptionListKnockout) li:not(.chooseAll) label",function(n){if(n.preventDefault(),n.target.tagName.toLowerCase()==="input")return!1;var t=$(this),i=t.find("input:checkbox,input:radio");return i.attr("disabled")?!1:(i.trigger("click"),t.hasClass("selected")?(t.removeClass("selected"),i.attr("checked",!1)):(t.addClass("selected"),i.attr("checked",!0)),i.is("[type='radio']")&&t.closest(".jq-adminOptionList").find("input:radio:not(:checked)").each(function(){$(this).closest("label").removeClass("selected")}),!0)});$body.on("click",".jq-adminOptionList li.chooseAll label",function(n){n.preventDefault();var r=$(this),f=r.closest(".jq-adminOptionList"),i=f.find("li label:not(.chooseAll):visible").add(r),t=$(MSG.current),u=r.find("span");u.text()===MAIN.deselectAllText?(i.removeClass("selected").find("input:checkbox:enabled").prop("checked",!1),u.text(MAIN.selectAllText),typeof productEdit!="undefined"&&(i.filter(".jq-country").length?($("input[name='ToggleAllFeatured'][value='false']",t).prop("checked",!0),productEdit.enableAllFeaturedStars("false",t),$(".jq-allYourRegions",t).removeClass("hid"),$(".jq-featuredFlag",t).css("display","none")):i.filter(".jq-featuredRegion").length&&$("input[name='ToggleAllFeatured'][value='false']",t).prop("checked",!0))):(i.not(".unclickable").addClass("selected").find("input:checkbox").prop("checked","checked"),u.text(MAIN.deselectAllText),typeof productEdit!="undefined"&&(i.filter(".jq-country").length?(productEdit.enableAllFeaturedStars("true",t),$(".jq-allYourRegions",t).removeClass("hid"),$(".jq-featuredFlag",t).css("display","none")):i.filter(".jq-featuredRegion").length&&$("input[name='ToggleAllFeatured'][value='true']",t).prop("checked",!0)))});$body.on("click",".msgSubmit",function(n){return n.preventDefault(),MSG.submit($(this))});$body.on("click",".msgSubmitReturnBinary",function(n){return n.preventDefault(),MSG.submit($(this),undefined,undefined,!0)});$body.on("click",".jq-refreshAdminBar",function(){ADMIN.refreshAdminBar()});$.fn.shiftSelectable=function(){var n,t=this;t.on("click",function(i){if(!n){n=this;return}if(i.shiftKey){var r=t.index(this),u=t.index(n);t.slice(Math.min(r,u),Math.max(r,u)+1).attr("checked",n.checked).trigger("change")}n=this})};newsLightbox={init:function(){var n="";$(document).on("click","a.js-news",function(t){t.preventDefault();$("body").addClass("lightboxOpen");var i=$("#NewsLightbox .jq-replace");typeof n=="undefined"||n===""?n=i.html():i.html(n);$.ajax({url:$(this).attr("href"),method:"GET",success:function(n){i.html(n);$("#NewsLightbox").height($(document).height());typeof ADMIN!="undefined"&&(ADMIN.hover(i),i.find(".hoverReveal1, .admin, #regionFlags").remove())}});$(document).on("click","#NewsLightbox",function(){$(".NewsLightboxClose").trigger("click")}).on("click","#NewsLightboxInner",function(n){n.stopPropagation()});return $("#NewsLightbox").css("padding-top",$(window).scrollTop()).height($(document).height()).fadeIn("medium"),!1});$(".NewsLightboxClose").on("click",function(n){n.stopPropagation();$("#NewsLightbox").fadeOut();$("body").removeClass("lightboxOpen")})}};country={init:function(){var n=$("#countryselect"),t=n.find(".countrylist"),i=n.width();n.width(400);countrylistwidth=t.width();countrylistwidth>i?(n.width(countrylistwidth+2),t.width(countrylistwidth+2)):(n.width(i+2),t.width(i+2));n.hoverIntent(function(){var n=$("ul:first",this);n.stop(!0,!0);clearTimeout(n.data("timeoutId"));usingOldIE?n.show():n.fadeIn("fast")},function(){var n=$("ul:first",this),t=setTimeout(function(){usingOldIE?n.hide():n.fadeOut("fast")},650);n.data("timeoutId",t)})},set:function(n){$("#currentflag").removeClass().addClass("flag flag-"+n);$("#countryselect ul").fadeOut("fast")}};$("#loginButContainer .loginButton").on("click",function(){$("#loginFormContainer").fadeIn("fast")});$(document).on("click",function(n){var t=$(n.target);t.is("#PartLogin")||t.parents("#PartLogin").is("#PartLogin")||t.is("#loginFormContainer")||t.parents("#loginFormContainer").is("#loginFormContainer")||$("#loginFormContainer").fadeOut("fast")});var shutters={init:function(n){$(".shutter",n).not(".dontopen").find("header").on("click",function(n){n.preventDefault();var t=$(this).parents(".shutter");return t.hasClass("open")?shutters.close(t):(shutters.close(t.siblings()),shutters.open(t)),!1})},open:function(n){n.addClass("open").find(".content").slideDown(400,"easeOutQuad",function(){var t=n.offset().top,e=n.height(),i=t+e,r=$(window).height(),u=$("#headerContainer").height()+50,f;(t<$(window).scrollTop()||i>$(window).scrollTop()+r)&&(f=Math.min(i-r+u,t-u),$("html, body").animate({scrollTop:f},{duration:600,easing:"easeOutQuad"}))})},close:function(n){n.removeClass("open").find(".content").slideUp()}},TABBOX={bootstrapCondensing:!1,displayThumbs:function(n){var t=n.offset();t&&(MAIN.loadThumbnails(n,t.top+n.height()),MAIN.displayThumbnails(n,t.top+n.height()))},changeTab:function(n,t){var i,r,c=n.hasClass("js-Bootstrap"),e,o,u,s;c?(i=$(".nav-tabs > li.active",n),r=$(".tab-pane.active",n)):(r=$(".tabboxOuter.tabouterindex"+t,n),$(".tabMenu li",n).removeClass("selected").each(function(){var n=$(this);n.data("tabindex")===t&&(i=n.addClass("selected"))}),$(".tabboxOuter",n).hide().removeClass("active"),r.show().addClass("active"),typeof ADMIN!="undefined"&&ADMIN.balanceColumns($(".jq-dataTableGroup",r)));var l=n.find(".tabMenu li"),h=l.length,f=$(MSG.current);t+1>=h?(e=$(".msgTabNext",f),e.length>0&&(e.hide(),$(".msgSubmit",f).show())):t+1<h&&(o=$(".msgTabNext:first",f),o.length>0&&(o.show(),$(".msgSubmit",f).hide()));TABBOX.setUrlHash(i);u=i.data("url");i.data("url","");s=function(){var n,u,t;for(TABBOX.displayThumbs(r),typeof usersList!="undefined"&&ADMIN.balanceColumns($(".historylist"),!0),n=0;n<TABBOX.onchange.length;n++)u=TABBOX.onchange[n],u(r);t=i.data("onfirstclick");typeof t!="undefined"&&t.length>0&&(i.data("onfirstclick",""),executeFunctionByName(t,window,r))};typeof u!="undefined"&&u&&u.length!==0?$.ajax({type:"get",url:u,success:function(n){r.find("div").html(n);MSG.initButtons(i);$(MSG.current).height($(document).height());s()}}):s()},hideEmpty:function(n){var i,t;$(".tabMenu li",n).show();i=!1;$(".tabboxOuter",n).each(function(n){var t=$(this),r,u;t.hasClass("never-hide")||(r=t.is(":hidden"),t.show(),u=t.find("*:not(.empty-ignore,.tabboxInner,:hidden)").length===0,r&&t.hide(),u&&(t.is(":visible")&&!t.hasClass("never-hide")&&(i=!0),$(".tabMenu li:eq("+n+")").hide()))});i&&(t=-1,$(".tabMenu li").each(function(n){return $.expr[":"].visible(this)?(t=n,!1):!0}),t>-1&&TABBOX.changeTab(n,t))},bootstrapCondense:function(n){if(!TABBOX.bootstrapCondensing){TABBOX.bootstrapCondensing=!0;var u=$(".nav-tabs",n),r=0,t=$(".tab-more",u),i=$(".menu-more",u),o=0;t.show();t.prevAll().each(function(){$(this).prependTo(i)});var s=u.children(),e=u.width(),f=i.children().first();for(s.each(function(){$(this).evenIfHidden(function(n){r+=n.outerWidth()})});r<=e&&f.length>0&&o<100;)f.insertBefore(t),r+=f.outerWidth(),f=i.children().first(),o++;r>e&&(r-t.outerWidth()<=e&&i.children().length===0?t.hide():t.prev().prependTo(i));i.children().length===0&&t.hide();TABBOX.bootstrapCondensing=!1}},oninit:[],onchange:[],init:function(n){for(n.find(".tabbox:not(.ko-tabbox)").each(function(){var t=$(this),r=$(".tabMenu li",t),u=r.length,f=$(".preselect",t),o=f.length>0,i,s=t.hasClass("js-Bootstrap"),e;if(t.addClass("HereItIs"),i=o?f.parents(".tabboxOuter"):$(".tabboxOuter:first",t),$(".tabMenu",t).find("li").each(function(n){$(this).data("tabindex",n).addClass("tabindex"+n)}),$(".tabboxOuter",t).each(function(n){$(this).data("tabouterindex",n).addClass("tabouterindex"+n)}),$(".tabMenu",t).find("li").not("#filedownload").each(function(){var n=$(this).find("span");n.text(n.text().charAt(0).toUpperCase()+n.text().slice(1))}),s){$("#tab-"+i.attr("id")).tab("show");$('a[data-toggle="tab"]').on("shown.bs.tab",function(n){TABBOX.changeTab($(n.target).closest(".tabbox"),0)});TABBOX.bootstrapCondense(t);$(window).on("resize",function(){TABBOX.bootstrapCondense(t)});if(typeof fileTabs!="undefined")t.on("shown.bs.tab",function(){fileTabs.clickTab()})}else{$(".tabboxOuter",t).hide();i.show().addClass("active");e=i.index();r.removeClass("selected").eq(e).addClass("selected");$(".tabMenu li:not(.hoverReveal1)",t).on("click",function(){var i=$(this),r=i.data("tabindex");i.hasClass("selected")||i.hasClass("actionBut")||(TABBOX.changeTab(t,r),r+1===u?($(".addNew .msgTabNext",n).hide(),$(".addNew .msgSubmit",n).show()):r+1<u&&($(".addNew .msgTabNext",n).show(),$(".addNew .msgSubmit",n).hide()))});$(".tabMenu.stacked",t).each(function(){var f=$(this),u=f.find(".nav-tabs:first-child"),o=t.find(".tabboxBody"),s=t.find(".actionBut").length>0,i=f.width(),n=0,r,e;for(s&&(i=i-t.find(".actionBut").outerWidth(!0)-20),u.find("li").not(".actionBut").each(function(){n=n+$(this).outerWidth(!0)});i>0&&n>i;){for(r=f.prepend('<ul class="tabMenuRow nav-tabs clearfix"><\/ul>').find(".nav-tabs:first-child");i>0&&n>i;)e=u.find("li").not(".actionBut").filter(":last").css("border-bottom",0),r.prepend(e),n=n-e.outerWidth(!0);console.log("Add height "+r.outerHeight(!0));o.css("padding-top","+="+r.outerHeight(!0));u=r;n=0;u.find("li").not(".actionBut").each(function(){n=n+$(this).outerWidth(!0)})}if(typeof fileTabs!="undefined")t.on("click","ul.nav-tabs li",function(){fileTabs.clickTab()})});t.parents(".addNew").each(function(){var i=$(".tabMenu",this);$(".msgTabNext").on("click",function(){for(var r=i.find("li"),u=r.length,n=r.filter(".selected").data("tabindex"),f;r.filter(".tabindex"+ ++n+":visible").length===0&&n<u;);n<u&&(f=r.filter(".tabindex"+n),TABBOX.changeTab(t,n))});$(".msgTabBack").on("click",function(){for(var r=i.find("li"),f=r.length,n=r.filter(".selected").data("tabindex"),u;r.filter(".tabindex"+--n+":visible").length===0&&n>-1;);n>-1&&(u=r.filter(".tabindex"+n),TABBOX.changeTab(t,n))});$(".tabMenu li:not(.hoverReveal1)").on("click",function(){var t=i.find("li:visible"),r=t.length,u=t.index(t.filter(".selected"));u+1===r?($(".msgTabNext",n).hide(),$(".msgSubmit",n).show()):($(".msgTabNext",n).show(),$(".msgSubmit",n).hide())})})}$(function(){if(i.offset()){var n=i.offset().top+i.height();MAIN.displayThumbnails(i,n);MAIN.loadThumbnails(i,n)}});$(".tabbox.hasThumbs").find(".tabboxOuter",t).on("scroll",function(){var n=$(this),i=t.offset().top+n.height();MAIN.displayThumbnails(n,i);MAIN.loadThumbnails(n,i)})});TABBOX.oninit.length;){var t=TABBOX.oninit.splice(0,1)[0];t()}},hideContent:function(n){$(".tabboxInner",n).hide();$(".jq-filter-no-results",$(catFilter.tabsSelector)).toggle($(".jq-filter:visible:first",$(catFilter.tabsSelector)).length===0)},showContent:function(n){$(".tabboxInner",n).fadeIn("50");$(".jq-filter-no-results",$(catFilter.tabsSelector)).toggle($(".jq-filter:visible:first",$(catFilter.tabsSelector)).length===0)},setUrlHash:function(n){var t=n.data("tab"),i,r;typeof t=="undefined"&&n.hasClass("tab-more")&&(t=n.find(".active").data("tab"));typeof t!="undefined"&&(i=$.param({tab:t}),r=location.pathname+"#?"+i.toString(),history.replaceState({},"",r))},hashChange:function(n){var r=TABBOX.getTabFromHash(n)||$(".tabboxInner.preselect",n).parent()||$(".tabboxOuter:first",n),t,i;r!==null&&(t=$(".tabMenu").find($("li[data-tab='"+r.data("tab")+"']")),i=t.find("a"),i.length?i.trigger("click"):t.trigger("click"))},getTabFromHash:function(n){var t=jHash.val("tab");return typeof t!="undefined"&&t!==""?$(".tabboxOuter[data-tab="+t+"]",n):null}},toolTips={placeholderText:"",init:function(n){toolTips.placeholderText=n},toolTipOff:function(n){n.addClass("tooltipoff")},toolTip:function(n,t,i){n.addClass("tooltip-trigger");var e=10,o=250,h=500,r=null,u=!1,f=!1,s=t.hasClass("newsTranslation"),c=t.hasClass("msgTranslation"),l=t.hasClass("tip-right"),a=!t.hasClass("tip-non-hoverable");t.css("opacity",0);(s||c)&&t.prepend("<div class=newsTransHead><span>"+toolTips.placeholderText+"<\/span><\/div>");n.add(t).removeClass("tooltipoff").not(".triggered").addClass("triggered").on("mouseover",function(){var h=$(this),c,v,y,p;h.hasClass("tooltipoff")||(a&&r&&clearTimeout(r),u||f)||(typeof i!="undefined"&&i(h,t),u=!0,p=h.offset(),s?(console.log("isNewsTranslation"),c=n.position().top+e+10,console.log("tipTop = "+c),v=h.width()+12,y=h.innerWidth()):l?(console.log("isTipRight"),c=n.position().top-26,v=n.position().left+n.width()+20,y="200px"):n.height()==0?(c=p.top+h.height(),v=p.left):(c=n.position().top+h.height()+10,v=n.position().left),$(".tipContent").not(t).css("display","none"),t.css({top:c,left:v,width:y,display:"block"}),t.animate({opacity:1},o,"swing",function(){u=!1;f=!0}).animate({top:"+="+e+"px",opacity:1},o,"swing",function(){u=!1;f=!0}))}).on("mouseout",function(){$(this).hasClass("tooltipoff")||(r&&clearTimeout(r),r=setTimeout(function(){r=null;t.animate({top:"+="+e+"px",opacity:0},o,"swing",function(){t.css("display","none");f=!1})},h))})},toolTips:function(n){var t=n instanceof jQuery?n:$(n);t.each(function(){var n=$(this);n.hasClass("jq-tipTrigger")?toolTips.toolTip(n,n.siblings(".tipContent")):toolTips.toolTip($(".jq-tipTrigger",n),$(".tipContent",n))})}};jQuery.fn.contentReveal=function(n){if(typeof n!="undefined"&&n&&$(n).length>0){n.fadeOut();var t=$(this).show().css({opacity:0}).replaceAll(n);try{t.animate({opacity:1},{queue:!1,duration:300,easing:"easeInCirc"})}catch(i){return t.css({opacity:1})}return t}return $(this).hide().css({opacity:0}).slideDown(300,"easeOutCirc").animate({opacity:1},{queue:!1,duration:300,easing:"easeInCirc"})};jQuery.fn.contentHide=function(n,t){return typeof n=="undefined"&&(n=!0),$(this).animate({opacity:0},{duration:200,easing:"easeOutCirc"}).slideUp(300,"easeOutCirc",function(){n?$(this).remove():$(this).hide();typeof t=="function"&&t()})};jQuery.fn.scrollToElement=function(n){var t=$(this),i;return!t||t.length==0?t:(typeof n=="undefined"&&(n={}),typeof n.duration=="undefined"&&(n.duration=600),typeof n.delay=="undefined"&&(n.delay=0),typeof n.leeway=="undefined"&&(n.leeway=50),i=function(){$("html, body").animate({scrollTop:t.offset().top-n.leeway},{duration:n.duration,easing:"easeOutQuad"})},n.delay==0?i():setTimeout(i,n.delay),t)};jQuery.fn.loadingStart=function(){return $element.addclass("loading")};videoPlayer={downloadText:"Download",brokenThumbUrl:"",init:function(n,t,i){typeof t!="undefined"&&(videoPlayer.downloadText=t);typeof i!="undefined"&&(videoPlayer.brokenThumbUrl=i);videoPlayer.addPlayButton($("body"));$("#thumbPlayClose,#thumbPlayContainer").on("click",function(n){return n.preventDefault(),$("#thumbPlayContainer").fadeOut("fast",function(){$("#thumbPlayInner").empty()}),!1});$(window).on("resize",function(){videoPlayer.thumbPlayerResize()})},addPlayButton:function(n){if(n.closest("#msgContainer").length>0){var t=n.find("a.thumbPlay:not(.thumbProcessed)");return t.each(function(){var n=$(this),t=n.children(".imagingThumb").data("videosrc");n.addClass("thumbProcessed").attr("href",t).attr("target","_blank")}),!1}n.find("a.thumbPlay:not(.thumbProcessed)").addClass("thumbProcessed").append("<div class=thumbPlayButton><\/div>").on("click",function(n){n.preventDefault();var t=$(this).find("img").data("videosrc"),i=$("#thumbPlayTemplate").tmpl({source:t});return $("#thumbPlayInner").empty().append(i),videoPlayer.thumbPlayerResize(),$("#thumbPlayContainer").fadeIn(),$("#thumbPlayClose").trigger("focus"),!1});videoPlayer.collapseSameFiles(n)},thumbPlayerResize:function(){var n=$(window).width(),t=$(window).height(),i,r,u=t/n;u>.75?(i=n*.8,r=n*.6):(r=t*.8,i=t*1.0666666);$("#thumbPlayContainer").css({width:n,height:$(document).height()});$("#thumbPlayContainerInner").css({"margin-top":$(window).scrollTop()});$("#thumbPlayContainer iframe").css({width:i,height:r});$("#thumbPlayContainerInner").css({"padding-left":(n-i)/2,"padding-top":(t-r)/2})},collapseSameFiles:function(n){n.find(".tn.jq-allfilessame").each(function(){var t=$(this).parent(),u=t.find(".externalLink").length>0,n=u?t.find(".tn.externalLink:last"):t.find(".tn:not(.jq-allfilessame):first"),i=t.find(".tn:not(.jq-allfilessame)").not(n),r;if(i.length>0)n.addClass("collapsed");else return;r=function(t,i){var u=t.find(".imagingThumb"),e,r,f;i?u.applyTooltipToItems():u.hide();e=t.find("label").prop("title",u.prop("title")).applyTooltipToItems();t.find("input").after("<span class=thumbDescription>"+t.find(".thumbDescription").text()+"<\/span>");$(".jq-thumbdl",t).remove();r=t.find("a").addClass("jq-collapsed").prop("title",videoPlayer.downloadText);e.find(".ft").append($('<i class="fa fa-download">')).appendTo(r);i?(f=r.clone(),f.find(".imagingThumb").hide(),n.find(".thumbActions").append(t.find(".thumbOptions").append(f)),r.removeClass("jq-collapsed").find(".ft").remove(),t.find(".thumbDescription:first").remove()):n.find(".thumbActions").append(t.find(".thumbOptions").append(r))};u||r(n,!0);i.each(function(){r($(this),!1)});i.remove()})},vimeoThumbCallback:function(n,t){typeof t=="undefined"&&(t=0);var i=$(".vimeo-"+n.video_id);if(i.length>0){i.attr("src",n.thumbnail_url);return}if(t++>5){MAIN.isDebug&&alert("Could not find vimeo video src with id "+n.video_id);return}setTimeout(function(){videoPlayer.vimeoThumbCallback(n,t)},250)},vimeoThumbPlaceholder:function(n,t){var r=t.attr("class"),u=/vimeoExt-(\d*)/g.exec(r),i=$(".vimeo-"+u[1]);if(i.length>0){i.attr("src",videoPlayer.brokenThumbUrl);i.siblings(".thumbPlayButton").remove();return}}}