Шаблон «XenForo Grey»

Шаблон «XenForo Grey» 1.0.0

Нет прав для скачивания

Exile

Администратор
#1
Пользователь Exile разместил новый ресурс:


Please Login or Register to view hidden text.

- Шаблон, являющийся аналогом стандартного шаблона XenFero.

Описание: шаблон, являющийся аналогом стандартного шаблона XenFero.

Please Login or Register to view hidden text.

 

Exile

Администратор
#2
Шаблон требует адаптации, судя по структуре файлов - однозначный факт. Под программу адаптации модификаций тоже попадет, но после модификаций соответственно. Поэтому если есть те, у кого есть адаптированные версии - приглашаем поделиться.
 

Lynx

Пользователь
#3
Почти закончил адаптацию, но возникла проблема с файлом xenforo.js
page_header.tpl:
PHP:
<script type="text/javascript" src="{SITE_URL}styles/js/xenforo.js?v={$bb_cfg['js_ver']}"></script>
Когда этот код не закомментирован, на странице профиля пользователя не работают js-скрипты (встроенный функционал запретов), а без него не работают настройки отображения тем в списке форумов.
 

Nightmare

Разработчик
#4
Почти закончил адаптацию, но возникла проблема с файлом xenforo.js
page_header.tpl:
PHP:
<script type="text/javascript" src="{SITE_URL}styles/js/xenforo.js?v={$bb_cfg['js_ver']}"></script>
Когда этот код не закомментирован, на странице профиля пользователя не работают js-скрипты (встроенный функционал запретов), а без него не работают настройки отображения тем в списке форумов.
Что говорит консоль в браузере? На лицо конфликт, либо ошибка где-то в скрипте
 

titann

Пользователь
#6
Удалил этот код и все, файл профиля взял с дефолтового шаблона.
 
Последнее редактирование:

Lynx

Пользователь
#7
Что говорит консоль в браузере? На лицо конфликт, либо ошибка где-то в скрипте
Event: %s AutoValidationDataReceived xenforo.js:309
Event: %s AutoValidationComplete xenforo.js:312
XenForo.activate(%o) [object Object] xenforo.js:200
XenForo.activate(%o) [object HTMLDocument] xenforo.js:191
"XenForo.init() 12ms. jQuery 1.8.1/1.2.6-dev" xenforo.js:188
Метод getPreventDefault() является устаревшим. Для его замены используйте метод defaultPrevented. jquery.pack.js:2
элемент не найден count:1
XenForo.activate(%o) [object HTMLDocument] xenforo.js:191
TypeError: c(...).attr(...) is undefined xenforo.js:206
Метод getPreventDefault() является устаревшим. Для его замены используйте метод defaultPrevented. jquery.pack.js:2
элемент не найден count:1


может выше jquery.pack.js ставишь?
Нет. Вставляю после:
<script type="text/javascript" src="{SITE_URL}styles/js/jquery.pack.js?v={$bb_cfg['js_ver']}"></script>
<script type="text/javascript" src="{SITE_URL}styles/js/main.js?v={$bb_cfg['js_ver']}"></script>
<script type="text/javascript" src="{SITE_URL}styles/js/xenforo.js?v={$bb_cfg['js_ver']}"></script>
<script type="text/javascript" src="{SITE_URL}styles/js/discussion_list.js?v={$bb_cfg['js_ver']}"></script>


Удалил этот код и все, файл профиля взял с дефолтового шаблона.
Файл профиля ни при чём. Не работает файл xenforo.js
 
Последнее редактирование:

Lynx

Пользователь
#8
Заменил этот файл одноимённым из оригинального движка Xenforo 1.4.5. - без толку.
При замене на xenforo.js из /upload/js/xenforo/ - не работают запреты в профиле.
При замене на xenforo.js из /upload/js/xenforo/full/ - запреты работают, но не работают настройки отображения тем в списке форумов.
 

titann

Пользователь
#9
Попробуй замени все в файле на это:
Код:
/*
jQuery Tools dev - The missing UI library for the Web

dateinput/dateinput.js
overlay/overlay.js
overlay/overlay.apple.js
rangeinput/rangeinput.js
scrollable/scrollable.js
scrollable/scrollable.autoscroll.js
scrollable/scrollable.navigator.js
tabs/tabs.js
toolbox/toolbox.expose.js
toolbox/toolbox.history.js
toolbox/toolbox.mousewheel.js
tooltip/tooltip.js
tooltip/tooltip.slide.js

NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.

http://flowplayer.org/tools/

jquery.event.wheel.js - rev 1
Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
Liscensed under the MIT License (MIT-LICENSE.txt)
http://www.opensource.org/licenses/mit-license.php
Created: 2008-07-01 | Updated: 2008-07-14

-----

*/
(function(a,q){function m(a,b){a=""+a;for(b=b||2;a.length<b;)a="0"+a;return a}function f(a,b,c){var d=a.getDate(),h=a.getDay(),e=a.getMonth(),a=a.getFullYear(),g={d:d,dd:m(d),ddd:i[c].shortDays[h],dddd:i[c].days[h],m:e+1,mm:m(e+1),mmm:i[c].shortMonths[e],mmmm:i[c].months[e],yy:String(a).slice(2),yyyy:a},b=b.replace(l,function(a){return a in g?g[a]:a.slice(1,a.length-1)});return p.html(b).html()}function d(a){return parseInt(a,10)}function c(a,b){return a.getFullYear()===b.getFullYear()&&a.getMonth()==
b.getMonth()&&a.getDate()==b.getDate()}function b(a){if(a!==q){if(a.constructor==Date)return a;if(typeof a=="string"){var b=a.split("-");if(b.length==3)return new Date(d(b[0]),d(b[1])-1,d(b[2]));if(!/^-?\d+$/.test(a))return;a=d(a)}b=new Date;b.setDate(b.getDate()+a);return b}}function e(e,g){function p(b,c,d){x=b;A=b.getFullYear();I=b.getMonth();H=b.getDate();d=d||a.Event("api");d.type="beforeChange";J.trigger(d,[b]);if(!d.isDefaultPrevented())e.val(f(b,c.format,c.lang)),d.type="change",J.trigger(d),
e.data("date",b),j.hide(d)}function r(b){b.type="onShow";J.trigger(b);a(document).bind("keydown.d",function(b){if(b.ctrlKey)return true;var c=b.keyCode;if(c==8)return e.val(""),j.hide(b);if(c==27||c==9)return j.hide(b);if(a(k).index(c)>=0){if(!B)return j.show(b),b.preventDefault();var d=a("#"+n.weeks+" a"),g=a("."+n.focus),h=d.index(g);g.removeClass(n.focus);if(c==74||c==40)h+=7;else if(c==75||c==38)h-=7;else if(c==76||c==39)h+=1;else if(c==72||c==37)h-=1;h>41?(j.addMonth(),g=a("#"+n.weeks+" a:eq("+
(h-42)+")")):h<0?(j.addMonth(-1),g=a("#"+n.weeks+" a:eq("+(h+42)+")")):g=d.eq(h);g.addClass(n.focus);return b.preventDefault()}if(c==34)return j.addMonth();if(c==33)return j.addMonth(-1);if(c==36)return j.today();c==13&&(a(b.target).is("select")||a("."+n.focus).click());return a([16,17,18,9]).index(c)>=0});a(document).bind("click.d",function(b){var c=b.target;!a(c).parents("#"+n.root).length&&c!=e[0]&&(!K||c!=K[0])&&j.hide(b)})}var j=this,t=new Date,o=t.getFullYear(),n=g.css,m=i[g.lang],l=a("#"+n.root),
C=l.find("#"+n.title),K,z,D,A,I,H,x=e.attr("data-value")||g.value||e.val(),v=e.attr("min")||g.min,y=e.attr("max")||g.max,B,M;v===0&&(v="0");x=b(x)||t;v=b(v||new Date(o+g.yearRange[0],1,1));y=b(y||new Date(o+g.yearRange[1]+1,1,-1));if(!m)throw"Dateinput: invalid language: "+g.lang;e.attr("type")=="date"&&(M=e.clone(),o=M.wrap("<div/>").parent().html(),o=a(o.replace(/type/i,"type=text data-orig-type")),g.value&&o.val(g.value),e.replaceWith(o),e=o);e.addClass(n.input);var J=e.add(j);if(!l.length){l=
a("<div><div><a/><div/><a/></div><div><div/><div/></div></div>").hide().css({position:"absolute"}).attr("id",n.root);l.children().eq(0).attr("id",n.head).end().eq(1).attr("id",n.body).children().eq(0).attr("id",n.days).end().eq(1).attr("id",n.weeks).end().end().end().find("a").eq(0).attr("id",n.prev).end().eq(1).attr("id",n.next);C=l.find("#"+n.head).find("div").attr("id",n.title);if(g.selectors){var F=a("<select/>").attr("id",n.month),G=a("<select/>").attr("id",n.year);C.html(F.add(G))}for(var o=
l.find("#"+n.days),P=0;P<7;P++)o.append(a("<span/>").text(m.shortDays[(P+g.firstDay)%7]));a("body").append(l)}g.trigger&&(K=a("<a/>").attr("href","#").addClass(n.trigger).click(function(a){g.toggle?j.toggle():j.show();return a.preventDefault()}).insertAfter(e));var N=l.find("#"+n.weeks),G=l.find("#"+n.year),F=l.find("#"+n.month);a.extend(j,{show:function(b){if(!e.attr("readonly")&&!e.attr("disabled")&&!B&&(b=b||a.Event(),b.type="onBeforeShow",J.trigger(b),!b.isDefaultPrevented())){a.each(h,function(){this.hide()});
B=true;F.unbind("change").change(function(){j.setValue(G.val(),a(this).val())});G.unbind("change").change(function(){j.setValue(a(this).val(),F.val())});z=l.find("#"+n.prev).unbind("click").click(function(){z.hasClass(n.disabled)||j.addMonth(-1);return false});D=l.find("#"+n.next).unbind("click").click(function(){D.hasClass(n.disabled)||j.addMonth();return false});j.setValue(x);var c=e.offset();/iPad/i.test(navigator.userAgent)&&(c.top-=a(window).scrollTop());l.css({top:c.top+e.outerHeight({margins:true})+
g.offset[0],left:c.left+g.offset[1]});g.speed?l.show(g.speed,function(){r(b)}):(l.show(),r(b));return j}},setValue:function(e,h,r){var f=d(h)>=-1?new Date(d(e),d(h),d(r==q||isNaN(r)?1:r)):e||x;f<v?f=v:f>y&&(f=y);typeof e=="string"&&(f=b(e));e=f.getFullYear();h=f.getMonth();r=f.getDate();h==-1?(h=11,e--):h==12&&(h=0,e++);if(!B)return p(f,g),j;I=h;A=e;H=r;var r=(new Date(e,h,1-g.firstDay)).getDay(),k=(new Date(e,h+1,0)).getDate(),s=(new Date(e,h-1+1,0)).getDate(),l;if(g.selectors){F.empty();a.each(m.months,
function(b,c){v<new Date(e,b+1,1)&&y>new Date(e,b,0)&&F.append(a("<option/>").html(c).attr("value",b))});G.empty();for(var f=t.getFullYear(),i=f+g.yearRange[0];i<f+g.yearRange[1];i++)v<new Date(i+1,0,1)&&y>new Date(i,0,0)&&G.append(a("<option/>").text(i));F.val(h);G.val(e)}else C.html(m.months[h]+" "+e);N.empty();z.add(D).removeClass(n.disabled);for(var i=!r?-7:0,o,E;i<(!r?35:42);i++)o=a("<a/>"),i%7===0&&(l=a("<div/>").addClass(n.week),N.append(l)),i<r?(o.addClass(n.off),E=s-r+i+1,f=new Date(e,h-
1,E)):i>=r+k?(o.addClass(n.off),E=i-k-r+1,f=new Date(e,h+1,E)):(E=i-r+1,f=new Date(e,h,E),c(x,f)?o.attr("id",n.current).addClass(n.focus):c(t,f)&&o.attr("id",n.today)),v&&f<v&&o.add(z).addClass(n.disabled),y&&f>y&&o.add(D).addClass(n.disabled),o.attr("href","#"+E).text(E).data("date",f),l.append(o);N.find("a").click(function(b){var c=a(this);c.hasClass(n.disabled)||(a("#"+n.current).removeAttr("id"),c.attr("id",n.current),p(c.data("date"),g,b));return false});n.sunday&&N.find(n.week).each(function(){var b=
g.firstDay?7-g.firstDay:0;a(this).children().slice(b,b+1).addClass(n.sunday)});return j},setMin:function(a,c){v=b(a);c&&x<v&&j.setValue(v);return j},setMax:function(a,c){y=b(a);c&&x>y&&j.setValue(y);return j},today:function(){return j.setValue(t)},addDay:function(a){return this.setValue(A,I,H+(a||1))},addMonth:function(a){var a=I+(a||1),b=(new Date(A,a+1,0)).getDate();return this.setValue(A,a,H<=b?H:b)},addYear:function(a){return this.setValue(A+(a||1),I,H)},destroy:function(){e.add(document).unbind("click.d").unbind("keydown.d");
l.add(K).remove();e.removeData("dateinput").removeClass(n.input);M&&e.replaceWith(M)},hide:function(b){if(B){b=a.Event();b.type="onHide";J.trigger(b);a(document).unbind("click.d").unbind("keydown.d");if(b.isDefaultPrevented())return;l.hide();B=false}return j},toggle:function(){return j.isOpen()?j.hide():j.show()},getConf:function(){return g},getInput:function(){return e},getCalendar:function(){return l},getValue:function(a){return a?f(x,a,g.lang):x},isOpen:function(){return B}});a.each(["onBeforeShow",
"onShow","change","onHide"],function(b,c){a.isFunction(g[c])&&a(j).bind(c,g[c]);j[c]=function(b){b&&a(j).bind(c,b);return j}});g.editable||e.bind("focus.d click.d",j.show).keydown(function(b){var c=b.keyCode;return!B&&a(k).index(c)>=0?(j.show(b),b.preventDefault()):b.shiftKey||b.ctrlKey||b.altKey||c==9?true:b.preventDefault()});b(e.val())&&p(x,g)}a.tools=a.tools||{version:"1.2.6-dev"};var h=[],g,k=[75,76,38,39,74,72,40,37],i={};g=a.tools.dateinput={conf:{format:"mm/dd/yy",selectors:false,yearRange:[-5,
5],lang:"en",offset:[0,0],speed:0,firstDay:0,min:q,max:q,trigger:0,toggle:0,editable:0,css:{prefix:"cal",input:"date",root:0,head:0,title:0,prev:0,next:0,month:0,year:0,days:0,body:0,weeks:0,today:0,current:0,week:0,off:0,sunday:0,focus:0,disabled:0,trigger:0}},localize:function(b,c){a.each(c,function(a,b){c[a]=b.split(",")});i[b]=c}};g.localize("en",{months:"January,February,March,April,May,June,July,August,September,October,November,December",shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
days:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",shortDays:"Sun,Mon,Tue,Wed,Thu,Fri,Sat"});var l=/d{1,4}|m{1,4}|yy(?:yy)?|"[^"]*"|'[^']*'/g,p=a("<a/>");a.expr[":"].date=function(b){var c=b.getAttribute("type");return c&&c=="date"||!!a(b).data("dateinput")};a.fn.dateinput=function(b){if(this.data("dateinput"))return this;b=a.extend(true,{},g.conf,b);a.each(b.css,function(a,c){!c&&a!="prefix"&&(b.css[a]=(b.css.prefix||"")+(c||a))});var c;this.each(function(){var d=new e(a(this),b);h.push(d);
d=d.getInput().data("dateinput",d);c=c?c.add(d):d});return c?c:this}})(jQuery);
(function(a){function q(d,c){var b=this,e=d.add(b),h=a(window),g,k,i,l=a.tools.expose&&(c.mask||c.expose),p=Math.random().toString().slice(10);if(l)typeof l=="string"&&(l={color:l}),l.closeOnClick=l.closeOnEsc=false;var s=c.target||d.attr("rel");k=s?a(s):d;if(!k.length)throw"Could not find Overlay: "+s;d&&d.index(k)==-1&&d.click(function(a){b.load(a);return a.preventDefault()});a.extend(b,{load:function(d){if(b.isOpened())return b;var g=f[c.effect];if(!g)throw'Overlay: cannot find effect : "'+c.effect+
'"';c.oneInstance&&a.each(m,function(){this.close(d)});d=d||a.Event();d.type="onBeforeLoad";e.trigger(d);if(d.isDefaultPrevented())return b;i=true;l&&a(k).expose(l);var r=c.top,j=c.left,s=k.outerWidth({margin:true}),o=k.outerHeight({margin:true});typeof r=="string"&&(r=r=="center"?Math.max((h.height()-o)/2,0):parseInt(r,10)/100*h.height());j=="center"&&(j=Math.max((h.width()-s)/2,0));g[0].call(b,{top:r,left:j},function(){if(i)d.type="onLoad",e.trigger(d)});if(l&&c.closeOnClick)a.mask.getMask().one("click",
b.close);c.closeOnClick&&a(document).bind("click."+p,function(c){a(c.target).parents(k).length||b.close(c)});c.closeOnEsc&&a(document).bind("keydown."+p,function(a){a.keyCode==27&&b.close(a)});return b},close:function(d){if(!b.isOpened())return b;d=d||a.Event();d.type="onBeforeClose";e.trigger(d);if(!d.isDefaultPrevented())return i=false,f[c.effect][1].call(b,function(){d.type="onClose";e.trigger(d)}),a(document).unbind("click."+p).unbind("keydown."+p),l&&a.mask.close(),b},getOverlay:function(){return k},
getTrigger:function(){return d},getClosers:function(){return g},isOpened:function(){return i},getConf:function(){return c}});a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(d,e){a.isFunction(c[e])&&a(b).bind(e,c[e]);b[e]=function(c){c&&a(b).bind(e,c);return b}});g=k.find(c.close||".close");!g.length&&!c.close&&(g=a('<a class="close"></a>'),k.prepend(g));g.click(function(a){b.close(a)});c.load&&b.load()}a.tools=a.tools||{version:"1.2.6-dev"};a.tools.overlay={addEffect:function(a,
c,b){f[a]=[c,b]},conf:{close:null,closeOnClick:true,closeOnEsc:true,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:false,mask:null,oneInstance:true,speed:"normal",target:null,top:"10%"}};var m=[],f={};a.tools.overlay.addEffect("default",function(d,c){var b=this.getConf(),e=a(window);b.fixed||(d.top+=e.scrollTop(),d.left+=e.scrollLeft());d.position=b.fixed?"fixed":"absolute";this.getOverlay().css(d).fadeIn(b.speed,c)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,
a)});a.fn.overlay=function(d){var c=this.data("overlay");if(c)return c;a.isFunction(d)&&(d={onBeforeLoad:d});d=a.extend(true,{},a.tools.overlay.conf,d);this.each(function(){c=new q(a(this),d);m.push(c);a(this).data("overlay",c)});return d.api?c:this}})(jQuery);
(function(a){function q(a){var c=a.offset();return{top:c.top+a.height()/2,left:c.left+a.width()/2}}var m=a.tools.overlay,f=a(window);a.extend(m.conf,{start:{top:null,left:null},fadeInSpeed:"fast",zIndex:9999});m.addEffect("apple",function(d,c){var b=this.getOverlay(),e=this.getConf(),h=this.getTrigger(),g=this,k=b.outerWidth({margin:true}),i=b.data("img"),l=e.fixed?"fixed":"absolute";if(!i){i=b.css("backgroundImage");if(!i)throw"background-image CSS property not set for overlay";i=i.slice(i.indexOf("(")+
1,i.indexOf(")")).replace(/\"/g,"");b.css("backgroundImage","none");i=a('<img src="'+i+'"/>');i.css({border:0,display:"none"}).width(k);a("body").append(i);b.data("img",i)}var p=e.start.top||Math.round(f.height()/2),s=e.start.left||Math.round(f.width()/2);if(h)h=q(h),p=h.top,s=h.left;e.fixed?(p-=f.scrollTop(),s-=f.scrollLeft()):(d.top+=f.scrollTop(),d.left+=f.scrollLeft());i.css({position:"absolute",top:p,left:s,width:0,zIndex:e.zIndex}).show();d.position=l;b.css(d);i.animate({top:d.top,left:d.left,
width:k},e.speed,function(){b.css("zIndex",e.zIndex+1).fadeIn(e.fadeInSpeed,function(){g.isOpened()&&!a(this).index(b)?c.call():b.hide()})}).css("position",l)},function(d){var c=this.getOverlay().hide(),b=this.getConf(),e=this.getTrigger(),c=c.data("img"),h={top:b.start.top,left:b.start.left,width:0};e&&a.extend(h,q(e));b.fixed&&c.css({position:"absolute"}).animate({top:"+="+f.scrollTop(),left:"+="+f.scrollLeft()},0);c.animate(h,b.closeSpeed,d)})})(jQuery);
(function(a){function q(a,b){var c=Math.pow(10,b);return Math.round(a*c)/c}function m(a,b){var c=parseInt(a.css(b),10);return c?c:(c=a[0].currentStyle)&&c.width&&parseInt(c.width,10)}function f(a){return(a=a.data("events"))&&a.onSlide}function d(b,c){function d(a,e,f,j){f===void 0?f=e/t*O:j&&(f-=c.min);L&&(f=Math.round(f/L)*L);if(e===void 0||L)e=f*t/O;if(isNaN(f))return p;e=Math.max(0,Math.min(e,t));f=e/t*O;if(j||!w)f+=c.min;w&&(j?e=t-e:f=c.max-f);var f=q(f,C),k=a.type=="click";if(A&&r!==void 0&&
!k&&(a.type="onSlide",D.trigger(a,[f,e]),a.isDefaultPrevented()))return p;j=k?c.speed:0;k=k?function(){a.type="change";D.trigger(a,[f])}:null;w?(o.animate({top:e},j,k),c.progress&&n.animate({height:t-e+o.height()/2},j)):(o.animate({left:e},j,k),c.progress&&n.animate({width:e+o.width()/2},j));r=f;b.val(f);return p}function e(){(w=c.vertical||m(u,"height")>m(u,"width"))?(t=m(u,"height")-m(o,"height"),j=u.offset().top+t):(t=m(u,"width")-m(o,"width"),j=u.offset().left)}function l(){e();p.setValue(c.value!==
void 0?c.value:c.min)}var p=this,s=c.css,u=a("<div><div/><a href='#'/></div>").data("rangeinput",p),w,r,j,t;b.before(u);var o=u.addClass(s.slider).find("a").addClass(s.handle),n=u.find("div").addClass(s.progress);a.each("min,max,step,value".split(","),function(a,e){var d=b.attr(e);parseFloat(d)&&(c[e]=parseFloat(d,10))});var O=c.max-c.min,L=c.step=="any"?0:c.step,C=c.precision;if(C===void 0)try{C=L.toString().split(".")[1].length}catch(K){C=0}if(b.attr("type")=="range"){var z=b.clone().wrap("<div/>").parent().html(),
z=a(z.replace(/type/i,"type=text data-orig-type"));z.val(c.value);b.replaceWith(z);b=z}b.addClass(s.input);var D=a(p).add(b),A=true;a.extend(p,{getValue:function(){return r},setValue:function(b,c){e();return d(c||a.Event("api"),void 0,b,true)},getConf:function(){return c},getProgress:function(){return n},getHandle:function(){return o},getInput:function(){return b},step:function(b,e){e=e||a.Event();p.setValue(r+(c.step=="any"?1:c.step)*(b||1),e)},stepUp:function(a){return p.step(a||1)},stepDown:function(a){return p.step(-a||
-1)}});a.each("onSlide,change".split(","),function(b,e){a.isFunction(c[e])&&a(p).bind(e,c[e]);p[e]=function(b){b&&a(p).bind(e,b);return p}});o.drag({drag:false}).bind("dragStart",function(){e();A=f(a(p))||f(b)}).bind("drag",function(a,c,e){if(b.is(":disabled"))return false;d(a,w?c:e)}).bind("dragEnd",function(a){if(!a.isDefaultPrevented())a.type="change",D.trigger(a,[r])}).click(function(a){return a.preventDefault()});u.click(function(a){if(b.is(":disabled")||a.target==o[0])return a.preventDefault();
e();var c=w?o.height()/2:o.width()/2;d(a,w?t-j-c+a.pageY:a.pageX-j-c)});c.keyboard&&b.keydown(function(c){if(!b.attr("readonly")){var e=c.keyCode,d=a([75,76,38,33,39]).index(e)!=-1,g=a([74,72,40,34,37]).index(e)!=-1;if((d||g)&&!c.shiftKey&&!c.altKey&&!c.ctrlKey)return d?p.step(e==33?10:1,c):g&&p.step(e==34?-10:-1,c),c.preventDefault()}});b.blur(function(b){var c=a(this).val();c!==r&&p.setValue(c,b)});a.extend(b[0],{stepUp:p.stepUp,stepDown:p.stepDown});l();t||a(window).load(l)}a.tools=a.tools||{version:"1.2.6-dev"};
var c;c=a.tools.rangeinput={conf:{min:0,max:100,step:"any",steps:0,value:0,precision:void 0,vertical:0,keyboard:true,progress:false,speed:100,css:{input:"range",slider:"slider",progress:"progress",handle:"handle"}}};var b,e;a.fn.drag=function(c){document.ondragstart=function(){return false};c=a.extend({x:true,y:true,drag:true},c);b=b||a(document).bind("mousedown mouseup",function(d){var f=a(d.target);if(d.type=="mousedown"&&f.data("drag")){var i=f.position(),l=d.pageX-i.left,p=d.pageY-i.top,s=true;
b.bind("mousemove.drag",function(a){var b=a.pageX-l,a=a.pageY-p,d={};if(c.x)d.left=b;if(c.y)d.top=a;s&&(f.trigger("dragStart"),s=false);c.drag&&f.css(d);f.trigger("drag",[a,b]);e=f});d.preventDefault()}else try{e&&e.trigger("dragEnd")}finally{b.unbind("mousemove.drag"),e=null}});return this.data("drag",true)};a.expr[":"].range=function(b){var c=b.getAttribute("type");return c&&c=="range"||!!a(b).filter("input").data("rangeinput")};a.fn.rangeinput=function(b){if(this.data("rangeinput"))return this;
var b=a.extend(true,{},c.conf,b),e;this.each(function(){var c=new d(a(this),a.extend(true,{},b)),c=c.getInput().data("rangeinput",c);e=e?e.add(c):c});return e?e:this}})(jQuery);
(function(a){function q(d,c){var b=a(c);return b.length<2?b:d.parent().find(c)}function m(d,c){var b=this,e=d.add(b),h=d.children(),g=0,k=c.vertical;f||(f=b);h.length>1&&(h=a(c.items,d));if(c.size>1)c.circular=false;a.extend(b,{getConf:function(){return c},getIndex:function(){return g},getSize:function(){return b.getItems().size()},getNaviButtons:function(){return p.add(s)},getRoot:function(){return d},getItemWrap:function(){return h},getItems:function(){return h.find(c.item).not("."+c.clonedClass)},
getCircularClones:function(){return h.find(c.item).filter("."+c.clonedClass)},move:function(a,c){return b.seekTo(g+a,c)},next:function(a){return b.move(c.size,a)},prev:function(a){return b.move(-c.size,a)},begin:function(a){return b.seekTo(0,a)},end:function(a){return b.seekTo(b.getSize()-1,a)},focus:function(){return f=b},addItem:function(d){d=a(d);c.circular?(h.children().last().before(d),b.getCircularClones().first().replaceWith(d.clone().addClass(c.clonedClass))):(h.append(d),s.removeClass("disabled"));
e.trigger("onAddItem",[d]);return b},removeItem:function(a){e.trigger("onRemoveItem",[a]);var d=b.getItems(),f;a.jquery?b.getItems().index(f):a=b.getItems().eq(1*a);c.circular?(a.remove(),d=b.getItems(),a=b.getCircularClones(),a.first().replaceWith(d.last().clone().addClass("cloned")),a.last().replaceWith(d.first().clone().addClass("cloned"))):(a.remove(),b.getItems());g>=b.getSize()&&(g-=1,b.move(1));return b},seekTo:function(d,j,p){d.jquery||(d*=1);if(c.circular&&d===0&&g==-1&&j!==0)return b;if(!c.circular&&
d<0||d>b.getSize()||d<-1)return b;var i=d;d.jquery?d=b.getItems().index(d):i=b.getItems().eq(d);var l=a.Event("onBeforeSeek");if(!p&&(e.trigger(l,[d,j]),l.isDefaultPrevented()||!i.length))return b;i=k?{top:-i.position().top}:{left:-i.position().left};g=d;f=b;if(j===void 0)j=c.speed;h.animate(i,j,c.easing,p||function(){e.trigger("onSeek",[d])});return b}});a.each(["onBeforeSeek","onSeek","onAddItem","onRemoveItem"],function(d,e){a.isFunction(c[e])&&a(b).bind(e,c[e]);b[e]=function(c){c&&a(b).bind(e,
c);return b}});if(c.circular){var i=b.getItems().slice(-1).clone().prependTo(h),l=b.getItems().eq(1).clone().appendTo(h);i.add(l).addClass(c.clonedClass);b.onBeforeSeek(function(a,c,d){if(!a.isDefaultPrevented()){var e=b.getCircularClones();if(c<0)return b.seekTo(e.first(),d,function(){b.end(0)}),a.preventDefault();else if(c>=b.getSize())return b.seekTo(e.last(),d,function(){b.begin(0)}),a.preventDefault()}});i=d.parents().add(d).filter(function(){if(a(this).css("display")==="none")return true});
i.length?(i.show(),b.seekTo(0,0,function(){}),i.hide()):b.seekTo(0,0,function(){})}var p=q(d,c.prev).click(function(a){a.stopPropagation();b.prev()}),s=q(d,c.next).click(function(a){a.stopPropagation();b.next()});c.circular||(b.onBeforeSeek(function(a,d){setTimeout(function(){a.isDefaultPrevented()||(p.toggleClass(c.disabledClass,d<=0),s.toggleClass(c.disabledClass,d>=b.getSize()-1))},1)}),c.initialIndex||p.addClass(c.disabledClass));b.getSize()<2&&p.add(s).addClass(c.disabledClass);c.mousewheel&&
a.fn.mousewheel&&d.mousewheel(function(a,d){if(c.mousewheel)return b.move(d<0?1:-1,c.wheelSpeed||50),false});if(c.touch){var m,w;h[0].ontouchstart=function(a){a=a.touches[0];m=a.clientX;w=a.clientY};h[0].ontouchmove=function(a){if(a.touches.length==1&&!h.is(":animated")){var c=a.touches[0],d=m-c.clientX,c=w-c.clientY;b[k&&c>0||!k&&d>0?"next":"prev"]();a.preventDefault()}}}c.keyboard&&a(document).bind("keydown.scrollable",function(d){if(c.keyboard&&!d.altKey&&!d.ctrlKey&&!d.metaKey&&!a(d.target).is(":input")&&
!(c.keyboard!="static"&&f!=b)){var e=d.keyCode;if(k&&(e==38||e==40))return b.move(e==38?-1:1),d.preventDefault();if(!k&&(e==37||e==39))return b.move(e==37?-1:1),d.preventDefault()}});c.initialIndex&&b.seekTo(c.initialIndex,0,function(){})}a.tools=a.tools||{version:"1.2.6-dev"};a.tools.scrollable={conf:{activeClass:"active",circular:false,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:"> *",items:".items",keyboard:true,mousewheel:false,next:".next",prev:".prev",size:1,
speed:400,vertical:false,touch:true,wheelSpeed:0}};var f;a.fn.scrollable=function(d){var c=this.data("scrollable");if(c)return c;d=a.extend({},a.tools.scrollable.conf,d);this.each(function(){c=new m(a(this),d);a(this).data("scrollable",c)});return d.api?c:this}})(jQuery);
(function(a){var q=a.tools.scrollable;q.autoscroll={conf:{autoplay:true,interval:3E3,autopause:true}};a.fn.autoscroll=function(m){typeof m=="number"&&(m={interval:m});var f=a.extend({},q.autoscroll.conf,m),d;this.each(function(){function c(){clearTimeout(h);h=setTimeout(function(){b.next()},f.interval)}var b=a(this).data("scrollable"),e=b.getRoot(),h,g=false;b&&(d=b);b.play=function(){h||(g=false,e.bind("onSeek",c),c())};b.hoverPlay=function(){g||b.play()};b.pause=function(){h=clearTimeout(h);e.unbind("onSeek",
c)};b.resume=function(){g||b.play()};b.stop=function(){g=true;b.pause()};f.autopause&&e.add(b.getNaviButtons()).hover(b.pause,b.resume);f.autoplay&&b.play();b.onRemoveItem(function(){b.getSize()<=2&&b.stop()})});return f.api?d:this}})(jQuery);
(function(a){function q(f,d){var c=a(d);return c.length<2?c:f.parent().find(d)}var m=a.tools.scrollable;m.navigator={conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:false,idPrefix:null,history:false}};a.fn.navigator=function(f){typeof f=="string"&&(f={navi:f});var f=a.extend({},m.navigator.conf,f),d;this.each(function(){function c(){return h.find(f.naviItem||"> *")}function b(b){var c=a("<"+(f.naviItem||"a")+"/>").click(function(c){a(this);e.seekTo(b);c.preventDefault();i&&history.pushState({i:b})});
b===0&&c.addClass(k);f.indexed&&c.text(b+1);f.idPrefix&&c.attr("id",f.idPrefix+b);return c.appendTo(h)}var e=a(this).data("scrollable"),h=f.navi.jquery?f.navi:q(e.getRoot(),f.navi),g=e.getNaviButtons(),k=f.activeClass,i=f.history&&!!history.pushState,l=e.getConf().size;e&&(d=e);e.getNaviButtons=function(){return g.add(h)};i&&(history.pushState({i:0}),a(window).bind("popstate",function(a){(a=a.originalEvent.state)&&e.seekTo(a.i)}));c().length?c().click(function(b){a(this);var d=c().index(this);e.seekTo(d);
b.preventDefault();i&&history.pushState({i:d})}):a.each(e.getItems(),function(a){a%l==0&&b(a)});e.onBeforeSeek(function(a,b){setTimeout(function(){if(!a.isDefaultPrevented()){var d=b/l;c().eq(d).length&&c().removeClass(k).eq(d).addClass(k)}},1)});e.onAddItem(function(a,c){var d=e.getItems().index(c);d%l==0&&b(d)});e.onRemoveItem(function(a,b){var d=e.getItems().index(b);c().eq(d).remove();c().removeClass(k).eq(d<e.getSize()-1?d:0).addClass(k)})});return f.api?d:this}})(jQuery);
(function(a){function q(c,b,d){var f=this,g=c.add(this),k=c.find(d.tabs),i=b.jquery?b:c.children(b),l;k.length||(k=c.children());i.length||(i=c.parent().find(b));i.length||(i=a(b));a.extend(this,{click:function(b,c){var i=k.eq(b);typeof b=="string"&&b.replace("#","")&&(i=k.filter("[href*="+b.replace("#","")+"]"),b=Math.max(k.index(i),0));if(d.rotate){var q=k.length-1;if(b<0)return f.click(q,c);if(b>q)return f.click(0,c)}if(!i.length){if(l>=0)return f;b=d.initialIndex;i=k.eq(b)}if(b===l)return f;c=
c||a.Event();c.type="onBeforeClick";g.trigger(c,[b]);if(!c.isDefaultPrevented())return m[d.effect].call(f,b,function(){l=b;c.type="onClick";g.trigger(c,[b])}),k.removeClass(d.current),i.addClass(d.current),f},getConf:function(){return d},getTabs:function(){return k},getPanes:function(){return i},getCurrentPane:function(){return i.eq(l)},getCurrentTab:function(){return k.eq(l)},getIndex:function(){return l},next:function(){return f.click(l+1)},prev:function(){return f.click(l-1)},destroy:function(){k.unbind(d.event).removeClass(d.current);
i.find("a[href^=#]").unbind("click.T");return f}});a.each("onBeforeClick,onClick".split(","),function(b,c){a.isFunction(d[c])&&a(f).bind(c,d[c]);f[c]=function(b){b&&a(f).bind(c,b);return f}});if(d.history&&a.fn.history)a.tools.history.init(k),d.event="history";k.each(function(b){a(this).bind(d.event,function(a){f.click(b,a);return a.preventDefault()})});i.find("a[href^=#]").bind("click.T",function(b){f.click(a(this).attr("href"),b)});location.hash&&d.tabs=="a"&&c.find("[href="+location.hash+"]").length?
f.click(location.hash):(d.initialIndex===0||d.initialIndex>0)&&f.click(d.initialIndex)}a.tools=a.tools||{version:"1.2.6-dev"};a.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",rotate:false,slideUpSpeed:400,slideDownSpeed:400,history:false},addEffect:function(a,b){m[a]=b}};var m={"default":function(a,b){this.getPanes().hide().eq(a).show();b.call()},fade:function(a,b){var d=this.getConf(),f=d.fadeOutSpeed,g=this.getPanes();f?
g.fadeOut(f):g.hide();g.eq(a).fadeIn(d.fadeInSpeed,b)},slide:function(a,b){var d=this.getConf();this.getPanes().slideUp(d.slideUpSpeed);this.getPanes().eq(a).slideDown(d.slideDownSpeed,b)},ajax:function(a,b){this.getPanes().eq(0).load(this.getTabs().eq(a).attr("href"),b)}},f,d;a.tools.tabs.addEffect("horizontal",function(c,b){if(!f){var e=this.getPanes().eq(c),h=this.getCurrentPane();d||(d=this.getPanes().eq(0).width());f=true;e.show();h.animate({width:0},{step:function(a){e.css("width",d-a)},complete:function(){a(this).hide();
b.call();f=false}});h.length||(b.call(),f=false)}});a.fn.tabs=function(c,b){var d=this.data("tabs");d&&(d.destroy(),this.removeData("tabs"));a.isFunction(b)&&(b={onBeforeClick:b});b=a.extend({},a.tools.tabs.conf,b);this.each(function(){d=new q(a(this),c,b);a(this).data("tabs",d)});return b.api?d:this}})(jQuery);
(function(a){function q(){if(a.browser.msie){var b=a(document).height(),c=a(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,b-c<20?c:b]}return[a(document).width(),a(document).height()]}function m(b){if(b)return b.call(a.mask)}a.tools=a.tools||{version:"1.2.6-dev"};var f;f=a.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,startOpacity:0,color:"#fff",onLoad:null,
onClose:null}};var d,c,b,e,h;a.mask={load:function(g,k){if(b)return this;typeof g=="string"&&(g={color:g});g=g||e;e=g=a.extend(a.extend({},f.conf),g);d=a("#"+g.maskId);d.length||(d=a("<div/>").attr("id",g.maskId),a("body").append(d));var i=q();d.css({position:"absolute",top:0,left:0,width:i[0],height:i[1],display:"none",opacity:g.startOpacity,zIndex:g.zIndex});g.color&&d.css("backgroundColor",g.color);if(m(g.onBeforeLoad)===false)return this;g.closeOnEsc&&a(document).bind("keydown.mask",function(b){b.keyCode==
27&&a.mask.close(b)});g.closeOnClick&&d.bind("click.mask",function(b){a.mask.close(b)});a(window).bind("resize.mask",function(){a.mask.fit()});k&&k.length&&(h=k.eq(0).css("zIndex"),a.each(k,function(){var b=a(this);/relative|absolute|fixed/i.test(b.css("position"))||b.css("position","relative")}),c=k.css({zIndex:Math.max(g.zIndex+1,h=="auto"?0:h)}));d.css({display:"block"}).fadeTo(g.loadSpeed,g.opacity,function(){a.mask.fit();m(g.onLoad);b="full"});b=true;return this},close:function(){if(b){if(m(e.onBeforeClose)===
false)return this;d.fadeOut(e.closeSpeed,function(){m(e.onClose);c&&c.css({zIndex:h});b=false});a(document).unbind("keydown.mask");d.unbind("click.mask");a(window).unbind("resize.mask")}return this},fit:function(){if(b){var a=q();d.css({width:a[0],height:a[1]})}},getMask:function(){return d},isLoaded:function(a){return a?b=="full":b},getConf:function(){return e},getExposed:function(){return c}};a.fn.mask=function(b){a.mask.load(b);return this};a.fn.expose=function(b){a.mask.load(b,this);return this}})(jQuery);
(function(a){function q(a){if(a){var c=f.contentWindow.document;c.open().close();c.location.hash=a}}var m,f,d,c;a.tools=a.tools||{version:"1.2.6-dev"};a.tools.history={init:function(b){c||(a.browser.msie&&a.browser.version<"8"?f||(f=a("<iframe/>").attr("src","javascript:false;").hide().get(0),a("body").prepend(f),setInterval(function(){var b=f.contentWindow.document.location.hash;m!==b&&a(window).trigger("hash",b)},100),q(location.hash||"#")):setInterval(function(){var b=location.hash;b!==m&&a(window).trigger("hash",
b)},100),d=!d?b:d.add(b),b.click(function(b){var c=a(this).attr("href");f&&q(c);if(c.slice(0,1)!="#")return location.href="#"+c,b.preventDefault()}),c=true)}};a(window).bind("hash",function(b,c){c?d.filter(function(){var b=a(this).attr("href");return b==c||b==c.replace("#","")}).trigger("history",[c]):d.eq(0).trigger("history",[c]);m=c});a.fn.history=function(b){a.tools.history.init(this);return this.bind("history",b)}})(jQuery);
(function(a){function q(f){switch(f.type){case "mousemove":return a.extend(f.data,{clientX:f.clientX,clientY:f.clientY,pageX:f.pageX,pageY:f.pageY});case "DOMMouseScroll":a.extend(f,f.data);f.delta=-f.detail/3;break;case "mousewheel":f.delta=f.wheelDelta/120}f.type="wheel";return a.event.handle.call(this,f,f.delta)}a.fn.mousewheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};a.event.special.wheel={setup:function(){a.event.add(this,m,q,{})},teardown:function(){a.event.remove(this,m,q)}};
var m=!a.browser.mozilla?"mousewheel":"DOMMouseScroll"+(a.browser.version<"1.9"?" mousemove":"")})(jQuery);
(function(a){function q(d,c,b){var e=b.relative?d.position().top:d.offset().top,f=b.relative?d.position().left:d.offset().left,g=b.position[0];e-=c.outerHeight()-b.offset[0];f+=d.outerWidth()+b.offset[1];/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());var k=c.outerHeight()+d.outerHeight();g=="center"&&(e+=k/2);g=="bottom"&&(e+=k);g=b.position[1];d=c.outerWidth()+d.outerWidth();g=="center"&&(f-=d/2);g=="left"&&(f-=d);return{top:e,left:f}}function m(d,c){var b=this,e=d.add(b),h,g=0,k=
0,i=d.attr("title"),l=d.attr("data-tooltip"),m=f[c.effect],s,u=d.is(":input"),w=u&&d.is(":checkbox, :radio, select, :button, :submit"),r=d.attr("type"),j=c.events[r]||c.events[u?w?"widget":"input":"def"];if(!m)throw'Nonexistent effect "'+c.effect+'"';j=j.split(/,\s*/);if(j.length!=2)throw"Tooltip: bad events configuration for "+r;d.bind(j[0],function(a){clearTimeout(g);c.predelay?k=setTimeout(function(){b.show(a)},c.predelay):b.show(a)}).bind(j[1],function(a){clearTimeout(k);c.delay?g=setTimeout(function(){b.hide(a)},
c.delay):b.hide(a)});i&&c.cancelDefault&&(d.removeAttr("title"),d.data("title",i));a.extend(b,{show:function(f){if(!h&&(l?h=a(l):c.tip?h=a(c.tip).eq(0):i?h=a(c.layout).addClass(c.tipClass).appendTo(document.body).hide().append(i):(h=d.next(),h.length||(h=d.parent().next())),!h.length))throw"Cannot find tooltip for "+d;if(b.isShown())return b;h.stop(true,true);var o=q(d,h,c);c.tip&&h.html(d.data("title"));f=a.Event();f.type="onBeforeShow";e.trigger(f,[o]);if(f.isDefaultPrevented())return b;o=q(d,h,
c);h.css({position:"absolute",top:o.top,left:o.left});s=true;m[0].call(b,function(){f.type="onShow";s="full";e.trigger(f)});o=c.events.tooltip.split(/,\s*/);h.data("__set")||(h.unbind(o[0]).bind(o[0],function(){clearTimeout(g);clearTimeout(k)}),o[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.unbind(o[1]).bind(o[1],function(a){a.relatedTarget!=d[0]&&d.trigger(j[1].split(" ")[0])}),c.tip||h.data("__set",true));return b},hide:function(d){if(!h||!b.isShown())return b;d=a.Event();d.type="onBeforeHide";
e.trigger(d);if(!d.isDefaultPrevented())return s=false,f[c.effect][1].call(b,function(){d.type="onHide";e.trigger(d)}),b},isShown:function(a){return a?s=="full":s},getConf:function(){return c},getTip:function(){return h},getTrigger:function(){return d}});a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(d,e){a.isFunction(c[e])&&a(b).bind(e,c[e]);b[e]=function(c){c&&a(b).bind(e,c);return b}})}a.tools=a.tools||{version:"1.2.6-dev"};a.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",
predelay:0,delay:30,opacity:1,tip:0,fadeIE:false,position:["top","center"],offset:[0,0],relative:false,cancelDefault:true,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"<div/>",tipClass:"tooltip"},addEffect:function(a,c,b){f[a]=[c,b]}};var f={toggle:[function(a){var c=this.getConf(),b=this.getTip(),c=c.opacity;c<1&&b.css({opacity:c});b.show();a.call()},function(a){this.getTip().hide();a.call()}],fade:[function(d){var c=
this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeTo(c.fadeInSpeed,c.opacity,d):(this.getTip().show(),d())},function(d){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeOut(c.fadeOutSpeed,d):(this.getTip().hide(),d())}]};a.fn.tooltip=function(d){var c=this.data("tooltip");if(c)return c;d=a.extend(true,{},a.tools.tooltip.conf,d);if(typeof d.position=="string")d.position=d.position.split(/,?\s/);this.each(function(){c=new m(a(this),d);a(this).data("tooltip",c)});return d.api?
c:this}})(jQuery);
(function(a){var q=a.tools.tooltip;a.extend(q.conf,{direction:"up",bounce:false,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!a.browser.msie});var m={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};q.addEffect("slide",function(a){var d=this.getConf(),c=this.getTip(),b=d.slideFade?{opacity:d.opacity}:{},e=m[d.direction]||m.up;b[e[1]]=e[0]+"="+d.slideOffset;d.slideFade&&c.css({opacity:0});c.show().animate(b,d.slideInSpeed,a)},function(f){var d=this.getConf(),c=d.slideOffset,
b=d.slideFade?{opacity:0}:{},e=m[d.direction]||m.up,h=""+e[0];d.bounce&&(h=h=="+"?"-":"+");b[e[1]]=h+"="+c;this.getTip().animate(b,d.slideOutSpeed,function(){a(this).hide();f.call()})})})(jQuery);


/**
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
* TERMS OF USE - EASING EQUATIONS
*
* Open source under the BSD License.
*
* Copyright © 2001 Robert Penner
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
*  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
*  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
*  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
*  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});

/**
* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
*
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @author    Brian Cherne <brian@cherne.net>
*/
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);

/*
* jQuery Color Animations
* Copyright 2007 John Resig
* Released under the MIT and GPL licenses.
*/
(function(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){d.fx.step[e]=function(g){if(g.state==0){g.start=c(g.elem,e);g.end=b(g.end)}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}return a[d.trim(f).toLowerCase()]}function c(g,e){var f;do{f=d.curCSS(g,e);if(f!=""&&f!="transparent"||d.nodeName(g,"body")){break}e="backgroundColor"}while(g=g.parentNode);return b(f)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);

/*
* XenForo xenforo.min.js
* Copyright 2010-2011 XenForo Ltd.
* Released under the XenForo License Agreement: http://xenforo.com/license-agreement
*/
var XenForo={};jQuery===void 0&&(jQuery=$={});$.tools===void 0&&console.error("jQuery Tools is not loaded.");(!window.console||!console.firebug)&&function(c){var g,h=0;if(!c.console)c.console={};if(c.console.log&&!c.console.debug)c.console.debug=c.console.log;g="assert,clear,count,debug,dir,dirxml,error,getFirebugElement,group,groupCollapsed,groupEnd,info,log,notifyFirebug,profile,profileEnd,time,timeEnd,trace,warn".split(",");for(h=0;h<g.length;++h)c.console[g[h]]||(c.console[g[h]]=function(){})}(window);
$("html").addClass("hasJs");
(function(c,g,h){h.createElement("abbr");if(/webkit.*mobile/i.test(navigator.userAgent)&&(XenForo._isWebkitMobile=!0,"getBoundingClientRect"in h.documentElement&&/; CPU.*OS (?:3_2|4_0)/i.test(navigator.userAgent)))c.fn.__offset=c.fn.offset,c.fn.offset=function(){var a=this.__offset();a.top-=g.scrollY;a.left-=g.scrollX;return a};jQuery.fn._jQueryToolsOverlay=jQuery.fn.overlay;jQuery.extend(!0,{context:function(a,b){if(typeof b=="string")var c=a,a=a[b],b=c;return function(){return a.apply(b,arguments)}},
setCookie:function(a,b,c){console.log("Set cookie %s=%s",a,b);h.cookie=XenForo._cookieConfig.prefix+a+"="+encodeURIComponent(b)+(c===void 0?"":";expires="+c.toGMTString())+(XenForo._cookieConfig.path?";path="+XenForo._cookieConfig.path:"")+(XenForo._cookieConfig.domain?";domain="+XenForo._cookieConfig.domain:"");return b},getCookie:function(a){return(a=RegExp("(^| )"+XenForo._cookieConfig.prefix+a+"=([^;]+)(;|$)").exec(h.cookie))?decodeURIComponent(a[2]):null},deleteCookie:function(a){console.info("Delete cookie %s",
a);h.cookie=XenForo._cookieConfig.prefix+a+"="+(XenForo._cookieConfig.path?"; path="+XenForo._cookieConfig.path:"")+(XenForo._cookieConfig.domain?"; domain="+XenForo._cookieConfig.domain:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";return null}});jQuery.fn.extend({xfActivate:function(){return XenForo.activate(this)},dataOrDefault:function(a,b){var c=this.data(a);return c===void 0?b:c},strval:function(){return String(this.val()).replace(/\s+$/g,"")},fieldName:function(){return this.data("fieldName")||
this.attr("name")},fieldValue:function(){switch(this.attr("type")){case "checkbox":return c('input:checkbox[name="'+this.fieldName()+'"]:checked',this.context.form).val();case "radio":return c('input:radio[name="'+this.fieldName()+'"]:checked',this.context.form).val();default:return this.val()}},_jqSerialize:c.fn.serialize,serialize:function(){if(g.tinyMCE)try{g.tinyMCE.triggerSave()}catch(a){}return this._jqSerialize()},_jqSerializeArray:c.fn.serializeArray,serializeArray:function(){if(g.tinyMCE)try{g.tinyMCE.triggerSave()}catch(a){}return this._jqSerializeArray()},
coords:function(a,b){var c,d,f,i,g,h=this.is(":hidden");h&&(d=this.css("visibility"),f=this.css("display"),this.css({visibility:"hidden",display:"block"}));switch(a){case "inner":i="innerWidth";g="innerHeight";break;case "outer":i="outerWidth";g="outerHeight";break;default:i="width",g="height"}switch(b){case "position":b="position";break;default:b="offset"}c=this[b]();c.width=this[i]();c.height=this[g]();h&&this.css({display:f,visibility:d});return c},uniqueId:function(){this.attr("id")===""&&this.attr("id",
"XenForoUniq"+XenForo._uniqueIdCounter++);return this},xfFadeIn:function(a,b){return this.fadeIn(a,function(){c(this).ieOpacityFix(b)})},xfFadeOut:function(a,b){return this.fadeOut(a,b)},xfShow:function(a,b){return this.show(a,function(){c(this).ieOpacityFix(b)})},xfHide:function(a,b){return this.hide(a,b)},xfSlideDown:function(a,b){return this.slideDown(a,function(){c(this).ieOpacityFix(b)})},xfSlideUp:function(a,b){return this.slideUp(a,b)},xfFadeDown:function(a,b){this.filter(":hidden").xfHide().css("opacity",
0);a=a||XenForo.speed.normal;return this.xfSlideDown(XenForo.speed.fast).animate({opacity:1},a,function(){c(this).ieOpacityFix(b)})},xfFadeUp:function(a,b,c,d){return this.animate({opacity:0},a).slideUp({duration:a?c||XenForo.speed.slow:0,easing:d||"easeOutBounce",complete:b})},xfInsert:function(a,b,e,d,f){a=="replaceAll"&&c(b).xfFadeUp(d);this.addClass("__XenForoActivator").hide()[a||"appendTo"](b).xfActivate()[e||"xfFadeDown"](d,f);return this},xfRemove:function(a,b,e,d){return this[a||"xfFadeUp"](XenForo.speed.normal,
function(){c(this).empty().remove();c.isFunction(b)&&b()},e,d)},_xfSlideWrapper:function(a){this.data("slideWrapper")||this.data("slideWrapper",this.wrap('<div class="_swOuter"><div class="_swInner" /></div>').closest("div._swOuter").css("overflow","hidden"));return a?this.data("slideWrapper").height():this.data("slideWrapper")},xfSlideIn:function(a,b,c){var d=this._xfSlideWrapper().css("height","auto"),f=0;d.find("div._swInner").css("margin","auto");f=this.show(0).outerHeight();d.css("height",0).animate({height:f},
a,b).find("div._swInner").css("marginTop",f*-1).animate({marginTop:0},a,b,c);return this},xfSlideOut:function(a,b,c){var d=this.outerHeight();this._xfSlideWrapper().animate({height:0},a,b).find("div._swInner").animate({marginTop:d*-1},a,b,c);return this},ieOpacityFix:function(a){c.support.opacity||(this.css("filter",""),this.attr("style",this.attr("style").replace(/filter:\s*;/i,"")));c.isFunction(a)&&a.apply(this);return this},overlay:function(a){return XenForo.isTouchBrowser()?this._jQueryToolsOverlay(c.extend(!0,
a,{speed:0,loadSpeed:0})):this._jQueryToolsOverlay(a)}});c.tools.overlay.addEffect("slideDownContentFade",function(a,b){var e=this.getOverlay(),d=this.getConf();e.find(".content").css("opacity",0);this.getConf().fixed?a.position="fixed":(a.position="absolute",a.top+=c(g).scrollTop(),a.left+=c(g).scrollLeft());e.css(a).xfSlideDown(XenForo.speed.fast,function(){e.find(".content").animate({opacity:1},d.speed,function(){c(this).ieOpacityFix(b)})})},function(a){var b=this.getOverlay();b.find(".content").animate({opacity:0},
this.getConf().speed,function(){b.xfSlideUp(XenForo.speed.fast,a)})});c.tools.overlay.addEffect("slideDown",function(a,b){this.getConf().fixed?a.position="fixed":(a.position="absolute",a.top+=c(g).scrollTop(),a.left+=c(g).scrollLeft());this.getOverlay().css(a).xfSlideDown(this.getConf().speed,b)},function(a){this.getOverlay().hide(0,a)});c.extend(XenForo,{_OverlayCache:{},_AjaxProgress:!1,_uniqueIdCounter:0,_overlayConfig:{},_loadedScripts:{},_cookieConfig:{path:"/",domain:"",prefix:"xf_"},_hasFocus:!0,
serverTimeInfo:{},visitor:{},_pageLoadTime:(new Date).getTime()/1E3,_jsVersion:"",_csrfToken:"",_csrfRefreshUrl:"",speed:{xxfast:50,xfast:100,fast:200,normal:400,slow:600},_animationSpeedMultiplier:1,_enableOverlays:!0,_enableAjaxSubmit:!0,_lightBoxUniversal:!1,phrases:{},init:function(){var a=new Date,b=function(){XenForo._hasFocus=!0;c(h).triggerHandler("XenForoWindowFocus")},e=function(){XenForo._hasFocus=!1;c(h).triggerHandler("XenForoWindowBlur")};c.browser.msie?c(h).bind({focusin:b,focusout:e}):
c(g).bind({focus:b,blur:e,load:XenForo.chromeAutoFillFix});XenForo.isTouchBrowser()&&c("html").addClass("Touch");XenForo.setAnimationSpeed(XenForo._animationSpeedMultiplier);XenForo._TimestampRefresh=new XenForo.TimestampRefresh;XenForo.prepareIgnoredContent();XenForo.activate(h);XenForo._CsrfRefresh=new XenForo.CsrfRefresh;"autofocus"in h.createElement("input")||c("input[autofocus], textarea[autofocus], select[autofocus]").first().focus();XenForo.AjaxProgress();XenForo.tweetButtonInit();XenForo.plusoneButtonInit();
console.info("XenForo.init() %dms. jQuery %s/%s",new Date-a,c().jquery,c.tools.version)},prepareIgnoredContent:function(){var a=c("a.DisplayIgnoredContent"),b={},e=[];a.length&&(c(".ignored").each(function(){var a=c(this).data("author");a&&(b[a]=!0)}),c.each(b,function(a){e.push(a)}),e.length&&(a.attr("title",XenForo.phrases.show_hidden_content_by_x.replace(/\{names\}/,e.join(", "))),a.parent().show()))},loadJs:function(a,b,e){try{var d=h.createElement("script");d.async=!0;if(e)try{d.innerHTML=e}catch(f){}c(d).load(b);
d.src=a;h.getElementsByTagName("head")[0].appendChild(d)}catch(i){}},tweetButtonInit:function(){c("a.twitter-share-button").length&&XenForo.loadJs("http://platform.twitter.com/widgets.js")},plusoneButtonInit:function(){if(c(h).find("div.g-plusone").length){var a=c("html").attr("lang");XenForo.loadJs("https://apis.google.com/js/plusone.js",null,a?"{lang: '"+a+"'}":null)}},chromeAutoFillFix:function(){if(c.browser.webkit&&navigator.userAgent.toLowerCase().indexOf("chrome")>=0){var a=c("input:-webkit-autofill");
a.length&&(console.group("Chrome AutoFill Fix"),a.each(function(a){console.debug("%d\t%o",a+1,this);var a=c(this).val(),e=c(this).attr("name");c(this).after(this.outerHTML).remove();c("input[name="+e+"]").val(a)}),console.groupEnd())}},register:function(a,b,e){if(typeof b=="string")var d=b,b=function(){XenForo.create(d,this)};c(h).bind(e||"XenForoActivateHtml",function(e){c(e.element).find(a).each(b)})},create:function(a,b){var e=c(b),d=g,f=a.split("."),i;for(i=0;i<f.length;i++)d=d[f[i]];if(typeof d!=
"function")return console.error("%s is not a function.",a);e.data(a)||e.data(a,new d(e));return e.data(a)},activate:function(a){console.group("XenForo.activate(%o)",a);c(a).trigger("XenForoActivate").removeClass("__XenForoActivator");c(a).find("noscript").empty().remove();XenForo._TimestampRefresh.refresh(a,!0);c(h).trigger({element:a,type:"XenForoActivateHtml"}).trigger({element:a,type:"XenForoActivatePopups"}).trigger({element:a,type:"XenForoActivationComplete"});console.groupEnd();return a},ajaxDataPush:function(a,
b,c){!a||typeof a=="string"?(a=String(a),a+="&"+b+"="+c):a[0]!==void 0?a.push({name:b,value:c}):a[b]=c;return a},ajax:function(a,b,e,d){if(!a)return console.error("No URL specified for XenForo.ajax()");b=XenForo.ajaxDataPush(b,"_xfRequestUri",g.location.pathname+g.location.search);b=XenForo.ajaxDataPush(b,"_xfNoRedirect",1);XenForo._csrfToken&&(b=XenForo.ajaxDataPush(b,"_xfToken",XenForo._csrfToken));var f=function(a,b){typeof a=="object"&&(XenForo.balloonCounterUpdate(c("#ConversationsMenu_Counter"),
a._visitor_conversationsUnread),XenForo.balloonCounterUpdate(c("#AlertsMenu_Counter"),a._visitor_alertsUnread));c(h).trigger({type:"XFAjaxSuccess",ajaxData:a,textStatus:b});e.call(null,a,b)},d=c.extend(!0,{data:b,url:a,success:f,type:"POST",dataType:"json",error:function(a,b,e){try{f.call(null,c.parseJSON(a.responseText),b)}catch(d){XenForo.handleServerError(a,b,e)}},headers:{"X-Ajax-Referer":h.URL},timeout:3E4},d);if(!d.data._xfResponseType)switch(d.dataType){case "html":case "json":case "xml":d.data=
XenForo.ajaxDataPush(d.data,"_xfResponseType",d.dataType)}return c.ajax(d)},balloonCounterUpdate:function(a,b){if(a.length){var e=a.find("span.Total"),d=e.text();e.text(b);!b||b=="0"?a.fadeOut("fast"):a.fadeIn("fast",function(){var e=parseInt(d.replace(/[^\d]/,""),10),e=parseInt(b.replace(/[^\d]/,""),10)-e;if(e>0){var i=a.closest(".Popup").data("XenForo.PopupMenu"),e=c("<a />").css("cursor","pointer").html(a.data("text").replace(/%d/,e)).click(function(){i.$clicker.trigger("click");return!1});i.menuVisible||
i.resetLoader();XenForo.stackAlert(e,1E4,a)}})}},handleServerError:function(a,b){switch(b){case "abort":return!1;case "timeout":return XenForo.alert(XenForo.phrases.server_did_not_respond_in_time_try_again,XenForo.phrases.following_error_occurred+":");case "parsererror":return console.error("PHP "+a.responseText),XenForo.alert("The server responded with an error. The error message is in the JavaScript console."),!1;case "notmodified":case "error":if(!a||!a.responseText)return!1}var e=a.getResponseHeader("Content-Type"),
d=!1,f;if(e)switch(e.split(";")[0]){case "application/json":d="json";break;case "text/html":d="html";break;default:a.responseText.substr(0,1)=="{"?d="json":a.responseText.substr(0,9)=="<!DOCTYPE"&&(d="html")}if(d=="json"&&a.responseText.substr(0,1)=="{"){try{f=c.parseJSON(a.responseText)}catch(i){}f?XenForo.hasResponseError(f,a.status):XenForo.alert(a.responseText,XenForo.phrases.following_error_occurred+":")}else XenForo.alert(a.responseText,XenForo.phrases.following_error_occurred+":");return!1},
hasResponseError:function(a){if(typeof a!="object")return XenForo.alert("Response not JSON!"),!0;if(a.error!==void 0){if(typeof a.error==="object"){for(var b in a.error)break;a.error=a.error[b]}XenForo.alert(a.error+"\n"+(a.traceHtml!==void 0?'<ol class="traceHtml">\n'+a.traceHtml+"</ol>":""),XenForo.phrases.following_error_occurred+":");return a.error}else return a.status=="ok"&&a.message?(XenForo.alert(a.message),!0):!1},hasTemplateHtml:function(a,b){b=b||"templateHtml";return!a[b]?!1:typeof a[b].search==
"function"?a[b].search(/\S+/)!==-1:!0},createOverlay:function(a,b,e){var d=null,f=null,i=null,f=/<script[^>]*>([\s\S]*?)<\/script>/ig,m,i=[];if(b instanceof jQuery&&b.is(".xenOverlay"))d=b.appendTo("body");else{if(typeof b=="string"){for(;m=f.exec(b);)i.push(m[1]);b=b.replace(f,"")}f=c(b);f.is(".NoAutoHeader")||e&&e.title&&c('<h2 class="heading h1" />').html(e.title).prependTo(f);f.is(".formOverlay")&&f.find(".submitUnit").length&&(f.find(".submitUnit :reset").length||f.find(".submitUnit .button:last").after(c('<input type="reset" class="button OverlayCloser" />').val(XenForo.phrases.cancel)).after(" "));
d=c('<div class="xenOverlay __XenForoActivator" />').appendTo("body").addClass(c(b).data("overlayClass")).append(f).xfActivate();if(i.length)for(b=0;b<i.length;b++)c.globalEval(i[b])}if(e&&(e.effect&&d.addClass(e.effect+"Effect"),e.className&&(d.addClass(e.className),delete e.className),e.noCache))e.onClose=function(){this.getOverlay().empty().remove()};d.find(".OverlayCloser").length==0&&d.prepend('<a class="close OverlayCloser"></a>');d.find(".OverlayCloser").click(function(a){a.stopPropagation()});
a=a||d;a.overlay(c.extend(!0,{target:d,oneInstance:!0,close:".OverlayCloser",speed:XenForo.speed.normal,closeSpeed:XenForo.speed.fast,mask:{color:"white",opacity:0.6,loadSpeed:XenForo.speed.normal,closeSpeed:XenForo.speed.fast},fixed:!(c.browser.msie&&c.browser.version<=6||XenForo._isWebkitMobile)},XenForo._overlayConfig,e));a.bind({onBeforeLoad:function(){c(h).triggerHandler("OverlayOpening")},onLoad:function(){var b=c(this).data("overlay"),e=b.getOverlay(),d=e.find(".OverlayScroller").get(0),f=
null;d&&setTimeout(function(){d.scrollIntoView(!0)},0);e.find("form").find("input:not([type=hidden]), textarea, select, button, .submitUnit a.button").first().focus();b.getConf().closeOnResize&&(f=function(){console.info("Window resize, close overlay!");b.close()},c(g).one("resize",f),a.one("onClose",function(){c(g).unbind("resize",f)}));c(h).triggerHandler("OverlayOpened")},onBeforeClose:function(a){d.find(".Popup").each(function(){var b=c(this).data("XenForo.PopupMenu");b.hideMenu&&b.hideMenu(a,
!0)})}});i=a.data("overlay");d.data("overlay",i);return i},alert:function(a,b,e,d){var a=String(a||"Unspecified error"),f=a.replace(/[^a-z0-9_]/gi,"_")+parseInt(e);XenForo._OverlayCache[f]===void 0&&(e?XenForo._OverlayCache[f]=c('<div class="xenOverlay timedMessage"><div class="content baseHtml">'+a+'<span class="close"></span></div></div>').appendTo("body").overlay({top:0,effect:"slideDownContentFade",speed:XenForo.speed.normal,oneInstance:!1,onBeforeClose:d?d:null}).data("overlay"):(b=c('<div class="errorOverlay"><a class="close OverlayCloser"></a><h2 class="heading">'+
(b||XenForo.phrases.following_error_occurred)+'</h2><div class="baseHtml"></div></div>'),b.find("div.baseHtml").html(a),XenForo._OverlayCache[f]=XenForo.createOverlay(null,b,{onLoad:function(){var a=c("input:button.close, button.close",h.getElementById(f)).get(0);a&&a.focus()},onClose:d?d:null})));XenForo._OverlayCache[f].load();e&&setTimeout('XenForo._OverlayCache["'+f+'"].close()',e);return!1},stackAlert:function(a,b,e){function d(){i.xfFadeUp(XenForo.speed.slow,function(){c(this).empty().remove();
g.children().length||g.hide()})}function f(){e&&e.length&&e.get(0).scrollIntoView(!0);d()}var i=c('<li class="stackAlert DismissParent"><div class="stackAlertContent"><span class="helper"></span><a class="DismissCtrl"></a></div></li>'),g=c("#StackAlerts");g.length||(g=c('<ul id="StackAlerts"></ul>').appendTo("body"));a instanceof jQuery==!1&&(a=c("<span>"+a+"</span>"));a.appendTo(i.find("div.stackAlertContent"));i.hide().prependTo(g.show()).fadeIn(XenForo.speed.normal,function(){b>0&&setTimeout(d,
b);i.find("a").click(f)})},setAnimationSpeed:function(a){var b,e,d;for(d in XenForo.speed)e=XenForo.speed[d],c.browser.msie?(b=e<=100?2:e>800?1:1+100/e,XenForo.speed[d]=e*a*b):XenForo.speed[d]=e*a},uniqueId:function(a){return a?c(a).uniqueId().attr("id"):"XenForoUniq"+XenForo._uniqueIdCounter++},canonicalizeUrl:function(a){return a.indexOf("/")==0?a:a.match(/^https?:/i)?a:c("base").attr("href")+a},trailingSlash:function(a){a.substr(-1)!="/"&&(a+="/");return a},regexQuote:function(a){return(a+"").replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!<>\|\:])/g,
"\\$1")},htmlspecialchars:function(a){return a.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},isRTL:function(){if(XenForo.RTL===void 0)XenForo.RTL=c("html").attr("dir").toUpperCase()=="RTL"?!0:!1;return XenForo.RTL},switchStringRTL:function(a){XenForo.isRTL()&&(a=a.replace(/left/i,"l_e_f_t"),a=a.replace(/right/i,"left"),a=a.replace("l_e_f_t","right"));return a},switchOffsetRTL:function(a){XenForo.isRTL()&&!isNaN(a[1])&&(a[1]*=-1);return a},isListTag:function(a){return a.tagName==
"ul"||a.tagName=="ol"},isNumeric:function(a){return!isNaN(a)&&a-0==a&&a.length>0},isPositive:function(a){switch(String(a).toLowerCase()){case "on":case "yes":case "true":case "1":return!0;default:return!1}},ucfirst:function(a){return a.charAt(0).toUpperCase()+a.substr(1)},updateUserAvatars:function(a,b,e){console.log("Replacing visitor avatars on page: %o",b);c.each(b,function(b,f){var i=".Av"+a+b+(e?"":":not(.AvatarCropControl)");c(i).find("img").attr("src",f);c(i).find("span.img").css("background-image",
"url("+f+")")})},getEditorInForm:function(a){var a=c(a),b=a.find("textarea.MessageEditor");return b.length?b.attr("disabled")?a.find(".bbCodeEditorContainer textarea"):g.tinyMCE&&b.attr("id")&&tinyMCE.editors[b.attr("id")]?tinyMCE.editors[b.attr("id")]:b:!1},getPageScrollTagName:function(){return c.browser.webkit?"body":"html"},isTouchBrowser:function(){if(XenForo._isTouchBrowser===void 0)try{XenForo._isTouchBrowser=!!("ontouchstart"in g)}catch(a){XenForo._isTouchBrowser=navigator.userAgent.indexOf("webOS")!=
-1?!0:!1}return XenForo._isTouchBrowser},scriptLoader:{loadScript:function(a,b,e){if(XenForo._loadedScripts[a]===void 0){if(/tiny_mce[a-zA-Z0-9_-]*\.js/.test(a)){var d={suffix:"",base:"",query:""},f=c("base").attr("href");if(/_(src|dev)\.js/g.test(a))d.suffix="_src";if((p=a.indexOf("?"))!=-1)d.query=a.substring(p+1);d.base=a.substring(0,a.lastIndexOf("/"));if(f&&d.base.indexOf("://")==-1&&d.base.indexOf("/")!==0)d.base=f+d.base;g.tinyMCEPreInit=d}c.ajax({type:"GET",url:a,cache:!0,dataType:"script",
error:e,success:function(){XenForo._loadedScripts[a]=!0;b.call()}})}else b.call()},loadCss:function(a,b,e,d){var f=[];c.each(a,function(a,b){XenForo._loadedScripts[b]||f.push(b)});f.length?(a=b.replace("__sentinel__",f.join(",")),c.ajax({type:"GET",url:a,cache:!0,dataType:"text",error:d,success:function(a){c.each(f,function(a,b){console.log("Loaded css %d, %s",a,b);XenForo._loadedScripts[b]=!0});var b=c("base").first().attr("href");b&&(a=a.replace(/(url\(("|')?)([^"')]+)(("|')?\))/gi,function(a,c,
e,d,f){d.match(/^(https?:|\/)/i)||(d=b+d);return c+d+f}));c("<style>"+a+"</style>").appendTo("head");e.call()}})):e.call()}}});XenForo.ExtLoader=function(a,b,c){this.__construct(a,b,c)};XenForo.ExtLoader.prototype={__construct:function(a,b,e){this.success=b;this.failure=e;this.totalFetched=0;this.data=a;var d=e=b=0;if(a.css&&!c.isEmptyObject(a.css.stylesheets)){if(!a.css.urlTemplate)return console.warn("Unable to load CSS without a urlTemplate being provided.");e=1}if(a.js)b=a.js.length;this.totalExt=
e+b;if(!this.totalExt)return this.callSuccess();if(b)for(d=0;d<b;d++)XenForo.scriptLoader.loadScript(a.js[d],c.context(this,"successCount"),c.context(this,"callFailure"));e&&XenForo.scriptLoader.loadCss(a.css.stylesheets,a.css.urlTemplate,c.context(this,"successCount"),c.context(this,"callFailure"))},callSuccess:function(){typeof this.success=="function"&&this.success(this.data)},callFailure:function(a,b){if(!this.failed)typeof this.failure=="function"?this.failure(this.data):console.warn("ExtLoader Failure %s %s",
b,a.status),this.failed=!0},successCount:function(){this.totalFetched++;this.totalFetched>=this.totalExt&&this.callSuccess()}};XenForo._TimestampRefresh=null;XenForo.TimestampRefresh=function(){this.__construct()};XenForo.TimestampRefresh.prototype={__construct:function(){this.active=this.activate();c(h).bind("XenForoWindowFocus",c.context(this,"focus"))},focus:function(){this.active||this.activate(!0)},activate:function(a){a&&this.refresh();return this.active=g.setInterval(c.context(this,"refresh"),
6E4)},deactivate:function(){g.clearInterval(this.active);return this.active=!1},refresh:function(a,b){if(!XenForo._hasFocus&&!b)return this.deactivate();if(!(c.browser.msie&&c.browser.version<=6)){var e=c("abbr.DateTime[data-time]",a),d=(new Date).getTime()/1E3-XenForo._pageLoadTime,f=XenForo.serverTimeInfo.now,i=XenForo.serverTimeInfo.today,g=XenForo.serverTimeInfo.todayDow,h,n,o,j,k,l,q;f+d>i+86400&&(h=Math.floor((f+d-i)/86400),i+=h*86400,g=(g+h)%7);h=i-86400;n=i-518400;for(o=0;o<e.length;o++)j=
c(e[o]),j.attr("title")||j.attr("title",j.text()),l=parseInt(j.data("diff"),10),k=parseInt(j.data("time"),10),q=k+l,q>f+d&&(q=Math.floor(f+d)),l=f-q+l+d,l<0||(l<=60?j.text(XenForo.phrases.a_moment_ago):l<=120?j.text(XenForo.phrases.one_minute_ago):l<3600?j.text(XenForo.phrases.x_minutes_ago.replace(/%minutes%/,Math.floor(l/60))):k>i?j.text(XenForo.phrases.today_at_x.replace(/%time%/,j.attr("data-timestring"))):k>h?j.text(XenForo.phrases.yesterday_at_x.replace(/%time%/,j.attr("data-timestring"))):
k>n?(k=g-Math.ceil((i-k)/86400),k<0&&(k+=7),j.text(XenForo.phrases.day_x_at_time_y.replace("%day%",XenForo.phrases["day"+k]).replace(/%time%/,j.attr("data-timestring")))):j.text(j.attr("data-datestring")))}}};XenForo.CsrfRefresh=function(){this.__construct()};XenForo.CsrfRefresh.prototype={__construct:function(){this.activate();c(h).bind("XenForoWindowFocus",c.context(this,"focus"))},focus:function(){this.active||this.activate(!0)},activate:function(a){a&&this.refresh();return this.active=g.setInterval(c.context(this,
"refresh"),3E6)},deactivate:function(){g.clearInterval(this.active);this.active=!1},refresh:function(){XenForo._csrfRefreshUrl&&(XenForo._hasFocus?XenForo.ajax(XenForo._csrfRefreshUrl,"",function(a){if(!a||a.csrfToken===void 0)return!1;var b=c("input[name=_xfToken]").val(a.csrfToken);XenForo._csrfToken=a.csrfToken;b.length&&console.log("XenForo CSRF token updated in %d places (%s)",b.length,a.csrfToken);c(h).trigger({type:"CSRFRefresh",ajaxData:a})},{error:!1,global:!1}):this.deactivate())}};XenForo._PopupMenuActiveGroup=
null;XenForo.PopupMenu=function(a){this.__construct(a)};XenForo.PopupMenu.prototype={__construct:function(a){this.$container=a;this.$menu=this.$container.find(".Menu").appendTo("body");this.menuVisible=!1;if(!this.$menu.length)return console.warn("Unable to find menu for Popup %o",this.$container),!1;this.$menu.id=XenForo.uniqueId(this.$menu);this.contentSrc=this.$menu.data("contentSrc");this.contentDest=this.$menu.data("contentDest");this.unreadDisplayTimeout=this.loading=null;this.$clicker=a.find('[rel="Menu"]').first().click(c.context(this,
"controlClick"));XenForo.isTouchBrowser()||this.$clicker.mouseover(c.context(this,"controlHover")).hoverIntent({sensitivity:1,interval:100,timeout:0,over:c.context(this,"controlHoverIntent"),out:function(){}});this.$control=this.addPopupGadget(this.$clicker);this.popupGroup=this.$control.closest("[data-popupGroup]").data("popupGroup")},addPopupGadget:function(a){!a.hasClass("NoPopupGadget")&&!a.hasClass("SplitCtrl")&&a.append('<span class="arrowWidget" />');var b=a.closest(".PopupControl");b.length&&
(a=b.addClass("PopupContainerControl"));a.addClass("PopupControl");return a},controlClick:function(a){console.debug("%o control clicked. NewlyOpened: %s, Animated: %s",this.$control,this.newlyOpened,this.$menu.is(":animated"));if(!this.newlyOpened&&!this.$menu.is(":animated"))if(console.info("control: %o",this.$control),this.$menu.is(":hidden"))this.showMenu(a,!1);else if(this.$clicker.attr("href")&&!XenForo.isPositive(this.$clicker.data("closeMenu")))return console.warn("Following hyperlink from %o",
this.$clicker),!0;else this.hideMenu(a,!1);else console.debug("Click on control of newly-opened or animating menu, ignored");a.preventDefault();a.target.blur();return!1},controlHover:function(a){if(this.popupGroup!=null&&this.popupGroup==this.getActiveGroup())return this.showMenu(a,!0),!1},controlHoverIntent:function(a){var b=!1;this.$clicker.hasClass("SplitCtrl")&&(b=!0);this.showMenu(a,b)},showMenu:function(a,b){if(this.$menu.is(":visible"))return!1;var e=new c.Event("PopupMenuShow");e.$menu=this.$menu;
e.instant=b;c(h).trigger(e);if(e.isDefaultPrevented())return!1;this.menuVisible=!0;this.setMenuPosition("showMenu");this.$menu.hasClass("BottomControl")&&(b=!0);if(this.contentSrc&&!this.loading)this.loading=XenForo.ajax(this.contentSrc,"",c.context(this,"loadSuccess"),{type:"GET"}),this.$menu.find(".Progress").addClass("InProgress"),b=!0;this.setActiveGroup();this.$control.addClass("PopupOpen").removeClass("PopupClosed");this.$menu.stop().xfSlideDown(b?0:XenForo.speed.xfast,c.context(this,"menuShown"));
if(!this.menuEventsInitialized){c(h).bind({click:c.context(this,"hideMenu"),PopupMenuShow:c.context(this,"hideIfOther")});XenForo._isWebkitMobile&&c("#header, #content, .footer").click(c.context(this,"hideMenu"));var d=c("html"),f=this,i=[d.width(),d.height()];c(g).bind({resize:function(a){var b=d.width(),c=d.height();if(b!=i[0]||c!=i[1])i[0]=b,i[1]=c,f._hideMenu(a)}});this.$menu.delegate("a","click",c.context(this,"menuLinkClick"));this.$menu.delegate(".MenuCloser","click",c.context(this,"hideMenu"));
this.menuEventsInitialized=!0}},hideMenu:function(a,b){this.$menu.is(":visible")&&this.triggersMenuHide(a)&&this._hideMenu(a,!b)},_hideMenu:function(a,b){this.menuVisible=!1;this.setActiveGroup(null);this.$menu.hasClass("BottomControl")&&(b=!1);clearTimeout(this.unreadDisplayTimeout);this.$menu.find(".Unread").stop();this.$menu.xfSlideUp(b?XenForo.speed.xfast:0,c.context(this,"menuHidden"))},menuShown:function(){var a=this.$menu.data("contentSrc")?!1:!0,b=null;this.$control.addClass("PopupOpen").removeClass("PopupClosed");
this.newlyOpened=!0;setTimeout(c.context(function(){this.newlyOpened=!1},this),50);this.$menu.trigger("ShowComplete",[a]);this.setMenuPosition("menuShown");this.highlightUnreadContent();b=this.$menu.find("input[type=text], input[type=search], textarea, select").first();b.length&&!b.data("nofocus")&&b.select()},menuHidden:function(){this.$control.removeClass("PopupOpen").addClass("PopupClosed");this.$menu.trigger("MenuHidden")},hideIfOther:function(a){a.$menu.attr(c.expando)!=this.$menu.attr(c.expando)&&
this.hideMenu(a,a.instant)},triggersMenuHide:function(a){var b=c(a.target);return a.ctrlKey||a.shiftKey||a.altKey?!1:a.which>1?!1:b.is(".MenuCloser")?!0:b.is("a[href]")&&!a.isDefaultPrevented()?!0:!b.parents().andSelf().is("#"+this.$menu.id)?!0:!1},setMenuPosition:function(){var a,b,e,d;b=this.$control.coords("outer");for(a=this.$control;a&&a.length&&a.get(0)!=h;){if(a.css("position")=="fixed"){b.top-=c(g).scrollTop();b.left-=c(g).scrollLeft();this.$menu.css("position","fixed").data("position","fixed");
break}a=a.parent()}this.$control.removeClass("BottomControl");this.$menu.removeClass("BottomControl").css({left:b.left,top:b.top+b.height-1});a=this.$menu.coords("outer");d=c("#content .pageContent");e=d.length?d.coords("outer"):c("body").coords("outer");d=c(g);d.sT=d.scrollTop();d.sL=d.scrollLeft();a.left+a.width>e.left+e.width&&(e=b.left+b.width-a.width,(e>d.sL||XenForo._isWebkitMobile)&&this.$menu.css("left",e));a.top+a.height>d.height()+d.sT&&(b=b.top-a.height,b>d.sT&&(this.$control.addClass("BottomControl"),
this.$menu.addClass("BottomControl"),this.$menu.css("top",b)))},loadSuccess:function(a){if(XenForo.hasResponseError(a)||!XenForo.hasTemplateHtml(a))return!1;this.$menu.trigger("LoadComplete");a=c(a.templateHtml);if(!this.contentDest)console.warn("Menu content destination not specified, using this.$menu."),this.contentDest=this.$menu;console.info("Content destination: %o",this.contentDest);a.xfInsert(this.$menu.data("insertFn")||"appendTo",this.contentDest,"slideDown",0,c.context(this,"menuShown"));
this.$menu.find(".Progress").removeClass("InProgress")},resetLoader:function(){this.contentDest&&this.loading&&(delete this.loading,c(this.contentDest).empty(),this.$menu.find(".Progress").addClass("InProgress"))},menuLinkClick:function(a){this.hideMenu(a,!0)},setActiveGroup:function(a){return XenForo._PopupMenuActiveGroup=a===void 0?this.popupGroup:a},getActiveGroup:function(){return XenForo._PopupMenuActiveGroup},highlightUnreadContent:function(){var a=this.$menu.find(".Unread"),b=null,e=null;if(a.length&&
(b=a.data("defaultBackground")))a.css("backgroundColor",null),this.unreadDisplayTimeout=setTimeout(c.context(function(){(e=this.$menu.data("removeCounter"))&&c(e).xfFadeOut(XenForo.speed.fast,function(){c(this).empty().remove()});a.animate({backgroundColor:b},2E3,c.context(function(){a.removeClass("Unread");this.$menu.trigger("UnreadDisplayComplete")},this))},this),1E3)}};XenForo.AjaxProgress=function(){var a=null,b=function(){c(".Progress, .xenForm .ctrlUnit.submitUnit dt").addClass("InProgress");
a||(a=c('<div id="AjaxProgress" class="xenOverlay"><div class="content"><span class="close" /></div></div>').appendTo("body").overlay({top:0,speed:XenForo.speed.fast,oneInstance:!1,closeOnClick:!1,closeOnEsc:!1}).data("overlay"));a.load()},e=function(){c(".Progress, .xenForm .ctrlUnit.submitUnit dt").removeClass("InProgress");a&&a.isOpened()&&a.close()};c(h).bind({ajaxStart:function(){XenForo._AjaxProgress=!0;b()},ajaxStop:function(){XenForo._AjaxProgress=!1;e()},PseudoAjaxStart:function(){b()},PseudoAjaxStop:function(){e()}});
c.browser.msie&&c.browser.version<7&&c(h).bind("scroll",function(){a&&a.isOpened()&&!a.getConf().fixed&&a.getOverlay().css("top",a.getConf().top+c(g).scrollTop())})};XenForo.PageNav=function(a){this.__construct(a)};XenForo.PageNav.prototype={__construct:function(a){if(XenForo.isRTL())return!1;var b=a.find(".scrollable");if(!b.length)return!1;console.info("PageNav %o",a);this.start=parseInt(a.data("start"));this.page=parseInt(a.data("page"));this.end=parseInt(a.data("end"));this.last=parseInt(a.data("last"));
this.range=parseInt(a.data("range"));this.size=this.range*2+1;this.baseurl=a.data("baseurl");this.sentinel=a.data("sentinel");b.scrollable({speed:XenForo.speed.slow,easing:"easeOutBounce",keyboard:!1,prev:"#nullPrev",next:"#nullNext"});this.api=b.data("scrollable").onBeforeSeek(c.context(this,"beforeSeek"));this.$prevButton=a.find(".PageNavPrev").click(c.context(this,"prevPage"));this.$nextButton=a.find(".PageNavNext").click(c.context(this,"nextPage"));this.setControlVisibility(this.api.getIndex(),
0)},prevPage:function(){if(this.api.getIndex()==0&&this.start>2){for(var a=0,b=Math.max(2,this.start-this.size),a=this.start-1;a>=b;a--)this.prepend(a);this.start=b}this.api.seekTo(Math.max(this.api.getIndex()-this.size,0))},nextPage:function(){if(this.api.getIndex()+1+2*this.size>this.api.getSize()&&this.end<this.last-1){for(var a=0,b=Math.min(this.last-1,this.end+this.size),a=this.end+1;a<=b;a++)this.append(a);this.end=b}this.api.seekTo(Math.min(this.api.getSize()-this.size,this.api.getIndex()+
this.size))},prepend:function(a){this.buildPageLink(a).prependTo(this.api.getItemWrap());this.api.next(0)},append:function(a){this.buildPageLink(a).appendTo(this.api.getItemWrap())},buildPageLink:function(a){return c("<a />",{href:this.buildPageUrl(a),text:a,className:a>999?"gt999":""})},buildPageUrl:function(a){return this.baseurl.replace(this.sentinel,a).replace(escape(this.sentinel),a)},beforeSeek:function(a,b){this.setControlVisibility(b,XenForo.speed.fast)},setControlVisibility:function(a,b){a==
0&&this.start<=2?this.$prevButton.hide(b):this.$prevButton.show(b);this.api.getSize()-this.size<=a&&this.end>=this.last-1?this.$nextButton.hide(b):this.$nextButton.show(b)}};XenForo.OverlayTrigger=function(a,b){this.__construct(a,b)};XenForo.OverlayTrigger.prototype={__construct:function(a,b){this.$trigger=a.click(c.context(this,"show"));this.options=b},show:function(a){var b=this.$trigger.closest(".xenOverlay").data("overlay"),e,d=this.$trigger.is(".username, .avatar");if(!parseInt(XenForo._enableOverlays))if(this.$trigger.attr("href"))return!0;
else if(this.$trigger.data("href")){if(this.$trigger.closest(".AttachmentUploader, #AttachmentUploader").length==0)return g.location=XenForo.canonicalizeUrl(this.$trigger.data("href")),!1}else return console.warn("No alternative action found for OverlayTrigger %o",this.$trigger),!1;if(d&&this.$trigger.hasClass("NoOverlay"))return!0;if(a.ctrlKey||a.shiftKey||a.altKey)return!0;if(a.which>1)return!0;a.preventDefault();if(b&&b.isOpened())b.getTrigger().one("onClose",c.context(this,"show")),b.getConf().mask.closeSpeed=
0,b.close();else{if(!this.OverlayLoader){b=typeof this.options=="object"?this.options:{};b=c.extend(b,this.$trigger.data("overlayOptions"));e=this.$trigger.data("cacheOverlay");if(e!==void 0)XenForo.isPositive(e)?e=!0:(e=!1,b.onClose=c.context(this,"deCache"));else if(this.$trigger.is("input:submit"))e=!1,b.onClose=c.context(this,"deCache");if(d&&!this.$trigger.hasClass("OverlayTrigger"))!this.$trigger.data("cardUrl")&&this.$trigger.attr("href")&&(d=this.$trigger.attr("href").replace(/#.*$/,""),d+=
d.indexOf("?")>=0?"&card=1":"?card=1",this.$trigger.data("cardUrl",d)),e=!0,b.speed=XenForo.speed.fast,b.effect="apple";this.OverlayLoader=new XenForo.OverlayLoader(this.$trigger,e,b);this.OverlayLoader.load();a.preventDefault();return!0}this.OverlayLoader.show()}},deCache:function(){console.info("DeCache %o",this.OverlayLoader.overlay.getOverlay());this.OverlayLoader.overlay.getTrigger().removeData("overlay");this.OverlayLoader.overlay.getOverlay().empty().remove();delete this.OverlayLoader}};XenForo.LightBoxTrigger=
function(a){new XenForo.OverlayTrigger(a.data("cacheOverlay",1),{top:15,speed:1,closeSpeed:0,closeOnResize:!0,mask:{color:"rgb(0,0,0)",opacity:0.6,loadSpeed:0,closeSpeed:0},onBeforeLoad:function(){if(typeof XenForo.LightBox=="function"){if(XenForo._LightBoxObj===void 0)XenForo._LightBoxObj=new XenForo.LightBox(this,"*[data-author]");var b=parseInt(XenForo._lightBoxUniversal)?c("body"):a.closest("*[data-author]");console.info("Opening LightBox for %o using %s",b,"*[data-author]");XenForo._LightBoxObj.setThumbStrip(b);
XenForo._LightBoxObj.setImage(this.getTrigger().find("img:first"));c(h).triggerHandler("LightBoxOpening")}return!0},onLoad:function(){XenForo._LightBoxObj.setDimensions(!0);XenForo._LightBoxObj.bindNav();return!0},onClose:function(){XenForo._LightBoxObj.setImage();XenForo._LightBoxObj.unbindNav();return!0}})};XenForo.OverlayLoaderCache={};XenForo.OverlayLoader=function(a,b,c){this.__construct(a,c,b)};XenForo.OverlayLoader.prototype={__construct:function(a,b,c){this.$trigger=a;this.cache=c;this.options=
b},load:function(a){if(this.$trigger.is("input:submit")){if(this.cache=!1,!this.xhr){var a=this.$trigger.closest("form"),b=a.serializeArray();b.push({name:this.$trigger.attr("name"),value:this.$trigger.attr("value")});this.xhr=XenForo.ajax(a.attr("action"),b,c.context(this,"loadSuccess"))}}else{this.href=this.$trigger.data("cardUrl")||this.$trigger.data("href")||this.$trigger.attr("href");if(!this.href)return console.warn("No overlay href found for control %o",this.$trigger),!1;console.info("OverlayLoader for %s",
this.href);this.callback=a;if(this.cache&&XenForo.OverlayLoaderCache[this.href])this.createOverlay(XenForo.OverlayLoaderCache[this.href]);else if(!this.xhr)this.xhr=XenForo.ajax(this.href,"",c.context(this,"loadSuccess"),{type:"GET"})}},loadSuccess:function(a){delete this.xhr;if(XenForo.hasResponseError(a))return!1;if(a._redirectStatus&&a._redirectTarget)return g.location=XenForo.canonicalizeUrl(a._redirectTarget),!1;this.options.title=a.h1||a.title;new XenForo.ExtLoader(a,c.context(this,"createOverlay"))},
createOverlay:function(a){this.overlay=XenForo.createOverlay(this.$trigger,a&&a.templateHtml?a.templateHtml:a,this.options);this.cache&&(XenForo.OverlayLoaderCache[this.href]=this.overlay.getOverlay());typeof this.callback=="function"&&this.callback();this.show()},show:function(){this.overlay?this.overlay.load():(console.warn("Attempted to call XenForo.OverlayLoader.show() for %s before overlay is created",this.href),this.load(this.callback))}};XenForo.LoginBar=function(a){var b=c("#login").appendTo(a.find(".pageContent")),
e=function(e){e.preventDefault();XenForo.chromeAutoFillFix(b);b.xfSlideIn(XenForo.speed.slow,"easeOutBack",function(){c("#LoginControl").select();a.expose(c.extend(XenForo._overlayConfig.mask,{loadSpeed:XenForo.speed.slow,onBeforeClose:function(){d(!1,!0);return!0}}))})},d=function(a,e){a&&a.target.blur();b.xfSlideOut(XenForo.speed.fast);!e&&c.mask&&c.mask.close()};c('label[for="LoginControl"]').click(function(a){c(this).closest("#login").length==0&&(a.preventDefault(),b._xfSlideWrapper(!0)?d(a):
(c(XenForo.getPageScrollTagName()).scrollTop(0),e(a)))});a.delegate('input[name="register"]',"click",function(){var a=b.find("input.button.primary"),c=b.find('input[name="register"]:checked').val();b.find("input.button.primary").val(c=="1"?a.data("signupPhrase"):a.data("loginPhrase"))});a.delegate(".close","click",d)};XenForo.QuickSearch=function(a){var b=0;a.find("#QuickSearchQuery").focus(function(){b++;console.log("Show quick search menu (%s)",b);b==1&&c.browser.msie&&c.browser.version<9&&a.find("input").keydown(function(a){if(a.keyCode==
13)return c(this).parents("form").submit(),!1});a.addClass("active");a.find(".secondaryControls").slideDown(0);c(h).bind("click",function(b){c(b.target).parents("#QuickSearch").length||(console.log("Hide quick search menu"),c(this).unbind(b),a.find(".secondaryControls").slideUp(XenForo.speed.xfast,function(){a.removeClass("active")}))})})};XenForo.configureTooltipRtl=function(a){if(a.offset!==void 0)a.offset=XenForo.switchOffsetRTL(a.offset);if(a.position!==void 0)a.position=XenForo.switchStringRTL(a.position);
return a};XenForo.Tooltip=function(a){var b=String(a.data("tipClass")||""),c=/(\s|^)flipped(\s|$)/.test(b),d=parseInt(a.data("offsetY"))||-6,f=parseInt(a.data("offsetX"))+a.innerWidth()*(c?1:-1),i=XenForo.htmlspecialchars(a.attr("title"));f||setTimeout(function(){f=a.innerWidth()*(c?1:-1);a.data("tooltip").getConf().offset=XenForo.switchOffsetRTL([d,f])},500);a.attr("title",i).tooltip(XenForo.configureTooltipRtl({delay:0,position:a.data("position")||"top"+(c?"left":"right"),offset:[d,f],tipClass:"xenTooltip "+
b,layout:'<div><span class="arrow" /></div>'}))};XenForo.StatusTooltip=function(a){if(a.attr("title")){var b=XenForo.htmlspecialchars(a.attr("title"));a.attr("title",b).tooltip(XenForo.configureTooltipRtl({effect:"slide",slideOffset:30,position:"bottom right",offset:[10,10],tipClass:"xenTooltip statusTip",layout:'<div><span class="arrow" /></div>'}))}};XenForo.NodeDescriptionTooltip=function(a){var b=a.data("description");b&&c(b).length&&(c(b).addClass("xenTooltip nodeDescriptionTip").appendTo("body").append('<span class="arrow" />'),
a.tooltip(XenForo.configureTooltipRtl({effect:"slide",slideOffset:30,offset:[30,10],slideInSpeed:XenForo.speed.xfast,slideOutSpeed:50*XenForo._animationSpeedMultiplier,predelay:250,position:"bottom right",tip:b})),a.click(function(){c(this).data("tooltip").hide()}))};XenForo.AccountMenu=function(a){a.find(".submitUnit").hide();a.find(".StatusEditor").focus(function(){a.is(":visible")&&a.find(".submitUnit").show()})};XenForo.FollowLink=function(a){a.click(function(b){b.preventDefault();a.get(0).blur();
XenForo.ajax(a.attr("href"),{_xfConfirm:1},function(b){if(XenForo.hasResponseError(b))return!1;a.xfFadeOut(XenForo.speed.fast,function(){a.attr("href",b.linkUrl).html(b.linkPhrase).xfFadeIn(XenForo.speed.fast)})})})};XenForo.AttributionLink=function(a){a.click(function(a){if(c(this.hash).length){try{var e=this.hash,d=c(this.hash).offset().top,f=XenForo.getPageScrollTagName();c(f).animate({scrollTop:d},XenForo.speed.normal,"easeOutBack",function(){g.location.hash=e})}catch(i){g.location.hash=this.hash}a.preventDefault()}})};
XenForo.ClickProxy=function(a){a.click(function(){c(a.attr("rel")).click();if(!a.data("allowDefault"))return!1})};XenForo.ReCaptcha=function(a){this.__construct(a)};XenForo.ReCaptcha.prototype={__construct:function(a){XenForo.ReCaptcha.instance&&XenForo.ReCaptcha.instance.remove();XenForo.ReCaptcha.instance=this;if(this.publicKey=a.data("publicKey"))a.siblings("noscript").remove(),a.uniqueId(),this.$captcha=a,this.type="image",a.find(".ReCaptchaReload").click(c.context(this,"reload")),a.find(".ReCaptchaSwitch").click(c.context(this,
"switchType")),this.load(),c(g).unload(c.context(this,"remove")),a.closest("form.AutoValidator").bind({AutoValidationDataReceived:c.context(this,"reload")})},load:function(){if(g.Recaptcha)this.create();else{var a=c.context(this,"create"),b=c.browser.msie&&c.browser.version<=6?250:0;c.getScript("//www.google.com/recaptcha/api/js/recaptcha_ajax.js",function(){setTimeout(a,b)})}},create:function(){var a=this.$captcha;g.Recaptcha.create(this.publicKey,a.attr("id"),{theme:"custom",callback:function(){a.show();
c("#ReCaptchaLoading").remove();c("#recaptcha_challenge_field").val(g.Recaptcha.get_challenge())}})},reload:function(a){g.Recaptcha&&(c(a.target).is("form")||a.preventDefault(),g.Recaptcha.reload())},switchType:function(a){a.preventDefault();this.type=this.type=="image"?"audio":"image";g.Recaptcha.switch_type(this.type)},remove:function(){this.$captcha.empty().remove();g.Recaptcha&&g.Recaptcha.destroy()}};XenForo.ReCaptcha.instance=null;XenForo.Captcha=function(a){a.closest("form").one("AutoValidationError",
function(){a.fadeTo(XenForo.speed.fast,0.5);XenForo.ajax(a.data("source"),{},function(b){if(XenForo.hasResponseError(b))return!1;XenForo.hasTemplateHtml(b)&&a.xfFadeOut(XenForo.speed.xfast,function(){c(b.templateHtml).xfInsert("replaceAll",a,"xfFadeIn",XenForo.speed.xfast)})})})};XenForo.BbCodeImage=function(a){this.__construct(a)};XenForo.BbCodeImage.prototype={__construct:function(a){this.$image=a;this.actualWidth=0;if(!a.closest("a").length&&(a.attr("title",XenForo.phrases.click_image_show_full_size_version||
"Show full size").click(c.context(this,"toggleFullSize")),this.$image.tooltip(XenForo.configureTooltipRtl({effect:"slide",slideOffset:30,position:"top center",offset:[45,0],tipClass:"xenTooltip bbCodeImageTip",onBeforeShow:c.context(this,"isResized"),onShow:c.context(this,"addTipClick")})),!this.getImageWidth())){var b=a.attr("src");a.bind({load:c.context(this,"getImageWidth")});a.attr("src","about:blank");a.attr("src",b)}},getImageWidth:function(){this.$image.css("max-width","none");this.actualWidth=
this.$image.width();this.$image.css("max-width","");return this.actualWidth},toggleFullSize:function(a){var b=this.$image.width(),e,d,f,i,m=XenForo.speed.normal;this.actualWidth>b&&(e=this.$image.offset(),d=this.actualWidth/b,i=c("<img />",{src:this.$image.attr("src")}).addClass("bbCodeImageFullSize").css("width",b).css(e).click(function(){c(this).animate({width:b},0,function(){c(this).remove()});c(XenForo.getPageScrollTagName()).animate({scrollTop:e.top,scrollLeft:0},0)}).appendTo("body").animate({width:this.actualWidth},
m,"easeOutBack"),c(h).one("OverlayOpening",function(){i.remove()}),a.target==this.$image.get(0)?(f=e.left+(a.pageX-e.left)*d-c(g).width()/2,a=e.top+(a.pageY-e.top)*d-c(g).height()/2):(f=e.left+this.actualWidth/2-c(g).width()/2,a=e.top+this.$image.height()*d/2-c(g).height()/2),c(XenForo.getPageScrollTagName()).animate({scrollLeft:f,scrollTop:a},m,"easeOutBack",c.context(function(){this.$image.data("tooltip").hide()},this)))},isResized:function(){var a=this.$image.width();if(!a)return!1;if(this.getImageWidth()<=
a)return!1},addTipClick:function(){if(!this.tipClickAdded)c(this.$image.data("tooltip").getTip()).click(c.context(this,"toggleFullSize")),this.tipClickAdded=!0}};XenForo.Tabs=function(a){this.__construct(a)};XenForo.Tabs.prototype={__construct:function(a){this.$tabContainer=a;this.$panes=c(a.data("panes"));a.tabs(this.$panes,{current:"active",history:!1,onBeforeClick:c.context(this,"onBeforeClick")});this.api=a.data("tabs")},getCurrentTab:function(){return this.api.getIndex()},click:function(a){this.api.click(a)},
onBeforeClick:function(a,b){this.$tabContainer.children().each(function(a){b==a?c(this).addClass("active"):c(this).removeClass("active")});var e=c(this.$panes.get(b)),d=e.data("loadUrl");d&&(e.data("loadUrl",""),XenForo.ajax(d,{},function(a){if(XenForo.hasTemplateHtml(a)||XenForo.hasTemplateHtml(a,"message"))new XenForo.ExtLoader(a,function(a){var b;a.templateHtml?b=c(a.templateHtml):a.message&&(b=c("<div />").html(a.message));e.html("");b&&b.xfInsert("appendTo",e,"xfFadeIn",0)});else if(XenForo.hasResponseError(a))return!1},
{type:"GET"}))}};XenForo.LikeLink=function(a){a.click(function(a){a.preventDefault();var e=c(this);XenForo.ajax(this.href,{},function(a){if(XenForo.hasResponseError(a))return!1;e.stop(!0,!0);a.term&&(e.find(".LikeLabel").html(a.term),a.cssClasses&&c.each(a.cssClasses,function(a,b){e[b=="+"?"addClass":"removeClass"](a)}));if(a.templateHtml==="")c(e.data("container")).xfFadeUp(XenForo.speed.fast,function(){c(this).empty().xfFadeDown(0)});else{var b=c(e.data("container")),i=b.find(".LikeText"),g=c(a.templateHtml);
i.length?i.xfFadeOut(50,function(){var a=this.parentNode;c(this).remove();g.find(".LikeText").xfInsert("appendTo",a,"xfFadeIn",50)}):new XenForo.ExtLoader(a,function(){g.xfInsert("appendTo",b)})}})})};XenForo.Facebook={initialized:!1,appId:"",fbUid:0,authResponse:{},locale:"en-US",init:function(){XenForo.Facebook.initialized=!0;c(h.body).append(c('<div id="fb-root" />'));FB.init({appId:XenForo.Facebook.appId,xfbml:!0,oauth:!0,channelUrl:XenForo.canonicalizeUrl("fb_channel.php?l="+XenForo.Facebook.locale)});
FB.Event.subscribe("auth.sessionChange",XenForo.Facebook.sessionChange);FB.getLoginStatus(XenForo.Facebook.sessionChange);XenForo.visitor.user_id&&c(h).delegate("a.LogOut:not(.OverlayTrigger)","click",XenForo.Facebook.eLogOutClick)},start:function(){var a=c.getCookie("fbUid");if(a&&a.length)XenForo.Facebook.fbUid=parseInt(a,10);(XenForo.Facebook.forceInit||XenForo.Facebook.appId&&XenForo.Facebook.fbUid)&&XenForo.Facebook.load()},load:function(){XenForo.Facebook.locale=c("html").attr("lang").replace("-",
"_");if(!XenForo.Facebook.locale)XenForo.Facebook.locale="en_US";var a=h.createElement("script");XenForo.Facebook.locale.replace("-","_");a.src="//connect.facebook.net/"+XenForo.Facebook.locale+"/all.js";a.async=!0;g.fbAsyncInit=XenForo.Facebook.init;h.getElementsByTagName("head")[0].appendChild(a)},sessionChange:function(a){if(XenForo.Facebook.fbUid){var b=a.authResponse,a=XenForo.visitor;(XenForo.Facebook.authResponse=b)&&!a.user_id?(XenForo.alert(XenForo.phrases.logging_in+"...","",8E3),setTimeout(function(){g.location=
XenForo.canonicalizeUrl("index.php?register/facebook&t="+escape(b.accessToken)+"&redirect="+escape(g.location))},250)):!b&&a.user_id&&XenForo.Facebook.logout()}},logout:function(){var a=c("a.LogOut:not(.OverlayTrigger)").attr("href");a||(a="index.php?logout/&_xfToken="+XenForo._csrfToken);a+=(a.indexOf("?")>=0?"&":"?")+"redirect="+escape(g.location);g.location=XenForo.canonicalizeUrl(a)},eLogOutClick:function(){if(XenForo.Facebook.authResponse&&XenForo.Facebook.authResponse.userID)return FB.logout(XenForo.Facebook.logout),
!1}};XenForo.Prompt=function(a){this.__construct(a)};XenForo.Prompt.prototype="placeholder"in h.createElement("input")?{__construct:function(a){this.$input=a},isEmpty:function(){return this.$input.strval()===""},val:function(a,b){return a===void 0?this.$input.val():(b&&this.$input.focus(),this.$input.val(a))}}:{__construct:function(a){console.log("Emulating placeholder behaviour for %o",a);this.placeholder=a.attr("placeholder");this.$input=a.bind({focus:c.context(this,"setValueMode"),blur:c.context(this,
"setPromptMode")});this.$input.closest("form").bind({submit:c.context(this,"eFormSubmit"),AutoValidationBeforeSubmit:c.context(this,"eFormSubmit"),AutoValidationComplete:c.context(this,"eFormSubmitted")});this.setPromptMode()},isEmpty:function(){var a=this.$input.val();return a===""||a==this.placeholder},setPromptMode:function(){this.isEmpty()&&this.$input.val(this.placeholder).addClass("prompt")},setValueMode:function(){this.isEmpty()&&this.$input.val("").removeClass("prompt").select()},val:function(a,
b){if(a===void 0)return this.isEmpty()?"":this.$input.val();else a===""?(this.$input.val(""),b===void 0&&this.setPromptMode()):(this.setValueMode(),this.$input.val(a))},eFormSubmit:function(){this.isEmpty()&&this.$input.val("");return!0},eFormSubmitted:function(){this.setPromptMode()}};XenForo.SpinBox=function(a){this.__construct(a)};XenForo.SpinBox.prototype={__construct:function(a){var b;if(a.attr("step")===void 0)console.warn("ERROR: No data-step attribute specified for spinbox.");else{this.parameters=
{step:null,min:null,max:null};for(b in this.parameters)a.attr(b)===void 0?delete this.parameters[b]:this.parameters[b]=parseFloat(a.attr(b));a.width();b=c('<input type="button" class="button spinBoxButton up" value="+" data-plusMinus="+" tabindex="-1" />').insertAfter(a).focus(c.context(this,"eFocusButton")).click(c.context(this,"eClickButton")).mousedown(c.context(this,"eMousedownButton")).mouseup(c.context(this,"eMouseupButton"));c('<input type="button" class="button spinBoxButton down" value="-" data-plusMinus="-" tabindex="-1" />').insertAfter(b).focus(c.context(this,
"eFocusButton")).click(c.context(this,"eClickButton")).mousedown(c.context(this,"eMousedownButton")).mouseup(c.context(this,"eMouseupButton"));this.$input=a.attr("autocomplete","off").blur(c.context(this,"eBlurInput")).keyup(c.context(this,"eKeyupInput"));this.$input.closest("form").bind("submit",c.context(this,"eBlurInput"));this.$input.val(this.constrain(this.getValue()))}},getValue:function(){var a=parseFloat(this.$input.val()),a=isNaN(a)?parseFloat(this.$input.val().replace(/[^0-9.]/g,"")):a;
return isNaN(a)?0:a},constrain:function(a){return this.parameters.min!==void 0&&a<this.parameters.min?(console.warn("Minimum value for SpinBox = %s\n %o",this.parameters.min,this.$input),this.parameters.min):this.parameters.max!==void 0&&a>this.parameters.max?(console.warn("Maximum value for SpinBox = %s\n %o",this.parameters.max,this.$input),this.parameters.max):a},stepValue:function(a){var b=this.getValue(),c=b%this.parameters.step,a=a=="+";b-=c;if(!c||a&&c>0||!a&&c<0)b+=this.parameters.step*(a?
1:-1);this.$input.val(this.constrain(b));this.$input.triggerHandler("change")},eBlurInput:function(){this.$input.val(this.constrain(this.getValue()))},eKeyupInput:function(a){switch(a.which){case 38:return this.stepValue("+"),this.$input.select(),!1;case 40:return this.stepValue("-"),this.$input.select(),!1}},eFocusButton:function(){return!1},eClickButton:function(a){this.stepValue(c(a.target).data("plusMinus"));this.$input.focus();this.$input.select()},eMousedownButton:function(a){this.eMouseupButton(a);
this.holdTimeout=setTimeout(c.context(function(){this.holdInterval=setInterval(c.context(function(){this.stepValue(a.target.value)},this),75)},this),500)},eMouseupButton:function(){clearTimeout(this.holdTimeout);clearInterval(this.holdInterval)}};XenForo.Disabler=function(a){var b=function(b,d){var g=e.find("input, select, textarea, button, .inputWrapper"),h=d?0:XenForo.speed.fast,n=function(){e.find("input, select, textarea").first().focus().select()};a.is(":checked:enabled")?(e.removeAttr("disabled").removeClass("disabled").trigger("DisablerDisabled"),
g.removeAttr("disabled").removeClass("disabled"),a.hasClass("Hider")?e.xfFadeDown(h,d?null:n):d||n.call()):(a.hasClass("Hider")&&e.xfFadeUp(h,null,XenForo.speed.fast,"easeInBack"),e.attr("disabled",!0).addClass("disabled").trigger("DisablerEnabled"),g.attr("disabled",!0).addClass("disabled").each(function(a,b){var e=c(b),d=e.data("disabled");d!==null&&typeof d!="undefined"&&e.val(d)}))},e=c("#"+a.attr("id")+"_Disabler"),d=a.closest("form");a.is(":radio")?d.find('input:radio[name="'+a.fieldName()+
'"]').click(b):a.click(b);d.bind("reset",b);b(null,!0);e.find("label, input, select, textarea").click(function(){a.is(":checked")||(a.attr("checked","checked"),b())});this.setStatus=b};XenForo.CheckAll=function(a){a.is(":checkbox")?a.click(function(b){var e=a.data("target");e||(e=a.closest("form"));c(e).find("input:checkbox").attr("checked",b.target.checked)}):a.click(function(){var b=a.data("target");b&&c(b).attr("checked",!0)})};XenForo.AutoChecker=function(a){a.click(function(){if(this.checked){var b=
null;c.each({check:!0,uncheck:!1},function(e,d){(b=a.data(e))&&c(b).each(function(){this.checked=d;var a=c(this).data("XenForo.Disabler");typeof a=="object"&&a.setStatus()})})}})};XenForo.ToggleButton=function(a){var b,e=function(){b[d.is(":checked")?"addClass":"removeClass"]("checked")},d=a.hide().find("input:checkbox, input:radio").first(),f=a.closest("ul, ol").bind("toggleButtonClick",e);!d.length&&a.attr("for")&&(d=c("#"+a.attr("for")));b=c("<a />").text(a.attr("title")||a.text()).insertBefore(a).attr({"class":"button "+
a.attr("class"),title:a.text()}).click(function(){d.click();f.length?f.triggerHandler("toggleButtonClick"):e();return!1});a.closest("form").bind("reset",function(){setTimeout(e,100)});e()};XenForo.AutoInlineUploader=function(a){a.find("input:file").each(function(){var b=c(this).change(function(d){c(d.target).val()!=""&&(c('<iframe src="about:blank" style="display:none; background-color: white" name="AutoInlineUploader"></iframe>').insertAfter(c(d.target)).load(function(d){var i=c(d.target),d=i.contents().text(),
g=null;if(!d)return!1;c(h).trigger("PseudoAjaxStop");e.clone(!0).replaceAll(b);setTimeout(function(){i.remove()},500);try{d=c.parseJSON(d),console.info("Inline file upload completed successfully. Data: %o",d)}catch(r){return console.error(d),!1}if(XenForo.hasResponseError(d))return!1;c("input:submit",this.$form).removeAttr("disabled");g=new c.Event("AutoInlineUploadComplete");g.$form=a;g.ajaxData=d;a.trigger(g);console.log(d);!g.isDefaultPrevented()&&d.message&&XenForo.alert(d.message,"",2500)}),
d=c('<span><input type="hidden" name="_xfNoRedirect" value="1" /><input type="hidden" name="_xfResponseType" value="json-text" /><input type="hidden" name="_xfUploader" value="1" /></span>').appendTo(a),a.attr("target","AutoInlineUploader").submit().trigger("AutoInlineUploadStart"),d.remove(),c(h).trigger("PseudoAjaxStart"),a.find("input:submit").attr("disabled","disabled"))}),e=b.clone(!0)})};XenForo.MultiSubmitFix=function(a){var b=function(){a.trigger("EnableSubmitButtons").find("input:submit, input.PreviewButton, input.DisableOnSubmit").removeClass("disabled").removeAttr("disabled")};
c.browser.webkit||c(g).unload(b);var e=function(){setTimeout(function(){a.trigger("DisableSubmitButtons").find("input:submit, input.PreviewButton, input.DisableOnSubmit").attr("disabled",!0).addClass("disabled")},0);setTimeout(b,5E3)};a.data("MultiSubmitEnable",b).data("MultiSubmitDisable",e).submit(e);return b};XenForo.SubmitOnChange=function(a){if(a.is("label")&&(a=a.find("input:radio, input:checkbox"),!a.length))return;a.click(function(a){clearTimeout(a.target.form.submitTimeout);a.target.form.submitTimeout=
setTimeout(function(){c(a.target).closest("form").submit()},500)})};XenForo.AutoValidator=function(a){this.__construct(a)};XenForo.AutoValidator.prototype={__construct:function(a){this.$form=a.bind({submit:c.context(this,"ajaxSave"),reset:c.context(this,"formReset")});this.$form.find('input[type="submit"]').click(c.context(this,"setClickedSubmit"));this.fieldValidatorUrl=this.$form.data("fieldValidatorUrl");this.optInMode=this.$form.data("optInOut")||"optOut";this.ajaxSubmit=XenForo.isPositive(this.$form.data("normalSubmit"))?
!1:!0;this.fieldValidationTimeouts={};this.fieldValidationRequests={}},getExistingDataKey:function(){var a=this.$form.find("input.ExistingDataKey, select.ExistingDataKey, textarea.ExistingDataKey, button.ExistingDataKey").val();a===void 0&&(a=this.$form.data("existingDataKey"),a===void 0&&(a=""));return a},formReset:function(){var a=this.$form.data("exitUrl");if(a)g.location=XenForo.canonicalizeUrl(a)},setClickedSubmit:function(a){this.$form.data("clickedSubmitButton",a.target)},ajaxSave:function(a){if(!this.ajaxSubmit||
!XenForo._enableAjaxSubmit)return!0;this.abortPendingFieldValidation();var b=this.$form.data("clickedSubmitButton"),e,d=c.Event("AutoValidationBeforeSubmit");d.formAction=this.$form.attr("action");d.clickedSubmitButton=b;d.preventSubmit=!1;d.ajaxOptions={};this.$form.trigger(d);this.$form.removeData("clickedSubmitButton");if(d.preventSubmit)return!1;else d.isDefaultPrevented()||(e=this.$form.serializeArray(),b&&(b=c(b),b.attr("name")&&e.push({name:b.attr("name"),value:b.attr("value")})),XenForo.ajax(d.formAction,
e,c.context(this,"ajaxSaveResponse"),d.ajaxOptions),a.preventDefault())},ajaxSaveResponse:function(a,b){if(!a)return console.warn("No ajax data returned."),!1;var e,d,f;e=c.Event("AutoValidationDataReceived");e.ajaxData=a;e.textStatus=b;e.validationError=[];console.group("Event: %s",e.type);this.$form.trigger(e);console.groupEnd();if(e.isDefaultPrevented())return!1;if(!this.validates(e)){d=c.Event("AutoValidationError");d.ajaxData=a;d.textStatus=b;d.validationError=e.validationError;console.group("Event: %s",
d.type);this.$form.trigger(d);console.groupEnd();if(d.isDefaultPrevented())return!1;this.$form.closest(".xenOverlay").length&&this.$form.closest(".xenOverlay").data("overlay").close();if(a.templateHtml)setTimeout(c.context(function(){this.$error=XenForo.createOverlay(null,this.prepareError(a.templateHtml)).load()},this),250);else if(a.error!==void 0){if(typeof a.error==="object"){for(var g in a.error)break;a.error=a.error[g]}XenForo.alert(a.error+"\n"+(a.traceHtml!==void 0?'<ol class="traceHtml">\n'+
a.traceHtml+"</ol>":""),XenForo.phrases.following_error_occurred+":")}return!1}d=c.Event("AutoValidationComplete");d.ajaxData=a;d.textStatus=b;d.$form=this.$form;console.group("Event: %s",d.type);this.$form.trigger(d);console.groupEnd();if(d.isDefaultPrevented())return!1;this.$form.parents(".xenOverlay").length&&(this.$form.parents(".xenOverlay").data("overlay").close(),a.linkPhrase&&(f=this.$form.parents(".xenOverlay").data("overlay").getTrigger(),f.xfFadeOut(XenForo.speed.fast,function(){a.linkUrl&&
f.is("a")&&f.attr("href",a.linkUrl);f.text(a.linkPhrase).xfFadeIn(XenForo.speed.fast)})));if(a.message)XenForo.alert(a.message,"",4E3);else{if(a._redirectMessage=="")return this.redirect(a._redirectTarget);XenForo.alert(a._redirectMessage,"",1E3,c.context(function(){this.redirect(a._redirectTarget)},this))}},validates:function(a){return c.isEmptyObject(a.validationErrors)&&!a.ajaxData.error},prepareError:function(a){$html=c(a);$html.find("label").each(function(a,e){var d=c("#"+c(e).attr("for")).closest(".ctrlUnit").find("dt > label");
d.length&&c(e).prepend(d.text()+"<br />")});return $html},redirect:function(a){if(XenForo.isPositive(this.$form.data("redirect"))||!parseInt(XenForo._enableOverlays)){var b=new c.Event("AutoValidationRedirect");b.redirectTarget=a;this.$form.trigger(b);if(!b.isDefaultPrevented()&&b.redirectTarget)return g.location=XenForo.canonicalizeUrl(b.redirectTarget),!0}return!1},setFieldValidationTimeout:function(a,b){if(!this.hasFieldValidator(a))return!1;console.log("setTimeout %s",a);this.clearFieldValidationTimeout(a);
this.fieldValidationTimeouts[a]=setTimeout(b,250)},clearFieldValidationTimeout:function(a){this.fieldValidationTimeouts[a]&&(console.log("Clear field validation timeout: %s",a),clearTimeout(this.fieldValidationTimeouts[a]),delete this.fieldValidationTimeouts[a])},startFieldValidationRequest:function(a,b,c){if(!this.hasFieldValidator(a))return!1;this.abortFieldValidationRequest(a);this.fieldValidationRequests[a]=XenForo.ajax(this.fieldValidatorUrl,{name:a,value:b.fieldValue(),existingDataKey:this.getExistingDataKey()},
c,{global:!1})},abortFieldValidationRequest:function(a){this.fieldValidationRequests[a]&&(console.log("Abort field validation request: %s",a),this.fieldValidationRequests[a].abort(),delete this.fieldValidationRequests[a])},abortPendingFieldValidation:function(){console.group("Abort pending field validation...");c.each(this.fieldValidationTimeouts,c.context(this,"clearFieldValidationTimeout"));c.each(this.fieldValidationRequests,c.context(this,"abortFieldValidationRequest"));console.groupEnd()},hasFieldValidator:function(){return this.fieldValidatorUrl?
!0:!1}};XenForo.AutoValidatorControl=function(a){this.__construct(a)};XenForo.AutoValidatorControl.prototype={__construct:function(a){this.$form=a.closest("form.AutoValidator").bind({AutoValidationDataReceived:c.context(this,"handleFormValidation")});this.$input=a.bind({change:c.context(this,"change"),AutoValidationError:c.context(this,"showError"),AutoValidationPass:c.context(this,"hideError")});this.name=a.data("validatorname")||a.attr("name");this.autoValidate=a.hasClass("NoAutoValidate")?!1:!0},
change:function(){this.autoValidate&&this.$form.data("XenForo.AutoValidator").setFieldValidationTimeout(this.name,c.context(this,"validate"))},validate:function(){this.autoValidate&&this.$form.data("XenForo.AutoValidator").startFieldValidationRequest(this.name,this.$input,c.context(this,"handleValidation"))},handleValidation:function(a){return a&&a.error&&a.error[this.name]?(this.$input.trigger({type:"AutoValidationError",errorMessage:a.error[this.name]}),!1):(this.$input.trigger("AutoValidationPass"),
!0)},showError:function(a){console.warn("%s: %s",this.name,a.errorMessage);this.fetchError(a.errorMessage).css(this.positionError()).show()},hideError:function(){console.info("%s: Okay",this.name);this.$error&&this.fetchError().hide()},fetchError:function(a){if(!this.$error)this.$error=c('<label for="'+this.$input.attr("id")+'" class="formValidationInlineError">WHoops</label>').insertAfter(this.$input);a&&this.$error.html(a).xfActivate();return this.$error},positionError:function(){var a=this.$input.coords("outer",
"position");return{top:a.top,left:a.left+a.width+10}},handleFormValidation:function(a){this.handleValidation(a.ajaxData,a.textStatus)||a.validationError.push(this.name)}};XenForo.isAutoValidatorField=function(a){var b;if(b=c(a.form).data("XenForo.AutoValidator"))switch(a=c(a),b.optInMode){case "OptIn":return a.hasClass("OptIn")||a.closest(".ctrlUnit").hasClass("OptIn");default:return!a.hasClass("OptOut")&&!a.closest(".ctrlUnit").hasClass("OptOut")}return!1};XenForo.PreviewForm=function(a){var b=a.data("previewUrl");
b?a.find(".PreviewButton").click(function(){XenForo.ajax(b,a.serialize(),function(b){if(XenForo.hasResponseError(b)||!XenForo.hasTemplateHtml(b))return!1;new XenForo.ExtLoader(b,function(b){var e=a.find(".PreviewContainer").first();e.length?e.xfFadeOut(XenForo.speed.fast,function(){e.html(b.templateHtml).xfActivate()}):e=c("<div />",{"class":"PreviewContainer"}).hide().html(b.templateHtml).xfActivate().prependTo(a);e.xfFadeIn(XenForo.speed.fast);e.get(0).scrollIntoView(!0)})})}):console.warn("PreviewForm has no data-previewUrl: %o",
a)};XenForo.LiveTitle=function(a){var b=a.closest(".formOverlay").find("h2.h1"),e;b.length||(b=c("h1").first());console.info("Title Element: %o",b);b.data("originalHtml",b.html());e=function(d){a.trigger("LiveTitleSet",[d]);b.html(d===""?b.data("originalHtml"):a.data("liveTitleTemplate").replace(/%s/,c("<div />").text(d).html()))};a.hasClass("prompt")||e(a.strval());a.bind("keyup focus",function(){e(a.strval())}).closest("form").bind("reset",function(){e("")})};XenForo.TextareaElastic=function(a){this.__construct(a)};
XenForo.TextareaElastic.prototype={__construct:function(a){this.$input=a;this.curHeight=0;a.bind("keyup focus",c.context(this,"recalculate"));a.bind("paste",c.context(this,"paste"));a.val()!==""&&this.recalculate()},recalculate:function(){var a=this.$input,b=a.get(0),e,d;if(a.val()==="")a.css({overflow:"hidden",height:""}),this.curHeight=0;else{if(!this.minHeight){this.minHeight=(this.borderBox=a.css("-moz-box-sizing")=="border-box"||a.css("box-sizing")=="border-box")?a.outerHeight():b.clientHeight;
if(!this.minHeight)return;this.maxHeight=parseInt(a.css("max-height"),10);this.spacing=this.borderBox?a.outerHeight()-a.innerHeight():0}if(!this.$clone)this.$clone=c("<textarea />").css({position:"absolute",left:XenForo.isRTL()?"9999em":"-9999em",visibility:"hidden",width:b.clientWidth,height:"1px","font-size":a.css("font-size"),"font-family":a.css("font-family"),"font-weight":a.css("font-weight"),"line-height":a.css("line-height"),"word-wrap":a.css("word-wrap")}).attr("tabindex",-1).val(" "),this.$clone.appendTo(h.body),
this.lineHeight=this.$clone.get(0).scrollHeight;this.$clone.val(a.val());b=this.$clone.get(0);e=Math.max(this.minHeight,b.scrollHeight+this.lineHeight+this.spacing);if(e<this.maxHeight){if(this.curHeight!=e){b=a.get(0);if(this.curHeight==this.maxHeight&&b.setSelectionRange)d=b.selectionStart;a.css({overflow:"hidden",height:e+"px"});this.curHeight==this.maxHeight&&b.setSelectionRange&&b.setSelectionRange(d,d);this.curHeight=e}}else if(this.curHeight!=this.maxHeight){b=a.get(0);if(b.setSelectionRange)d=
b.selectionStart;a.css({overflow:"auto",height:this.maxHeight+"px"});b.setSelectionRange&&b.setSelectionRange(d,d);this.curHeight=this.maxHeight}}},paste:function(){setTimeout(c.context(this,"recalculate"),100)}};XenForo.AutoTimeZone=function(a){var b=new Date,e=new Date(b.getFullYear(),0,1),b=new Date(b.getFullYear(),5,1),e=Math.round(e.getTimezoneOffset()),b=Math.round(b.getTimezoneOffset());return c.browser.opera?!1:XenForo.AutoTimeZone.map[e+","+b]?(a.val(XenForo.AutoTimeZone.map[e+","+b]),!0):
!1};XenForo.AutoTimeZone.map={"660,660":"Pacific/Midway","600,600":"Pacific/Honolulu","570,570":"Pacific/Marquesas","540,480":"America/Anchorage","480,420":"America/Los_Angeles","420,360":"America/Denver","420,420":"America/Phoenix","360,300":"America/Chicago","360,360":"America/Belize","300,240":"America/New_York","300,300":"America/Bogota","270,270":"America/Caracas","240,180":"America/Halifax","180,240":"America/Cuiaba","240,240":"America/La_Paz","210,150":"America/St_Johns","180,180":"America/Argentina/Buenos_Aires",
"120,180":"America/Sao_Paulo","180,120":"America/Miquelon","120,120":"America/Noronha","60,60":"Atlantic/Cape_Verde","60,0":"Atlantic/Azores","0,-60":"Europe/London","0,0":"Atlantic/Reykjavik","-60,-120":"Europe/Amsterdam","-60,-60":"Africa/Algiers","-120,-60":"Africa/Windhoek","-120,-180":"Europe/Athens","-120,-120":"Africa/Johannesburg","-180,-240":"Europe/Moscow","-180,-180":"Africa/Nairobi","-210,-270":"Asia/Tehran","-240,-240":"Asia/Dubai","-240,-300":"Asia/Yerevan","-270,-270":"Asia/Kabul",
"-300,-360":"Asia/Yekaterinburg","-300,-300":"Asia/Tashkent","-330,-330":"Asia/Kolkata","-345,-345":"Asia/Kathmandu","-360,-360":"Asia/Dhaka","-360,-420":"Asia/Novosibirsk","-390,-390":"Asia/Rangoon","-420,-420":"Asia/Bangkok","-420,-480":"Asia/Krasnoyarsk","-480,-480":"Asia/Hong_Kong","-480,-540":"Asia/Irkutsk","-540,-540":"Asia/Tokyo","-540,-600":"Asia/Yakutsk","-630,-570":"Australia/Adelaide","-570,-570":"Australia/Darwin","-660,-600":"Australia/Sydney","-600,-660":"Asia/Vladivostok","-660,-720":"Asia/Magadan",
"-690,-690":"Pacific/Norfolk","-660,-720":"Asia/Anadyr","-780,-720":"Pacific/Auckland","-825,-765":"Pacific/Chatham","-780,-780":"Pacific/Tongatapu","-840,-840":"Pacific/Kiritimati"};XenForo.DatePicker=function(a){XenForo.DatePicker.$root||c.tools.dateinput.localize("_f",{months:XenForo.phrases._months,shortMonths:"1,2,3,4,5,6,7,8,9,10,11,12",days:"s,m,t,w,t,f,s",shortDays:XenForo.phrases._daysShort});var b=a.dateinput({lang:"_f",format:"yyyy-mm-dd",speed:0,onShow:function(){var a=XenForo.DatePicker.$root,
d=b.offset(),f=0;a.css({top:d.top+b.outerHeight({margins:!0}),left:d.left});b.parents().each(function(a,b){var d=parseInt(c(b).css("z-index"),10);d>f&&(f=d)});a.css("z-index",f+1E3)}});b.addClass(a.attr("class"));a.attr("id")&&b.attr("id",a.attr("id"));if(!XenForo.DatePicker.$root)XenForo.DatePicker.$root=c("#calroot").appendTo(h.body),c("#calprev").html("&larr;").attr("unselectable","on"),c("#calnext").html("&rarr;").attr("unselectable","on")};XenForo.DatePicker.$root=null;XenForo.AutoComplete=function(a){this.__construct(a)};
XenForo.AutoComplete.prototype={__construct:function(a){this.$input=a;if(XenForo.AutoComplete.defaultUrl===null)XenForo.AutoComplete.defaultUrl=c("html").hasClass("Admin")?"admin.php?users/search-name&_xfResponseType=json":"index.php?members/find&_xfResponseType=json";this.url=a.data("acUrl")||XenForo.AutoComplete.defaultUrl;this.extraFields=a.data("acExtraFields");var b={multiple:a.hasClass("AcSingle")?!1:",",minLength:2,queryKey:"q",extraParams:{},jsonContainer:"results",autoSubmit:XenForo.isPositive(a.data("autoSubmit"))};
a.data("acOptions")&&(b=c.extend(b,c.parseJSON(a.data("acOptions"))));if(b.autoSubmit)b.multiple=!1;this.multiple=b.multiple;this.minLength=b.minLength;this.queryKey=b.queryKey;this.extraParams=b.extraParams;this.jsonContainer=b.jsonContainer;this.autoSubmit=b.autoSubmit;this.selectedResult=0;this.loadVal="";this.resultsVisible=this.$results=!1;a.attr("autocomplete","off").keydown(c.context(this,"keystroke")).keypress(c.context(this,"operaKeyPress")).blur(c.context(this,"blur"));a.closest("form").submit(c.context(this,
"hideResults"))},keystroke:function(a){var b=!0;switch(a.keyCode||a.charCode){case 40:this.selectResult(1);break;case 38:this.selectResult(-1);break;case 27:this.hideResults();break;case 13:this.resultsVisible?this.insertSelectedResult():b=!1;break;default:if(b=!1,this.loadTimer&&clearTimeout(this.loadTimer),this.loadTimer=setTimeout(c.context(this,"load"),200),this.$results)this.$results.hide().empty(),this.resultsVisible=!1}b&&a.preventDefault();this.preventKey=b},operaKeyPress:function(a){c.browser.opera&&
this.preventKey&&a.preventDefault()},blur:function(){clearTimeout(this.loadTimer);setTimeout(c.context(this,"hideResults"),250);if(this.xhr)this.xhr.abort(),this.xhr=!1},load:function(){var a=this.loadVal,b=this.extraParams;this.loadTimer&&clearTimeout(this.loadTimer);this.loadVal=this.getPartialValue();if(this.loadVal=="")this.hideResults();else if(this.loadVal!=a&&!(this.loadVal.length<this.minLength))b[this.queryKey]=this.loadVal,this.extraFields!=""&&c(this.extraFields).each(function(){b[this.name]=
c(this).val()}),this.xhr&&this.xhr.abort(),this.xhr=XenForo.ajax(this.url,b,c.context(this,"showResults"),{global:!1,error:!1})},hideResults:function(){this.resultsVisible=!1;this.$results&&this.$results.hide()},showResults:function(a){var b=this.$input.offset(),e=0,d,f;if(this.xhr)this.xhr=!1;if(a){if(this.jsonContainer)if(a[this.jsonContainer])a=a[this.jsonContainer];else{this.hideResults();return}this.resultsVisible=!1;this.$results?this.$results.hide().empty():(this.$results=c("<ul />").css({position:"absolute",
display:"none"}).addClass("autoCompleteList").appendTo(h.body),this.$input.parents().each(function(a,b){var d=c(b),d=parseInt(d.css("z-index"),10);d>e&&(e=d)}),this.$results.css("z-index",e+1E3));f=RegExp("("+XenForo.regexQuote(this.$input.val())+")","i");for(d in a)c("<li />").css("cursor","pointer").data("autoComplete",d).click(c.context(this,"resultClick")).mouseenter(c.context(this,"resultMouseEnter")).html(a[d].username.replace(f,"<strong>$1</strong>")).appendTo(this.$results).prepend(c('<img class="autoCompleteAvatar" />').attr("src",
a[d].avatar));if(this.$results.children().length){this.selectResult(0,!0);a={top:b.top+this.$input.outerHeight(),left:b.left};if(XenForo.isRTL())a.right=c("html").width()-b.left-this.$input.outerWidth(),a.left="auto";this.resizeBound||c(g).bind("resize",c.context(this,"hideResults"));this.$results.css(a).show();this.resultsVisible=!0}}else this.hideResults()},resultClick:function(a){a.stopPropagation();this.addValue(c(a.currentTarget).data("autoComplete"));this.hideResults();this.$input.focus()},
resultMouseEnter:function(a){this.selectResult(c(a.currentTarget).index(),!0)},selectResult:function(a,b){var e,d;if(this.$results&&(b?this.selectedResult=a:this.selectedResult+=a,e=this.selectedResult,d=this.$results.children(),d.each(function(a){a==e?c(this).addClass("selected"):c(this).removeClass("selected")}),e<0||e>=d.length))this.selectedResult=-1},insertSelectedResult:function(){var a,b=!1;if(!this.resultsVisible)return!1;if(this.selectedResult>=0&&(a=this.$results.children().get(this.selectedResult)))this.addValue(c(a).data("autoComplete")),
b=!0;this.hideResults();return b},addValue:function(a){if(this.multiple){var b=this.getFullValues();a!=""&&(b.length&&(a=" "+a),b.push(a+this.multiple+" "));this.$input.val(b.join(this.multiple))}else this.$input.val(a);this.autoSubmit&&this.$input.closest("form").submit()},getFullValues:function(){var a=this.$input.val();return a==""?[]:this.multiple?(splitPos=a.lastIndexOf(this.multiple),splitPos==-1?[]:(a=a.substr(0,splitPos),a.split(this.multiple))):[a]},getPartialValue:function(){var a=this.$input.val(),
b;return this.multiple?(b=a.lastIndexOf(this.multiple),b==-1?c.trim(a):c.trim(a.substr(b+this.multiple.length))):c.trim(a)}};XenForo.AutoComplete.defaultUrl=null;XenForo.AutoSelect=function(a){a.bind("focus",function(){a.focus().select();console.log("input select");return!1})};XenForo.StatusEditor=function(a){this.__construct(a)};XenForo.StatusEditor.prototype={__construct:function(a){this.$input=a.keyup(c.context(this,"update")).keydown(c.context(this,"preventNewline"));this.$counter=c(this.$input.data("statusEditorCounter"));
if(!this.$counter.length)this.$counter=c("<span />").insertAfter(this.$input);this.$counter.addClass("statusEditorCounter").text("0");this.$form=this.$input.closest("form").bind({AutoValidationComplete:c.context(this,"saveStatus")});this.charLimit=140;this.charCount=0;this.update()},update:function(){var a=this.$input.val();this.$input.attr("placeholder")&&this.$input.attr("placeholder")==a?this.setCounterValue(this.charLimit,a.length):this.setCounterValue(this.charLimit-a.length,a.length)},setCounterValue:function(a,
b){a<0?(this.$counter.addClass("error"),this.$counter.removeClass("warning")):a<=this.charLimit-130?(this.$counter.removeClass("error"),this.$counter.addClass("warning")):(this.$counter.removeClass("error"),this.$counter.removeClass("warning"));this.$counter.text(a);this.charCount=b||this.$input.val().length},preventNewline:function(a){if(a.which==13)return a.preventDefault(),c(this.$input.get(0).form).submit(),!1},saveStatus:function(a){this.$input.val("");this.update(a);a.ajaxData&&a.ajaxData.status!==
void 0&&c(".CurrentStatus").text(a.ajaxData.status)}};c.tools.tooltip.addEffect("PreviewTooltip",function(){var a=this.getTrigger().offset(),b=this.getConf(),e={top:"auto",bottom:c(g).height()-a.top+b.offset[0]};XenForo.isRTL()?(e.right=c("html").width()-this.getTrigger().outerWidth()-a.left-b.offset[1],e.left="auto"):e.left=a.left+b.offset[1];this.getTip().css(e).xfFadeIn(XenForo.speed.normal)},function(){this.getTip().xfFadeOut(XenForo.speed.fast)});XenForo._PreviewTooltipCache={};XenForo.PreviewTooltip=
function(a){var b,e,d;parseInt(XenForo._enableOverlays)&&((e=a.data("previewUrl"))?(a.find("[title]").andSelf().attr("title",""),a.bind({mouseenter:function(){b||(d=setTimeout(function(){if(!b){b=!0;var d=c("#PreviewTooltip"),g;d.length?(console.log("Setup preview tooltip for %s",e),g=d.clone().removeAttr("id").addClass("xenPreviewTooltip").appendTo(h.body),XenForo._PreviewTooltipCache[e]||XenForo.ajax(e,{},function(a){XenForo.hasTemplateHtml(a)?(XenForo._PreviewTooltipCache[e]=a.templateHtml,c(a.templateHtml).xfInsert("replaceAll",
g.find(".PreviewContents"))):g.remove()},{type:"GET",error:!1,global:!1}),a.tooltip(XenForo.configureTooltipRtl({predelay:500,delay:0,effect:"PreviewTooltip",fadeInSpeed:"normal",fadeOutSpeed:"fast",tip:g,position:"bottom left",offset:[10,-15]})),a.data("tooltip").show(0),XenForo._PreviewTooltipCache[e]&&c(XenForo._PreviewTooltipCache[e]).xfInsert("replaceAll",g.find(".PreviewContents"),"show",0)):console.error("Unable to find #PreviewTooltip")}},800))},mouseleave:function(){b?a.data("tooltip")&&
a.data("tooltip").hide():d&&clearTimeout(d)},mousedown:function(){d&&clearTimeout(d);a.data("tooltip")&&a.data("tooltip").hide()}})):console.warn("Preview tooltip has no preview: %o",a))};XenForo.PopupItemLink=function(a){var b=a.find(".PopupItemLink").first().attr("href");b&&a.addClass("PopupItemLinkActive").click(function(a){if(!c(a.target).is("a"))g.location=XenForo.canonicalizeUrl(b)})};XenForo.Loader=function(a){var b=function(e){var d=a.attr("href")||a.data("href"),f=a.data("target");d&&c(f).length&&
(e.preventDefault(),XenForo.ajax(d,{},function(d,e){if(XenForo.hasResponseError(d))return!1;var g=new c.Event("ContentLoaded");g.ajaxData=d;g.textStatus=e;a.trigger(g);g.isDefaultPrevented()||d.templateHtml&&new XenForo.ExtLoader(d,function(){var e=a.data("method");typeof c.fn[e]!="function"&&(e="appendTo");e=="replaceAll"?c(d.templateHtml).xfInsert(e,f,"show",0):c(d.templateHtml).xfInsert(e,f);a.data("unlink")!==!1&&a.removeAttr("href").removeData("href").unbind("click",b)})}))};a.bind("click",b)};
XenForo.FieldAdder=function(a){c(a.data("source")).filter(".PollNonJsInput").remove();a.click(function(){var b=c(a.data("source")),e=a.data("maxFields"),d=null;console.log("source.length %s, maxfields %s",b.length,e);if(b.length&&(!e||b.length<e))d=b.last().clone(),d.find("input").val("").attr("disabled",!0),d.xfInsert("insertAfter",b.last(),!1,!1,function(){var b=d.find("input");b.attr("disabled",!1);b.first().focus().select();e&&c(a.data("source")).length>=e&&a.xfRemove()})})};XenForo.ReadToggle=
function(a){a.click(function(b){b.preventDefault();var e=null,d=null,f=a.data("counter");e==null&&(d=a.closest(".discussionListItem").andSelf().toggleClass("unread"),e=XenForo.ajax(a.attr("href"),{_xfConfirm:1},function(b){e=null;if(XenForo.hasResponseError(b))return!1;d[b.unread?"addClass":"removeClass"]("unread");f&&typeof b.counterFormatted!="undefined"&&c(f).text(b.counterFormatted);typeof b.actionPhrase!="undefined"&&(a.text()!=""&&a.html(b.actionPhrase),a.attr("title")&&a.attr("title",b.actionPhrase));
XenForo.alert(b._redirectMessage,"",1E3)}))})};XenForo.Notices=function(a){a.show();var b;a.hasClass("PanelScroller")&&(b=XenForo.PanelScroller(a.find(".PanelContainer"),{scrollable:{speed:a.dataOrDefault("speed",400)*XenForo._animationSpeedMultiplier,vertical:XenForo.isPositive(a.data("vertical")),keyboard:!1,prev:".NoticePrev",next:".NoticeNext"},autoscroll:{interval:a.dataOrDefault("interval",2E3)}}))&&b.getItems().length>1&&c(h).bind({XenForoWindowBlur:function(){b.stop()},XenForoWindowFocus:function(){b.play()}});
a.delegate("a.DismissCtrl","click",function(e){e.preventDefault();var d=c(this),f=d.closest(".Notice"),g=f.parent();d.data("tooltip")&&d.data("tooltip").hide();b?(b.removeItem(f),b.getItems().length||a.xfFadeUp()):f.xfFadeUp(function(){f.remove();g.find(".Notice").length||a.xfFadeUp()});d.data("xhr")||d.data("xhr",XenForo.ajax(d.attr("href"),{_xfConfirm:1},function(a){d.removeData("xhr");if(XenForo.hasResponseError(a))return!1}))})};XenForo.PanelScroller=function(a,b){function e(){var b=0;a.find(".Panels > *").css({width:a.innerWidth(),
height:"auto"}).each(function(){b=Math.max(c(this).outerHeight(),b)}).andSelf().css("height",b);var d=a.data("scrollable");d&&d.seekTo(d.getIndex(),0)}var d=a.find(".Panels > *");if(d.length<2)return a.find(".Panels").css("position","static"),!1;d.find("script").remove();b=c.extend(!0,{scrollable:{circular:!0,items:".Panels"},navigator:{navi:".Nav",naviItem:"a",activeClass:"current"},autoscroll:{interval:3E3}},b);a.css("overflow","hidden");b.scrollable.vertical||a.css("height","auto").find(".Panels").css("width",
"20000em").find(".panel").css("float",XenForo.isRTL()?"right":"left");c(g).bind("load resize",e);c(".mainContent").bind("XenForoResize",e);e();a.scrollable(b.scrollable).navigator(b.navigator);d.length>1&&a.autoscroll(b.autoscroll);return a.data("scrollable")};XenForo.DisplayIgnoredContent=function(a){var b,e,d,f;a.preventDefault();c("a.DisplayIgnoredContent").hide();c("#ignoredUserCss").empty().remove();if(h.styleSheets)for(a=0;a<h.styleSheets.length;a++){e=h.styleSheets[a];d=e.cssRules?e.cssRules:
e.rules;for(b=0;b<d.length;b++)f=d[b],f.selectorText&&f.selectorText.toLowerCase()==".ignored"&&(e.deleteRule?e.deleteRule(b):e.removeRule(b))}c(".ignored").removeClass("ignored")};c("html").hasClass("Public")&&c(function(){c("body").delegate("a.DisplayIgnoredContent","click",XenForo.DisplayIgnoredContent);if(g.location.hash){var a=c(g.location.hash.replace(/[^\w_#-]/g,""));a.hasClass("ignored")&&(a.removeClass("ignored"),a.get(0).scrollIntoView(!0))}});XenForo.SquareThumbs=function(a){var b=a.data("thumb-height")||
44,e=a.data("thumb-selector")||"a.SquareThumb";console.info("XenForo.SquareThumbs: %o",a);a.find(e).addClass("SquareThumb").children("img").load(function(){var a=c(this),e=a.width();a.height()>e?(a.css("width",b),a.css("top",(a.height()-b)/2*-1)):(a.css("height",b),a.css("left",(a.width()-b)/2*-1))})};XenForo.register("a.OverlayTrigger, input.OverlayTrigger, button.OverlayTrigger, label.OverlayTrigger, a.username, a.avatar","XenForo.OverlayTrigger");XenForo.isTouchBrowser()||(XenForo.register(".Tooltip",
"XenForo.Tooltip"),XenForo.register("a.StatusTooltip","XenForo.StatusTooltip"),XenForo.register(".PreviewTooltip","XenForo.PreviewTooltip"));XenForo.register("a.LbTrigger","XenForo.LightBoxTrigger");XenForo.register(".ClickProxy","XenForo.ClickProxy");XenForo.register(".Popup","XenForo.PopupMenu","XenForoActivatePopups");XenForo.register(".PageNav","XenForo.PageNav");XenForo.register(".Tabs","XenForo.Tabs");XenForo.register(".SquareThumbs","XenForo.SquareThumbs");XenForo.register("form.xenForm","XenForo.MultiSubmitFix");
XenForo.register("input.CheckAll, a.CheckAll, label.CheckAll","XenForo.CheckAll");XenForo.register("input.AutoChecker","XenForo.AutoChecker");XenForo.register("label.ToggleButton","XenForo.ToggleButton");XenForo.register("form.AutoInlineUploader","XenForo.AutoInlineUploader");XenForo.register("form.AutoValidator","XenForo.AutoValidator");XenForo.register("select.AutoTimeZone","XenForo.AutoTimeZone");XenForo.register("a.Loader, input.Loader","XenForo.Loader");XenForo.register("input, textarea",function(){var a=
c(this);switch(a.attr("type")){case "hidden":case "submit":return;case "checkbox":case "radio":a.hasClass("SubmitOnChange")&&XenForo.create("XenForo.SubmitOnChange",this);return}if(a.attr("type")=="number"&&"step"in h.createElement("input"))this.type="text",a.addClass("SpinBox number");a.hasClass("SpinBox")&&XenForo.create("XenForo.SpinBox",this);a.hasClass("Prompt")&&(console.error("input.Prompt[title] is now deprecated. Please replace any instances with input[placeholder] and remove the Prompt class."),
a.attr({placeholder:a.attr("title"),title:""}));a.attr("placeholder")&&XenForo.create("XenForo.Prompt",this);a.data("liveTitleTemplate")&&XenForo.create("XenForo.LiveTitle",this);a.is(":date")&&XenForo.create("XenForo.DatePicker",this);a.hasClass("AutoComplete")&&XenForo.create("XenForo.AutoComplete",this);a.hasClass("AutoSelect")&&XenForo.create("XenForo.AutoSelect",this);XenForo.isAutoValidatorField(this)&&XenForo.create("XenForo.AutoValidatorControl",this);a.is("textarea.StatusEditor")&&XenForo.create("XenForo.StatusEditor",
this);!XenForo.isTouchBrowser()&&a.is("textarea.Elastic:not(.code)")&&XenForo.create("XenForo.TextareaElastic",this)});XenForo.register("form.Preview","XenForo.PreviewForm");XenForo.register("a.FieldAdder, input.FieldAdder","XenForo.FieldAdder");XenForo.register("a.ReadToggle","XenForo.ReadToggle");c("html").hasClass("Public")&&(XenForo.register("#loginBar","XenForo.LoginBar"),XenForo.register("#QuickSearch","XenForo.QuickSearch"),XenForo.register("a.AttributionLink","XenForo.AttributionLink"),XenForo.register("#ReCaptcha",
"XenForo.ReCaptcha"),XenForo.register("#Captcha","XenForo.Captcha"),XenForo.register("img.bbCodeImage","XenForo.BbCodeImage"),XenForo.register("a.LikeLink","XenForo.LikeLink"),XenForo.isTouchBrowser()||XenForo.register("h4.forumlink a","XenForo.NodeDescriptionTooltip"),XenForo.register("#AccountMenu","XenForo.AccountMenu"),XenForo.register("a.FollowLink","XenForo.FollowLink"),XenForo.register("li.PopupItemLink","XenForo.PopupItemLink"),XenForo.register("#Notices","XenForo.Notices"));XenForo.register("input:checkbox.Disabler, input:radio.Disabler",
"XenForo.Disabler");c(function(){XenForo.Facebook.start();XenForo.init()})})(jQuery,this,document);
 
Сверху