diff --git a/bin/.hook_template b/bin/.hook_template
index a107adb..2a35555 100644
--- a/bin/.hook_template
+++ b/bin/.hook_template
@@ -1,5 +1,5 @@
//This file is generated by bin/hook.js
-var template = require('template');
+var template = require('lodash.template');
module.exports = {
<% templates.forEach(function(template) { %>
'<%= template.name %>': template('<%= template.content %>'),
diff --git a/dist/comments.js b/dist/comments.js
index 7c923bf..320a372 100644
--- a/dist/comments.js
+++ b/dist/comments.js
@@ -1764,13 +1764,13 @@ module.exports = {
add: template(""),
- form: template("
"),
+ form: template(""),
CSS: {
add: ".comments-controls[data-comments-controls]{display:inline-block;float:left;color:#fff;line-height:32px;font-size:10px;font-weight:700;margin-right:3px}.comments-controls[data-comments-controls] .add-comment{cursor:pointer;opacity:.8;font-weight:lighter}.comments-controls[data-comments-controls] .add-comment:before{font-size:16px}.comments-controls[data-comments-controls] .add-comment:hover{text-shadow:rgba(255,255,255,.8) 0 0 5px;opacity:1}.comments-bar{display:inline-block;float:left;line-height:32px;font-size:10px;font-weight:700;margin-left:6px}.comment-pointer{position:absolute;left:20px;top:8px;width:2px;height:8px;background:#90ee90;color:#90ee90;transition:background .2s linear}.comment-pointer:hover{background:red}.video-comment{color:#fff;text-align:left;font-size:12px!important}.comment-actif{padding:5px!important}.img-comment{min-width:100px;min-height:50px}.img-comment img{max-width:200px;max-height:200px}.img-comment .spinner-three-bounce{top:25%}.img-comment .spinner-three-bounce>div{width:10px;height:10px}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar]{z-index:99}.seek-time[data-seek-time]{height:initial!important}",
- form: ".form-comment{position:absolute;width:50%;margin-left:auto;margin-right:auto;text-align:left;background:#fff;right:5px;bottom:100px;z-index:999999;padding:5px!important;visibility:hidden;opacity:0;transition:hidden 0s .2s,opacity .2s linear;border-radius:5px;cursor:default}.form-comment button,.form-comment input,.form-comment textarea{font:initial;font-size:initial;line-height:initial;color:initial}.form-comment p{color:initial;font-size:initial!important}.form-comment input[type=file]{display:none}.form-comment textarea{width:100%}.form-comment .submit-comment{text-align:center}.show-form{visibility:visible;opacity:.9}" }
+ form: ".form-comment{position:absolute;width:50%;margin-left:auto;margin-right:auto;text-align:left;background:#fff;right:5px;bottom:100px;z-index:999999;visibility:hidden;opacity:0;transition:hidden 0s .2s,opacity .2s linear;border-radius:5px;cursor:default}.form-comment .form-comment-header{padding:2px 5px;background:#888;border-top-left-radius:5px;border-top-right-radius:5px}.form-comment form{padding:5px!important}.form-comment img{max-height:50px;max-width:100px}.form-comment button,.form-comment input,.form-comment textarea{font-family:\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-size:initial;line-height:initial;color:initial}.form-comment p{color:initial;font-size:initial!important}.form-comment input[type=file]{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}.form-comment button[type=button],.form-comment input[type=file]+label{display:inline-block;padding:2px 5px;font-size:1.25em;font-weight:700}.form-comment input[type=file]+label{color:#fff;background-color:#000;cursor:pointer}.form-comment button[type=button]{color:#fff;background-color:green;cursor:pointer;border:0;line-height:1.4}.form-comment button[type=button]:focus,.form-comment button[type=button]:hover,.form-comment input[type=file]+label:hover,.form-comment input[type=file]:focus+label{background-color:red}.form-comment .text-center{text-align:center}.form-comment textarea{width:100%}.form-comment .submit-comment{display:inline-block}.show-form{visibility:visible;opacity:.9}" }
};
},{"lodash.template":3}],19:[function(require,module,exports){
@@ -1949,6 +1949,16 @@ var Comments = (function (_UICorePlugin) {
this.core.mediaControl.$seekBarContainer.append(this.commentPointer);
this.core.mediaControl.seekTime.$el.prepend("");
+
+ $(".form-comment input[type=\"file\"]").change(function () {
+ if (this.files && this.files[0]) {
+ var reader = new FileReader();
+ reader.onload = function (e) {
+ $(".form-comment img").attr("src", e.target.result);
+ };
+ reader.readAsDataURL(this.files[0]);
+ }
+ });
}
},
getComments: {
diff --git a/dist/comments.min.js b/dist/comments.min.js
index 0fbb11d..79d635c 100644
--- a/dist/comments.min.js
+++ b/dist/comments.min.js
@@ -1,2 +1,2 @@
-!function t(e,n,r){function o(a,s){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a0?$.fn.concat.apply([],t):t}function u(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(t){return t in F?F[t]:F[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function f(t,e){return"number"!=typeof e||M[u(t)]?e:e+"px"}function p(t){var e,n;return N[t]||(e=A.createElement(t),A.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),N[t]=n),N[t]}function h(t){return"children"in t?k.call(t.children):$.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function m(t,e){var n,r=t?t.length:0;for(n=0;r>n;n++)this[n]=t[n];this.length=r,this.selector=e||""}function d(t,e,n){for(j in e)n&&(i(e[j])||Q(e[j]))?(i(e[j])&&!i(t[j])&&(t[j]={}),Q(e[j])&&!Q(t[j])&&(t[j]=[]),d(t[j],e[j],n)):e[j]!==C&&(t[j]=e[j])}function g(t,e){return null==e?$(t):$(t).filter(e)}function v(t,n,r,o){return e(n)?n.call(t,r,o):n}function y(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function b(t,e){var n=t.className||"",r=n&&n.baseVal!==C;return e===C?r?n.baseVal:n:void(r?n.baseVal=e:t.className=e)}function x(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?$.parseJSON(t):t):t}catch(e){return t}}function w(t,e){e(t);for(var n=0,r=t.childNodes.length;r>n;n++)w(t.childNodes[n],e)}var C,j,$,E,T,S,O=[],P=O.concat,_=O.filter,k=O.slice,A=window.document,N={},F={},M={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},D=/^\s*<(\w+|!)[^>]*>/,R=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,L=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,U=/^(?:body|html)$/i,q=/([A-Z])/g,z=["val","css","html","text","data","width","height","offset"],I=["after","prepend","before","append"],B=A.createElement("table"),W=A.createElement("tr"),Z={tr:A.createElement("tbody"),tbody:B,thead:B,tfoot:B,td:W,th:W,"*":A.createElement("div")},H=/complete|loaded|interactive/,X=/^[\w-]*$/,V={},G=V.toString,Y={},J=A.createElement("div"),K={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},Q=Array.isArray||function(t){return t instanceof Array};return Y.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,o=t.parentNode,i=!o;return i&&(o=J).appendChild(t),r=~Y.qsa(o,e).indexOf(t),i&&J.removeChild(t),r},T=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},S=function(t){return _.call(t,function(e,n){return t.indexOf(e)==n})},Y.fragment=function(t,e,n){var r,o,a;return R.test(t)&&(r=$(A.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace(L,"<$1>$2>")),e===C&&(e=D.test(t)&&RegExp.$1),e in Z||(e="*"),a=Z[e],a.innerHTML=""+t,r=$.each(k.call(a.childNodes),function(){a.removeChild(this)})),i(n)&&(o=$(r),$.each(n,function(t,e){z.indexOf(t)>-1?o[t](e):o.attr(t,e)})),r},Y.Z=function(t,e){return new m(t,e)},Y.isZ=function(t){return t instanceof Y.Z},Y.init=function(t,n){var r;if(!t)return Y.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&D.test(t))r=Y.fragment(t,RegExp.$1,n),t=null;else{if(n!==C)return $(n).find(t);r=Y.qsa(A,t)}else{if(e(t))return $(A).ready(t);if(Y.isZ(t))return t;if(Q(t))r=s(t);else if(o(t))r=[t],t=null;else if(D.test(t))r=Y.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==C)return $(n).find(t);r=Y.qsa(A,t)}}return Y.Z(r,t)},$=function(t,e){return Y.init(t,e)},$.extend=function(t){var e,n=k.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){d(t,n,e)}),t},Y.qsa=function(t,e){var n,r="#"==e[0],o=!r&&"."==e[0],i=r||o?e.slice(1):e,a=X.test(i);return t.getElementById&&a&&r?(n=t.getElementById(i))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:k.call(a&&!r&&t.getElementsByClassName?o?t.getElementsByClassName(i):t.getElementsByTagName(e):t.querySelectorAll(e))},$.contains=A.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},$.type=t,$.isFunction=e,$.isWindow=n,$.isArray=Q,$.isPlainObject=i,$.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},$.inArray=function(t,e,n){return O.indexOf.call(e,t,n)},$.camelCase=T,$.trim=function(t){return null==t?"":String.prototype.trim.call(t)},$.uuid=0,$.support={},$.expr={},$.noop=function(){},$.map=function(t,e){var n,r,o,i=[];if(a(t))for(r=0;r=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return O.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):$(_.call(this,function(e){return Y.matches(e,t)}))},add:function(t,e){return $(S(this.concat($(t,e))))},is:function(t){return this.length>0&&Y.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==C)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):a(t)&&e(t.item)?k.call(t):$(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return $(n)},has:function(t){return this.filter(function(){return o(t)?$.contains(this,t):$(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!o(t)?t:$(t)},last:function(){var t=this[this.length-1];return t&&!o(t)?t:$(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?$(t).filter(function(){var t=this;return O.some.call(n,function(e){return $.contains(e,t)})}):1==this.length?$(Y.qsa(this[0],t)):this.map(function(){return Y.qsa(this,t)}):$()},closest:function(t,e){var n=this[0],o=!1;for("object"==typeof t&&(o=$(t));n&&!(o?o.indexOf(n)>=0:Y.matches(n,t));)n=n!==e&&!r(n)&&n.parentNode;return $(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=$.map(n,function(t){return(t=t.parentNode)&&!r(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return g(e,t)},parent:function(t){return g(S(this.pluck("parentNode")),t)},children:function(t){return g(this.map(function(){return h(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||k.call(this.childNodes)})},siblings:function(t){return g(this.map(function(t,e){return _.call(h(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return $.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=p(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var r=$(t).get(0),o=r.parentNode||this.length>1;return this.each(function(e){$(this).wrapAll(n?t.call(this,e):o?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){$(this[0]).before(t=$(t));for(var e;(e=t.children()).length;)t=e.first();$(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var r=$(this),o=r.contents(),i=n?t.call(this,e):t;o.length?o.wrapAll(i):r.append(i)})},unwrap:function(){return this.parent().each(function(){$(this).replaceWith($(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=$(this);(t===C?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return $(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return $(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;$(this).empty().append(v(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=v(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this[0].textContent:null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(o(t))for(j in t)y(this,j,t[j]);else y(this,t,v(this,e,n,this.getAttribute(t)))}):this.length&&1===this[0].nodeType?!(n=this[0].getAttribute(t))&&t in this[0]?this[0][t]:n:C},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){y(this,t)},this)})},prop:function(t,e){return t=K[t]||t,1 in arguments?this.each(function(n){this[t]=v(this,e,n,this[t])}):this[0]&&this[0][t]},data:function(t,e){var n="data-"+t.replace(q,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?x(r):C},val:function(t){return 0 in arguments?this.each(function(e){this.value=v(this,t,e,this.value)}):this[0]&&(this[0].multiple?$(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=$(this),r=v(this,t,e,n.offset()),o=n.offsetParent().offset(),i={top:r.top-o.top,left:r.left-o.left};"static"==n.css("position")&&(i.position="relative"),n.css(i)});if(!this.length)return null;if(!$.contains(A.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(arguments.length<2){var r,o=this[0];if(!o)return;if(r=getComputedStyle(o,""),"string"==typeof e)return o.style[T(e)]||r.getPropertyValue(e);if(Q(e)){var i={};return $.each(e,function(t,e){i[e]=o.style[T(e)]||r.getPropertyValue(e)}),i}}var a="";if("string"==t(e))n||0===n?a=u(e)+":"+f(e,n):this.each(function(){this.style.removeProperty(u(e))});else for(j in e)e[j]||0===e[j]?a+=u(j)+":"+f(j,e[j])+";":this.each(function(){this.style.removeProperty(u(j))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf($(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?O.some.call(this,function(t){return this.test(b(t))},l(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){E=[];var n=b(this),r=v(this,t,e,n);r.split(/\s+/g).forEach(function(t){$(this).hasClass(t)||E.push(t)},this),E.length&&b(this,n+(n?" ":"")+E.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===C)return b(this,"");E=b(this),v(this,t,e,E).split(/\s+/g).forEach(function(t){E=E.replace(l(t)," ")}),b(this,E.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=$(this),o=v(this,t,n,b(this));o.split(/\s+/g).forEach(function(t){(e===C?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===C?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===C?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=U.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat($(t).css("margin-top"))||0,n.left-=parseFloat($(t).css("margin-left"))||0,r.top+=parseFloat($(e[0]).css("border-top-width"))||0,r.left+=parseFloat($(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||A.body;t&&!U.test(t.nodeName)&&"static"==$(t).css("position");)t=t.offsetParent;return t})}},$.fn.detach=$.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});$.fn[t]=function(o){var i,a=this[0];return o===C?n(a)?a["inner"+e]:r(a)?a.documentElement["scroll"+e]:(i=this.offset())&&i[t]:this.each(function(e){a=$(this),a.css(t,v(this,o,e,a[t]()))})}}),I.forEach(function(e,n){var r=n%2;$.fn[e]=function(){var e,o,i=$.map(arguments,function(n){return e=t(n),"object"==e||"array"==e||null==n?n:Y.fragment(n)}),a=this.length>1;return i.length<1?this:this.each(function(t,e){o=r?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var s=$.contains(A.documentElement,o);i.forEach(function(t){if(a)t=t.cloneNode(!0);else if(!o)return $(t).remove();o.insertBefore(t,e),s&&w(t,function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},$.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(t){return $(t)[e](this),this}}),Y.Z.prototype=m.prototype=$.fn,Y.uniq=S,Y.deserializeValue=x,$.zepto=Y,$}();window.Zepto=r,void 0===window.$&&(window.$=r),function(t){function e(t){return t._zid||(t._zid=p++)}function n(t,n,i,a){if(n=r(n),n.ns)var s=o(n.ns);return(g[e(t)]||[]).filter(function(t){return!(!t||n.e&&t.e!=n.e||n.ns&&!s.test(t.ns)||i&&e(t.fn)!==e(i)||a&&t.sel!=a)})}function r(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function o(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function i(t,e){return t.del&&!y&&t.e in b||!!e}function a(t){return x[t]||y&&b[t]||t}function s(n,o,s,c,l,p,h){var m=e(n),d=g[m]||(g[m]=[]);o.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(s);var o=r(e);o.fn=s,o.sel=l,o.e in x&&(s=function(e){var n=e.relatedTarget;return!n||n!==this&&!t.contains(this,n)?o.fn.apply(this,arguments):void 0}),o.del=p;var m=p||s;o.proxy=function(t){if(t=u(t),!t.isImmediatePropagationStopped()){t.data=c;var e=m.apply(n,t._args==f?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},o.i=d.length,d.push(o),"addEventListener"in n&&n.addEventListener(a(o.e),o.proxy,i(o,h))})}function c(t,r,o,s,c){var u=e(t);(r||"").split(/\s/).forEach(function(e){n(t,e,o,s).forEach(function(e){delete g[u][e.i],"removeEventListener"in t&&t.removeEventListener(a(e.e),e.proxy,i(e,c))})})}function u(e,n){return(n||!e.isDefaultPrevented)&&(n||(n=e),t.each($,function(t,r){var o=n[t];e[t]=function(){return this[r]=w,o&&o.apply(n,arguments)},e[r]=C}),(n.defaultPrevented!==f?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function l(t){var e,n={originalEvent:t};for(e in t)j.test(e)||t[e]===f||(n[e]=t[e]);return u(n,t)}var f,p=1,h=Array.prototype.slice,m=t.isFunction,d=function(t){return"string"==typeof t},g={},v={},y="onfocusin"in window,b={focus:"focusin",blur:"focusout"},x={mouseenter:"mouseover",mouseleave:"mouseout"};v.click=v.mousedown=v.mouseup=v.mousemove="MouseEvents",t.event={add:s,remove:c},t.proxy=function(n,r){var o=2 in arguments&&h.call(arguments,2);if(m(n)){var i=function(){return n.apply(r,o?o.concat(h.call(arguments)):arguments)};return i._zid=e(n),i}if(d(r))return o?(o.unshift(n[r],n),t.proxy.apply(null,o)):t.proxy(n[r],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var w=function(){return!0},C=function(){return!1},j=/^([A-Z]|returnValue$|layer[XY]$)/,$={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,r,o,i){var a,u,p=this;return e&&!d(e)?(t.each(e,function(t,e){p.on(t,n,r,e,i)}),p):(d(n)||m(o)||o===!1||(o=r,r=n,n=f),(o===f||r===!1)&&(o=r,r=f),o===!1&&(o=C),p.each(function(f,p){i&&(a=function(t){return c(p,t.type,o),o.apply(this,arguments)}),n&&(u=function(e){var r,i=t(e.target).closest(n,p).get(0);return i&&i!==p?(r=t.extend(l(e),{currentTarget:i,liveFired:p}),(a||o).apply(i,[r].concat(h.call(arguments,1)))):void 0}),s(p,e,o,r,n,u||a)}))},t.fn.off=function(e,n,r){var o=this;return e&&!d(e)?(t.each(e,function(t,e){o.off(t,n,e)}),o):(d(n)||m(r)||r===!1||(r=n,n=f),r===!1&&(r=C),o.each(function(){c(this,e,r,n)}))},t.fn.trigger=function(e,n){return e=d(e)||t.isPlainObject(e)?t.Event(e):u(e),e._args=n,this.each(function(){e.type in b&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,r){var o,i;return this.each(function(a,s){o=l(d(e)?t.Event(e):e),o._args=r,o.target=s,t.each(n(s,e.type||e),function(t,e){return i=e.proxy(o),o.isImmediatePropagationStopped()?!1:void 0})}),i},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){d(t)||(e=t,t=e.type);var n=document.createEvent(v[t]||"Events"),r=!0;if(e)for(var o in e)"bubbles"==o?r=!!e[o]:n[o]=e[o];return n.initEvent(t,r,!0),u(n)}}(r),function(t){function e(e,n,r){var o=t.Event(n);return t(e).trigger(o,r),!o.isDefaultPrevented()}function n(t,n,r,o){return t.global?e(n||y,r,o):void 0}function r(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function o(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function i(t,e){var r=e.context;return e.beforeSend.call(r,t,e)===!1||n(e,r,"ajaxBeforeSend",[t,e])===!1?!1:void n(e,r,"ajaxSend",[t,e])}function a(t,e,r,o){var i=r.context,a="success";r.success.call(i,t,a,e),o&&o.resolveWith(i,[t,a,e]),n(r,i,"ajaxSuccess",[e,r,t]),c(a,e,r)}function s(t,e,r,o,i){var a=o.context;o.error.call(a,r,e,t),i&&i.rejectWith(a,[r,e,t]),n(o,a,"ajaxError",[r,o,t||e]),c(e,r,o)}function c(t,e,r){var i=r.context;r.complete.call(i,e,t),n(r,i,"ajaxComplete",[e,r]),o(r)}function u(){}function l(t){return t&&(t=t.split(";",2)[0]),t&&(t==j?"html":t==C?"json":x.test(t)?"script":w.test(t)&&"xml")||"text"}function f(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function p(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=f(e.url,e.data),e.data=void 0)}function h(e,n,r,o){return t.isFunction(n)&&(o=r,r=n,n=void 0),t.isFunction(r)||(o=r,r=void 0),{url:e,data:n,success:r,dataType:o}}function m(e,n,r,o){var i,a=t.isArray(n),s=t.isPlainObject(n);t.each(n,function(n,c){i=t.type(c),o&&(n=r?o:o+"["+(s||"object"==i||"array"==i?n:"")+"]"),!o&&a?e.add(c.name,c.value):"array"==i||!r&&"object"==i?m(e,c,r,n):e.add(n,c)})}var d,g,v=0,y=window.document,b=/