Skip to content
Browse files

fireEvent throws

  • Loading branch information...
1 parent 05349fa commit ce3541be03a4032f5d13764d327664877b8376b3 @mythz committed Nov 27, 2011
Showing with 8 additions and 4 deletions.
  1. +3 −1 dist/jquip.all.js
  2. +1 −1 dist/jquip.all.min.js
  3. +1 −1 dist/jquip.events.min.js
  4. +3 −1 src/jquip.events.js
View
4 dist/jquip.all.js
@@ -1448,7 +1448,9 @@ $['plug']("events", function($){
var e = doc.createEvent('Events');
this.dispatchEvent(e, e.initEvent(evt, true, true));
} else if (this.fireEvent)
- this.fireEvent("on" + evt);
+ try {
+ this.fireEvent("on" + evt);
+ } catch(e){}
});
};
if (!$['init']) $(window)['bind']("load",$['onload']);
View
2 dist/jquip.all.min.js
@@ -1 +1 @@
-window.$=window.jquip=function(){function R(a,b){var c;for(var e=0,f=S.length;e<f;e++)if(S[e].apply(this,arguments))return this;return a?typeof a=="function"?(bc("require docready"),this):bs(a)?this.make(a):a.nodeType||bu(a)?this.make([a]):a=="body"&&!b&&d.body?(this.context=a.context,this[0]=d.body,this.length=1,this.selector=a,this):a.selector!==undefined?(this.context=a.context,this.selector=a.selector,this.make(a)):(a=bp(a)&&a.charAt(0)==="<"?(c=p.exec(a))?(a=[d.createElement(c[1])])&&bw(b)?V.fn.attr.call(a,b)&&a:a:bA(a).childNodes:_(a,b),this.make(a)):this}function V(a,b){return new R(a,b)}function X(a,b,c){return b=b||0,br(b)?bj(a,function(a,d){return!!b.call(a,d,a)===c}):b.nodeType?bj(a,function(a){return a===b===c}):bp(b)?bj(a,function(a){return a.parentNode&&be(_(b,a.parentNode),a)>=0}):bj(a,function(a){return be(b,a)>=0===c})}function Y(a,b){a.length=b&&b.length||0;if(a.length==0)return a;for(var c=0,d=b.length;c<d;c++)a[c]=b[c];return a}function Z(a,b){var b=" "+b+" ";for(var c=0,d=a.length;c<d;c++)if(a[c].nodeType===1&&(" "+a[c].className+" ").replace(j," ").indexOf(b)>-1)return!0;return!1}function $(a,b,c){b=b||d,c=c||[],b.nodeType==1&&a(b)&&c.push(b);var e=b.childNodes;for(var f=0,g=e.length;f<g;f++){var h=e[f];h.nodeType==1&&$(a,h,c)}return c}function _(a,b,c){if(a&&bp(a)){b instanceof V&&(b=b[0]),b=b||d,c=c||V.query;var e=a.charAt(0),f=a.substring(1),g=F.test(f),h;try{return g?L.call(c(a,b)):g?L.call(c(a,b)):e=="#"?(h=d.getElementById(f))?[h]:G:L.call(e=="."?b.getElementsByClassName(f):b.getElementsByTagName(a))}catch(i){bc(i)}}return a.nodeType==1||a.nodeType==9?[a]:G}function bb(a,b,c){var f=d.head||d.getElementsByTagName("head")[0]||e,g=d.createElement("script"),h;c&&(g.async="async"),g.onreadystatechange=function(){if(!(h=g.readyState)||h=="loaded"||h=="complete")g.onload=g.onreadystatechange=null,f&&g.parentNode&&f.removeChild(g),g=undefined,b&&b()},g.onload=b,g.src=a,f.insertBefore(g,f.firstChild)}function bc(b){typeof a.console!="undefined"&&a.console.warn(arguments)}function bd(a,b,c){if(a==null)return;if(O&&a.forEach===O)a.forEach(b,c);else if(a.length===+a.length){for(var d=0,e=a.length;d<e;d++)if(d in a&&b.call(c,a[d],d,a)===H)return}else for(var f in a)if(K.call(a,f)&&b.call(c,a[f],f,a)===H)return}function be(a,b){if(a==null)return-1;var c,d;if(Q&&a.indexOf===Q)return a.indexOf(b);for(c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function bf(a,b,c){var d=[];return a==null?d:P&&a.filter===P?a.filter(b,c):(bd(a,function(a,e,f){b.call(c,a,e,f)&&(d[d.length]=a)}),d)}function bg(a,b,c){var d=[],e=a[b];while(e&&e.nodeType!==9&&(c===undefined||e.nodeType!==1||!V(e).is(c)))e.nodeType===1&&d.push(e),e=e[b];return d}function bh(a,b,c){b=b||1;var d=0;for(;a;a=a[c])if(a.nodeType===1&&++d===b)break;return a}function bi(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}function bj(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d}function bk(a,b,c){var d,e,f=[],g=0,h=a.length,i=a instanceof V||typeof h=="number"&&(h>0&&a[0]&&a[h-1]||h===0||bs(a));if(i)for(;g<h;g++)d=b(a[g],g,c),d!=null&&(f[f.length]=d);else for(e in a)d=b(a[e],e,c),d!=null&&(f[f.length]=d);return f.concat.apply([],f)}function bl(a,b,c){if(!a)return{};if(b&&c)return a.setAttribute(b,c),null;var d={};return bd(bm(a),function(a,b){if(b.indexOf("data-")!==0||!a)return;d[b.substr("data-".length)]=a}),bp(b)?d[b]:d}function bm(a){var b={};for(var c=0,d=a.attributes,e=d.length;c<e;c++)b[d.item(c).nodeName]=d.item(c).nodeValue;return b}function bn(a,b){return!a||!b?a==b:a.toLowerCase()===b.toLowerCase()}function bo(a){return a==null?String(a):B[A.call(a)]||"object"}function bp(a){return typeof a=="string"}function bq(a){return typeof a=="object"}function br(a){return typeof a=="function"||bo(a)==="function"}function bs(a){return bo(a)==="array"}function bt(a){return!bp(a)&&typeof a.length=="number"}function bu(a){return a&&typeof a=="object"&&"setInterval"in a}function bv(a){return a==null||!m.test(a)||isNaN(a)}function bw(a){if(!a||bo(a)!=="object"||a.nodeType||bu(a))return!1;try{if(a.constructor&&!K.call(a,"constructor")&&!K.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}var c;for(c in a);return c===undefined||K.call(a,c)}function bx(a,b){var c=a.length,d=0;if(typeof b.length=="number")for(var e=b.length;d<e;d++)a[c++]=b[d];else while(b[d]!==undefined)a[c++]=b[d++];return a.length=c,a}function by(){var a,b,c,d,e,f,g=arguments,h=g[0]||{},i=1,j=g.length,k=!1;typeof h=="boolean"&&(k=h,h=g[1]||{},i=2),typeof h!="object"&&!br(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=g[i])!=null)for(b in a){c=h[b],d=a[b];if(h===d)continue;k&&d&&(bw(d)||(e=bs(d)))?(e?(e=!1,f=c&&bs(c)?c:[]):f=c&&bw(c)?c:{},h[b]=by(k,f,d)):d!==undefined&&(h[b]=d)}return h}function bz(a,b){var c=b||[];if(a!=null){var d=bo(a);a.length==null||d=="string"||d=="function"||d==="regexp"||bu(a)?M.call(c,a):bx(c,a)}return c}function bA(a,b,c){b=b||d||b.ownerDocument||b[0]&&b[0].ownerDocument||d,c=c||b.createDocumentFragment();if(bt(a))return bC(a,b,c)&&c;var e=bB(a);while(e.firstChild)c.appendChild(e.firstChild);return c}function bB(a,b){var c=(b||d).createElement("div"),e=(i.exec(a)||["",""])[1].toLowerCase(),f=E[e]||E._default,g=f[0];c.innerHTML=f[1]+a+f[2];while(g--)c=c.lastChild;return c}function bC(a,b,c){var d=[],e,f;for(e=0;(f=a[e])!=null;e++)bp(f)&&(f=bB(f,b)),f.nodeType?d.push(f):d=bx(d,f);if(c)for(e=0;e<d.length;e++)d[e].nodeType&&c.appendChild(d[e]);return d}function bE(a){if(y){C=D,a.sort(y);if(C)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a}function bF(){if(!d.body)return null;var a=d.createElement("div");d.body.appendChild(a),a.style.width="20px",a.style.padding="10px";var b=a.offsetWidth;return d.body.removeChild(a),b==40}var a=window,b="http://cdnjs.cloudflare.com/ajax/libs/sizzle/1.4.4/sizzle.min.js",c=function(){return a.Sizzle||a.qwery},d=document,e=d.documentElement,f=/Until$/,g=/,/,h=/^(?:parents|prevUntil|prevAll)/,i=/<([\w:]+)/,j=/[\n\t\r]/g,k=/\s+/,m=/\d/,n=/\S/,o=/\r\n/g,p=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,q=/\r?\n/g,r=/^(?:select|textarea)/i,s=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,t=String.prototype.trim,u,v=/^\s+/,w=/\s+$/,x,y,z={children:!0,contents:!0,next:!0,prev:!0},A=Object.prototype.toString,B={},C=!1,D=!0,E={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},F=/[,\s.\[>+]/,G=[],H={},I=Array.prototype,J=Object.prototype,K=J.hasOwnProperty,L=I.slice,M=I.push,N=I.indexOf,O=I.forEach,P=I.filter,Q=I.indexOf;n.test(" ")&&(v=/^[\s\xA0]+/,w=/[\s\xA0]+$/);var S=[],T={},U=0,W=V.fn=V.prototype={constructor:V,selector:"",dm:function(a,b,c){var d=a[0],e,f,g,h;if(d&&this[0]){e=d&&d.parentNode,f=e&&e.nodeType===11&&e.childNodes.length===this.length?e:bA(d),g=f.firstChild,f.childNodes.length===1&&(f=g);if(g)for(h=0,l=this.length;h<l;h++)c.call(this[h],f)}return this},ps:function(a,b,c){var d=this.constructor();return bs(a)?M.apply(d,a):bx(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d}};W.make=function(a){return Y(this,a),this},W.toArray=function(){return L.call(this,0)},W.get=function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},W.add=function(a,b){return this.make(V(a,b))},W.each=function(a){if(!br(a))return this;for(var b=0,c=this.length;b<c;b++)a.call(this[b],b,this[b]);return this},W.attr=function(a,b){var c=this[0];return bp(a)&&b===undefined?c&&c.nodeName==="INPUT"&&c.type==="text"&&a==="value"?this.val():c?c.getAttribute(a)||(a in c?c[a]:undefined):null:this.each(function(c){var d=this.nodeType;if(d!==3&&d!==8&&d!==2)if(bq(a))for(var e in a)b===null?this.removeAttribute(a):this.setAttribute(e,a[e]);else this.setAttribute(a,br(b)?b.call(this,c,this.getAttribute(a)):b)})},W.removeAttr=function(a){return this.each(function(){this.removeAttribute(a)})},W.data=function(a,b){return bl(this[0],a,b)},W.append=function(){return this.dm(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},W.prepend=function(){return this.dm(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},W.before=function(){return this.dm(arguments,!1,function(a){this.parentNode.insertBefore(a,this)})},W.after=function(){return this[0]&&this[0].parentNode&&this.dm(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)}),this},W.hide=function(){this.each(function(){this.style.display="none"})},W.show=function(){this.each(function(){this.style.display="block"})},W.toggle=function(){this.each(function(){this.style.display=this.style.display==="none"?"block":"none"})},W.eq=function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},W.first=function(){return this.eq(0)},W.last=function(){return this.eq(-1)},W.slice=function(){return this.ps(L.apply(this,arguments),"slice",L.call(arguments).join(","))},W.map=function(a){return this.ps(bk(this,function(b,c){return a.call(b,c,b)}))},W.find=function(a){var b=this,c,d;if(!bp(a))return V(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(x(b[c],this))return!0});var e=this.ps("","find",a),f,g,h;for(c=0,d=this.length;c<d;c++){f=e.len,bx(e,V(a,this[c]));if(c==0)for(g=f;g<e.length;g++)for(h=0;h<f;h++)if(e[h]===e[g]){e.splice(g--,1);break}}return e},W.not=function(a){return this.ps(X(this,a,!1),"not",a)},W.filter=function(a){return this.ps(X(this,a,!0),"filter",a)},W.indexOf=function(a){return be(this,a)},W.is=function(a){return this.length>0&&V(this[0]).filter(a).length>0},W.remove=function(){for(var a=0,b;(b=this[a])!=null;a++)b.parentNode&&b.parentNode.removeChild(b);return this},W.val=function(a){return a==null?this[0]&&this[0].value||"":this.each(function(){this.value=a})},W.html=function(a){return a==null?this[0]&&this[0].innerHTML||"":this.each(function(){this.innerHTML=a})},W.text=function(a){var b=this[0],c;return typeof a=="undefined"?b&&(c=b.nodeType)?c===1||c===9?typeof b.textContent=="string"?b.textContent:b.innerText.replace(o,""):c===3||c===4?b.nodeValue:null:null:this.empty().append((b&&b.ownerDocument||d).createTextNode(txt))},W.empty=function(){for(var a=0,b;(b=this[a])!=null;a++)while(b.firstChild)b.removeChild(b.firstChild);return this},W.addClass=function(a){var b,c,d,e,f,g,h;if(br(a))return this.each(function(b){V(this).addClass(a.call(this,b,this.className))});if(a&&bp(a)){b=a.split(k);for(c=0,d=this.length;c<d;c++){e=this[c];if(e&&e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)~f.indexOf(" "+b[g]+" ")||(f+=b[g]+" ");e.className=u(f)}}}return this},W.removeClass=function(a){var b,c,d,e,f,g,h;if(br(a))return this.each(function(b){V(this).removeClass(a.call(this,b,this.className))});if(a&&bp(a)||a===undefined){b=(a||"").split(k);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1&&e.className)if(a){f=(" "+e.className+" ").replace(j," ");for(g=0,h=b.length;g<h;g++)f=f.replace(" "+b[g]+" "," ");e.className=u(f)}else e.className=""}}return this},W.hasClass=function(a){return Z(this,a)},W.fadeIn=function(){this.each(function(){V(this).show()})},W.fadeOut=function(){this.each(function(){V(this).hide()})},W.serializeArray=function(){return this.map(function(){return this.elements?bz(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||r.test(this.nodeName)||s.test(this.type))}).map(function(a,b){var c=V(this).val();return c==null||bs(c)?bk(c,function(a){return{name:b.name,value:a.replace(q,"\r\n")}}):{name:b.name,value:c.replace(q,"\r\n")}}).get()},R.prototype=W,V.hasClass=Z,V.walk=$,V.$$=_,V.setQuery=function(a){V.query=function(b,c){return _(b,c,a||function(a,b){return b.querySelectorAll(a)})}};var ba=c();V.setQuery(ba||function(a,b){return d.querySelectorAll?(b||d).querySelectorAll(a):[]}),V.loadScript=bb,V.each=function(a,b,c){var d,e=0,f=a.length,g=f===undefined||br(a);if(c){if(g)for(d in a){if(b.apply(a[d],c)===!1)break;for(;e<f;)if(b.apply(a[e++],c)===!1)break}}else if(g)for(d in a){if(b.call(a[d],d,a[d])===!1)break;for(;e<f;)if(b.call(a[e],e,a[e++])===!1)break}return a},V._each=bd,V._indexOf=be,V._defaults=function(a){return bd(L.call(arguments,1),function(b){for(var c in b)a[c]==null&&(a[c]=b[c])}),a},V._filter=bf,V.proxy=function(a,b){if(typeof b=="string"){var c=a[b];b=a,a=c}if(br(a)){var d=L.call(arguments,2),e=function(){return a.apply(b,d.concat(L.call(arguments)))};return e.guid=a.guid=a.guid||e.guid||U++,e}},V.dir=bg,V.nth=bh,V.sibling=bi,V.grep=bj,V.map=bk,V.data=bl,V.attrs=bm,V.eqSI=bn,V.trim=u=t?function(a){return a==null?"":t.call(a)}:function(a){return a==null?"":a.toString().replace(v,"").replace(w,"")},V.indexOf=V.inArray=function(a,b){if(!b)return-1;if(N)return N.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},bd("Boolean Number String Function Array Date RegExp Object".split(" "),function(a){return B["[object "+a+"]"]=a.toLowerCase(),this}),V.type=bo,V.isFunction=br,V.isArray=Array.isArray||bs,V.isWindow=bu,V.isNaN=bv,V.merge=bx,V.extend=V.fn.extend=by,V.makeArray=bz,V.htmlFrag=bA;var bD=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1};return x=V.contains=e.contains?function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:function(){return!1},y=e.compareDocumentPosition?(x=function(a,b){return!!(a.compareDocumentPosition(b)&16)})&&function(a,b){return a===b?(C=!0,0):!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition?-1:1:a.compareDocumentPosition(b)&4?-1:1}:function(a,b){if(a===b)return C=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,h=b.parentNode,i=g;if(g===h)return bD(a,b);if(!g)return-1;if(!h)return 1;while(i)e.unshift(i),i=i.parentNode;i=h;while(i)f.unshift(i),i=i.parentNode;c=e.length,d=f.length;for(var j=0;j<c&&j<d;j++)if(e[j]!==f[j])return bD(e[j],f[j]);return j===c?bD(a,f[j],-1):bD(e[j],b,1)},V.unique=bE,bd({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return bg(a,"parentNode")},parentsUntil:function(a,b,c){return bg(a,"parentNode",c)},next:function(a){return bh(a,2,"nextSibling")},prev:function(a){return bh(a,2,"previousSibling")},nextAll:function(a){return bg(a,"nextSibling")},prevAll:function(a){return bg(a,"previousSibling")},nextUntil:function(a,b,c){return bg(a,"nextSibling",c)},prevUntil:function(a,b,c){return bg(a,"previousSibling",c)},siblings:function(a){return bi(a.parentNode.firstChild,a)},children:function(a){return bi(a.firstChild)},contents:function(a){return a.nodeName==="iframe"?a.contentDocument||a.contentWindow["document "]:bz(a.childNodes)}},function(a,b){V.fn[b]=function(c,d){var e=bk(this,a,c),i=L.call(arguments);return f.test(b)||(d=c),d&&bp(d)&&(e=_(d,e)),e=this.length>1&&!z[b]?bE(e):e,(this.length>1||g.test(d))&&h.test(b)&&(e=e.reverse()),this.ps(e,b,i.join(","))}}),function(){var a=document.createElement("div");a.style.display="none",a.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var b=a.getElementsByTagName("a")[0];V.support={boxModel:null,opacity:/^0.55$/.test(b.style.opacity),cssFloat:!!b.style.cssFloat};var c=/(webkit)[ \/]([\w.]+)/,d=/(opera)(?:.*version)?[ \/]([\w.]+)/,e=/(msie) ([\w.]+)/,f=/(mozilla)(?:.*? rv:([\w.]+))?/,g=navigator.userAgent.toLowerCase(),h=c.exec(g)||d.exec(g)||e.exec(g)||g.indexOf("compatible")<0&&f.exec(g)||[],i;i=V.browser={version:h[2]||"0"},i[h[1]||""]=!0}(),V.init=!1,V.onload=function(){if(!V.init)try{V.support.boxModel=bF(),!ba&&!d.querySelectorAll&&bb(b,function(){V.setQuery=c()}),V.init=!0}catch(a){}},d.body&&!V.init&&V.onload(),V.hook=function(a){S.push(a)},V.plug=function(a,b){var c=bp(a)?a:a.name;b=br(a)?a:b;if(!br(b))throw"Plugin fn required";c&&b&&(T[c]=b),b(V)},V}()$.plug("ajax",function($){function _xhr(){if(_xhrf!=null)return _xhrf();for(var a=0,b=xhrs.length;a<b;a++)try{var c=xhrs[a],d=c();if(d!=null)return _xhrf=c,d}catch(e){}return function(){}}function _xhrResp(xhr,dataType){dataType=dataType||xhr.getResponseHeader("Content-Type").split(";")[0];switch(dataType){case"text/xml":return xhr.responseXML;case"json":case"text/json":case"application/json":case"text/javascript":case"application/javascript":case"application/x-javascript":return window.JSON?JSON.parse(xhr.responseText):eval(xhr.responseText);default:return xhr.responseText}}function ajax(a){var b=_xhr(),c,d=0;a=$._defaults(a,{userAgent:"XMLHttpRequest",lang:"en",type:"GET",data:null,contentType:"application/x-www-form-urlencoded",dataType:"application/json"}),a.timeout&&(c=setTimeout(function(){b.abort(),a.timeoutFn&&a.timeoutFn(a.url)},a.timeout)),b.onreadystatechange=function(){b.readyState==4?(c&&clearTimeout(c),b.status<300?a.success&&a.success(_xhrResp(b,a.dataType)):a.error&&a.error(b,b.status,b.statusText),a.complete&&a.complete(b,b.statusText)):a.progress&&a.progress(++d)};var e=a.url,f=null,g=a.type=="POST"||a.type=="PUT";!g&&a.data&&(e+="?"+formData(a.data)),b.open(a.type,e);if(g){var h=a.dataType.indexOf("json")>=0;f=h?JSON.stringify(a.data):formData(a.data),b.setRequestHeader("Content-Type",h?"application/json":"application/x-www-form-urlencoded")}b.send(f)}var xhrs=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")}],_xhrf=null;$.xhr=_xhr,$._xhrResp=_xhrResp,$.formData=function(a){var b=[],c=/%20/g;for(var d in a)b.push(encodeURIComponent(d).replace(c,"+")+"="+encodeURIComponent(a[d].toString()).replace(c,"+"));return b.join("&")},$.ajax=ajax,$.getJSON=function(a,b,c,d){$.isFunction(b)&&(d=c,c=b,b=null),ajax({url:a,dataType:"json",data:b,success:c,error:d})},$.get=function(a,b,c,d){$.isFunction(b)&&(d=c,c=b,b=null),ajax({url:a,type:"GET",data:b,success:c,dataType:d||"text/plain"})},$.post=function(a,b,c,d){$.isFunction(b)&&(d=c,c=b,b=null),ajax({url:a,type:"POST",data:b,success:c,dataType:d||"text/plain"})}})$.plug("css",function(a){function m(b,c,d,e){if(!b||b.nodeType===3||b.nodeType===8||!b.style)return;var f,g=p(c),h=b.style,i=a.cssHooks[g];c=a.cssProps[g]||g;if(d===undefined)return i&&"get"in i&&(f=i.get(b,!1,e))!==undefined?f:h[c];if(typeof d=="number"&&isNaN(d)||d==null)return;typeof d=="number"&&!a.cssNumber[g]&&(d+="px");if(!i||!("set"in i)||(d=i.set(b,d))!==undefined)try{h[c]=d}catch(j){}}function n(b,c,d){var e,f=p(c),g=a.cssHooks[f];c=a.cssProps[f]||f;if(g&&"get"in g&&(e=g.get(b,!0,d))!==undefined)return e;if(i)return i(b,c,f)}function o(a,b,c){var d={},e;for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}function p(a){return a.replace(e,l)}function q(b,c,d,e,f,g){var h=b.length;if(typeof c=="object"){for(var i in c)q(b,i,c[i],e,f,d);return b}if(d!==undefined){e=!g&&e&&a.isFunction(d);for(var j=0;j<h;j++)f(b[j],c,e?d.call(b[j],j,f(b[j],c)):d,g);return b}return h?f(b[0],c):undefined}function r(b){return a.isWindow(b)?b:b.nodeType===9?b.defaultView||b.parentWindow:!1}var b=document,c=/alpha\([^)]*\)/i,d=/opacity=([^)]*)/,e=/-([a-z])/ig,f=/([A-Z])/g,g=/^-?\d+(?:px)?$/i,h=/^-?\d/,i,j,k,l=function(a,b){return b.toUpperCase()};a.cssHooks={opacity:{get:function(a,b){if(!b)return a.style.opacity;var c=i(a,"opacity","opacity");return c===""?"1":c}}},a.support.opacity||(a.support.opacity={get:function(a,b){return d.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(b,d){var e=b.style;e.zoom=1;var f=a.isNaN(d)?"":"alpha(opacity="+d*100+")",g=e.filter||"";e.filter=c.test(g)?g.replace(c,f):e.filter+" "+f}}),b.defaultView&&b.defaultView.getComputedStyle&&(j=function(b,c,d){var e,g,h;d=d.replace(f,"-$1").toLowerCase();if(!(g=b.ownerDocument.defaultView))return undefined;if(h=g.getComputedStyle(b,null))e=h.getPropertyValue(d),e===""&&!a.contains(b.ownerDocument.documentElement,b)&&(e=a.style(b,d));return e}),b.documentElement.currentStyle&&(k=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;return!g.test(d)&&h.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e)),d===""?"auto":d}),i=j||k,a.fn.css=function(a,b){return arguments.length===2&&b===undefined?this:q(this,a,b,!0,function(a,b,c){return c!==undefined?m(a,b,c):n(a,b)})},a.cssNumber={zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},a.cssProps={"float":a.support.cssFloat?"cssFloat":"styleFloat"},a.style=m,a.css=n,a.swap=o,a.camelCase=p,a._each(["Height","Width"],function(b,c){var d=b.toLowerCase();a.fn["inner"+b]=function(){var a=this[0];return a&&a.style?parseFloat(n(a,d,"padding")):null},a.fn["outer"+b]=function(a){var b=this[0];return b&&b.style?parseFloat(n(b,d,a?"margin":"border")):null},a.fn[d]=function(c){var e=this[0];if(!e)return c==null?null:this;if(a.isFunction(c))return this.each(function(b){var e=a(this);e[d](c.call(this,b,e[d]()))});if(a.isWindow(e)){var f=e.document.documentElement["client"+b],g=e.document.body;return e.document.compatMode==="CSS1Compat"&&f||g&&g["client"+b]||f}if(e.nodeType===9)return Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]);if(c===undefined){var h=n(e,d),i=parseFloat(h);return a.isNaN(i)?h:i}return this.css(d,typeof c=="string"?c:c+"px")}}),a._each(["Left","Top"],function(b,c){var d="scroll"+b;a.fn[d]=function(b){var e,f;return b===undefined?(e=this[0],e?(f=r(e),f?"pageXOffset"in f?f[c?"pageYOffset":"pageXOffset"]:a.support.boxModel&&f.document.documentElement[d]||f.document.body[d]:e[d]):null):this.each(function(){f=r(this),f?f.scrollTo(c?a(f).scrollLeft():b,c?b:a(f).scrollTop()):this[d]=b})}})})$.plug("custom",function(a){var b=window,c=document,d={},e=b.location.search.substring(1).split("&");for(var f=0;f<e.length;f++){var g=e[f].split("=");d[g[0]]=unescape(g[1])}a.queryString=function(a){return d[a]};var h=a.Key=function(a){this.keyCode=a};h.namedKeys={Backspace:8,Tab:9,Enter:13,Shift:16,Ctrl:17,Alt:18,Pause:19,Capslock:20,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,LeftArrow:37,UpArrow:38,RightArrow:39,DownArrow:40,Insert:45,Delete:46},a._each(h.namedKeys,function(a,b){var c=a;h.prototype["is"+b]=function(){return this.keyCode===c}}),a.key=function(a){return a=a||window.event,new h(a.keyCode||a.which)},a.cancelEvent=function(a){return a||(a=window.event),a.cancelBubble=!0,a.returnValue=!1,a.stopPropagation&&(a.stopPropagation(),a.preventDefault()),!1},a.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},a._template=function(b,c){var d=a.templateSettings,e="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+b.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape,function(a,b){return"',_.escape("+b.replace(/\\'/g,"'")+"),'"}).replace(d.interpolate,function(a,b){return"',"+b.replace(/\\'/g,"'")+",'"}).replace(d.evaluate||null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",f=new Function("obj","_",e);return c?f(c,a):function(b){return f(b,a)}}})$.plug("docready",function(a){function i(){if(g)return;try{c.documentElement.doScroll("left")}catch(a){setTimeout(i,1);return}j()}function j(b){b===!0&&h--;if(!h||b!==!0&&!g){if(!c.body)return setTimeout(i,1);g=!0;if(b!==!0&&--h>0)return;if(f){var d,e=0,i=f;f=null;while(d=i[e++])d.call(c,a);a.fn.trigger&&a(c).trigger("ready").unbind("ready")}}}var b=window,c=document,d,e,f=[],g=!1,h=1;a.hook(function(a,b){if(typeof a=="function")return this.ready(a),!0}),a.ready=j,d=c.addEventListener?function(){c.removeEventListener("DOMContentLoaded",d,!1),j()}:function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",d),j())},a.bindReady=function(){if(e)return;e=!0;if(c.readyState==="complete")return setTimeout(j,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",d,!1),b.addEventListener("load",j,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",d),b.attachEvent("onload",j);var a=!1;try{a=window.frameElement==null}catch(f){}c.documentElement.doScroll&&a&&i()}},a.fn.ready=function(b){return a.bindReady(),g?b.call(c,a):f&&f.push(b),this},a.init||a(document).ready(a.onload)})$.plug("events",function(a){function e(a){return a._jquid||(a._jquid=d++)}function f(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):(a["e"+b+c]=c,a[b+c]=function(){a["e"+b+c](window.event)},a.attachEvent("on"+b,a[b+c]))}function g(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):(a.detachEvent("on"+b,a[b+c]),a[b+c]=null)}function h(a){var b=(""+a).split(".");return{e:b[0],ns:b.slice(1).sort().join(" ")}}function i(a){return new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)")}function j(b,d,f,g){d=h(d);if(d.ns)var j=i(d.ns);return a._filter(c[e(b)]||[],function(a){return a&&(!d.e||a.e==d.e)&&(!d.ns||j.test(a.ns))&&(!f||a.fn==f)&&(!g||a.sel==g)})}function k(b,d,g,i,j){var k=e(b),l=c[k]||(c[k]=[]);a._each(d.split(/\s/),function(c){var d=a.extend(h(c),{fn:g,sel:i,del:j,i:l.length});l.push(d),f(b,d.e,j||g)}),b=null}function l(b,d,f,h){var i=e(b);a._each((d||"").split(/\s/),function(d){a._each(j(b,d,f,h),function(a){delete c[i][a.i],g(b,a.e,a.del||a.fn)})})}function n(b){var c=a.extend({originalEvent:b},b);return a._each(m,function(a){c[a]=function(){return b[a].apply(b,arguments)}}),c}var b=document,c={},d=1;a.bind=f,a.unbind=g;var m=["preventDefault","stopImmediatePropagation","stopPropagation"],o=a.fn;a._each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a){o[a]=function(b,c){return arguments.length>0?this.bind(a,b,c):this.trigger(a)}}),o.bind=function(a,b){return this.each(function(){k(this,a,b)})},o.unbind=function(a,b){return this.each(function(){l(this,a,b)})},o.one=function(a,b){return this.each(function(){var c=this;k(this,a,function(){b(),l(c,a,arguments.callee)})})},o.delegate=function(b,c,d){return this.each(function(e,f){k(f,c,d,b,function(c){var e=c.target,g=a.$$(b,f);while(e&&g.indexOf(e)<0)e=e.parentNode;e&&e!==f&&e!==document&&d.call(e,a.extend(n(c||window.event),{currentTarget:e,liveFired:f}))})})},o.undelegate=function(a,b,c){return this.each(function(){l(this,b,c,a)})},o.live=function(c,d){return a(b.body).delegate(this.selector,c,d),this},o.die=function(c,d){return a(b.body).undelegate(this.selector,c,d),this},o.trigger=function(a){return this.each(function(){if(b.createEvent){var c=b.createEvent("Events");this.dispatchEvent(c,c.initEvent(a,!0,!0))}else this.fireEvent&&this.fireEvent("on"+a)})},a.init||a(window).bind("load",a.onload)})
+window.$=window.jquip=function(){function R(a,b){var c;for(var e=0,f=S.length;e<f;e++)if(S[e].apply(this,arguments))return this;return a?typeof a=="function"?(bc("require docready"),this):bs(a)?this.make(a):a.nodeType||bu(a)?this.make([a]):a=="body"&&!b&&d.body?(this.context=a.context,this[0]=d.body,this.length=1,this.selector=a,this):a.selector!==undefined?(this.context=a.context,this.selector=a.selector,this.make(a)):(a=bp(a)&&a.charAt(0)==="<"?(c=p.exec(a))?(a=[d.createElement(c[1])])&&bw(b)?V.fn.attr.call(a,b)&&a:a:bA(a).childNodes:_(a,b),this.make(a)):this}function V(a,b){return new R(a,b)}function X(a,b,c){return b=b||0,br(b)?bj(a,function(a,d){return!!b.call(a,d,a)===c}):b.nodeType?bj(a,function(a){return a===b===c}):bp(b)?bj(a,function(a){return a.parentNode&&be(_(b,a.parentNode),a)>=0}):bj(a,function(a){return be(b,a)>=0===c})}function Y(a,b){a.length=b&&b.length||0;if(a.length==0)return a;for(var c=0,d=b.length;c<d;c++)a[c]=b[c];return a}function Z(a,b){var b=" "+b+" ";for(var c=0,d=a.length;c<d;c++)if(a[c].nodeType===1&&(" "+a[c].className+" ").replace(j," ").indexOf(b)>-1)return!0;return!1}function $(a,b,c){b=b||d,c=c||[],b.nodeType==1&&a(b)&&c.push(b);var e=b.childNodes;for(var f=0,g=e.length;f<g;f++){var h=e[f];h.nodeType==1&&$(a,h,c)}return c}function _(a,b,c){if(a&&bp(a)){b instanceof V&&(b=b[0]),b=b||d,c=c||V.query;var e=a.charAt(0),f=a.substring(1),g=F.test(f),h;try{return g?L.call(c(a,b)):g?L.call(c(a,b)):e=="#"?(h=d.getElementById(f))?[h]:G:L.call(e=="."?b.getElementsByClassName(f):b.getElementsByTagName(a))}catch(i){bc(i)}}return a.nodeType==1||a.nodeType==9?[a]:G}function bb(a,b,c){var f=d.head||d.getElementsByTagName("head")[0]||e,g=d.createElement("script"),h;c&&(g.async="async"),g.onreadystatechange=function(){if(!(h=g.readyState)||h=="loaded"||h=="complete")g.onload=g.onreadystatechange=null,f&&g.parentNode&&f.removeChild(g),g=undefined,b&&b()},g.onload=b,g.src=a,f.insertBefore(g,f.firstChild)}function bc(b){typeof a.console!="undefined"&&a.console.warn(arguments)}function bd(a,b,c){if(a==null)return;if(O&&a.forEach===O)a.forEach(b,c);else if(a.length===+a.length){for(var d=0,e=a.length;d<e;d++)if(d in a&&b.call(c,a[d],d,a)===H)return}else for(var f in a)if(K.call(a,f)&&b.call(c,a[f],f,a)===H)return}function be(a,b){if(a==null)return-1;var c,d;if(Q&&a.indexOf===Q)return a.indexOf(b);for(c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function bf(a,b,c){var d=[];return a==null?d:P&&a.filter===P?a.filter(b,c):(bd(a,function(a,e,f){b.call(c,a,e,f)&&(d[d.length]=a)}),d)}function bg(a,b,c){var d=[],e=a[b];while(e&&e.nodeType!==9&&(c===undefined||e.nodeType!==1||!V(e).is(c)))e.nodeType===1&&d.push(e),e=e[b];return d}function bh(a,b,c){b=b||1;var d=0;for(;a;a=a[c])if(a.nodeType===1&&++d===b)break;return a}function bi(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}function bj(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d}function bk(a,b,c){var d,e,f=[],g=0,h=a.length,i=a instanceof V||typeof h=="number"&&(h>0&&a[0]&&a[h-1]||h===0||bs(a));if(i)for(;g<h;g++)d=b(a[g],g,c),d!=null&&(f[f.length]=d);else for(e in a)d=b(a[e],e,c),d!=null&&(f[f.length]=d);return f.concat.apply([],f)}function bl(a,b,c){if(!a)return{};if(b&&c)return a.setAttribute(b,c),null;var d={};return bd(bm(a),function(a,b){if(b.indexOf("data-")!==0||!a)return;d[b.substr("data-".length)]=a}),bp(b)?d[b]:d}function bm(a){var b={};for(var c=0,d=a.attributes,e=d.length;c<e;c++)b[d.item(c).nodeName]=d.item(c).nodeValue;return b}function bn(a,b){return!a||!b?a==b:a.toLowerCase()===b.toLowerCase()}function bo(a){return a==null?String(a):B[A.call(a)]||"object"}function bp(a){return typeof a=="string"}function bq(a){return typeof a=="object"}function br(a){return typeof a=="function"||bo(a)==="function"}function bs(a){return bo(a)==="array"}function bt(a){return!bp(a)&&typeof a.length=="number"}function bu(a){return a&&typeof a=="object"&&"setInterval"in a}function bv(a){return a==null||!m.test(a)||isNaN(a)}function bw(a){if(!a||bo(a)!=="object"||a.nodeType||bu(a))return!1;try{if(a.constructor&&!K.call(a,"constructor")&&!K.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}var c;for(c in a);return c===undefined||K.call(a,c)}function bx(a,b){var c=a.length,d=0;if(typeof b.length=="number")for(var e=b.length;d<e;d++)a[c++]=b[d];else while(b[d]!==undefined)a[c++]=b[d++];return a.length=c,a}function by(){var a,b,c,d,e,f,g=arguments,h=g[0]||{},i=1,j=g.length,k=!1;typeof h=="boolean"&&(k=h,h=g[1]||{},i=2),typeof h!="object"&&!br(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=g[i])!=null)for(b in a){c=h[b],d=a[b];if(h===d)continue;k&&d&&(bw(d)||(e=bs(d)))?(e?(e=!1,f=c&&bs(c)?c:[]):f=c&&bw(c)?c:{},h[b]=by(k,f,d)):d!==undefined&&(h[b]=d)}return h}function bz(a,b){var c=b||[];if(a!=null){var d=bo(a);a.length==null||d=="string"||d=="function"||d==="regexp"||bu(a)?M.call(c,a):bx(c,a)}return c}function bA(a,b,c){b=b||d||b.ownerDocument||b[0]&&b[0].ownerDocument||d,c=c||b.createDocumentFragment();if(bt(a))return bC(a,b,c)&&c;var e=bB(a);while(e.firstChild)c.appendChild(e.firstChild);return c}function bB(a,b){var c=(b||d).createElement("div"),e=(i.exec(a)||["",""])[1].toLowerCase(),f=E[e]||E._default,g=f[0];c.innerHTML=f[1]+a+f[2];while(g--)c=c.lastChild;return c}function bC(a,b,c){var d=[],e,f;for(e=0;(f=a[e])!=null;e++)bp(f)&&(f=bB(f,b)),f.nodeType?d.push(f):d=bx(d,f);if(c)for(e=0;e<d.length;e++)d[e].nodeType&&c.appendChild(d[e]);return d}function bE(a){if(y){C=D,a.sort(y);if(C)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a}function bF(){if(!d.body)return null;var a=d.createElement("div");d.body.appendChild(a),a.style.width="20px",a.style.padding="10px";var b=a.offsetWidth;return d.body.removeChild(a),b==40}var a=window,b="http://cdnjs.cloudflare.com/ajax/libs/sizzle/1.4.4/sizzle.min.js",c=function(){return a.Sizzle||a.qwery},d=document,e=d.documentElement,f=/Until$/,g=/,/,h=/^(?:parents|prevUntil|prevAll)/,i=/<([\w:]+)/,j=/[\n\t\r]/g,k=/\s+/,m=/\d/,n=/\S/,o=/\r\n/g,p=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,q=/\r?\n/g,r=/^(?:select|textarea)/i,s=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,t=String.prototype.trim,u,v=/^\s+/,w=/\s+$/,x,y,z={children:!0,contents:!0,next:!0,prev:!0},A=Object.prototype.toString,B={},C=!1,D=!0,E={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},F=/[,\s.\[>+]/,G=[],H={},I=Array.prototype,J=Object.prototype,K=J.hasOwnProperty,L=I.slice,M=I.push,N=I.indexOf,O=I.forEach,P=I.filter,Q=I.indexOf;n.test(" ")&&(v=/^[\s\xA0]+/,w=/[\s\xA0]+$/);var S=[],T={},U=0,W=V.fn=V.prototype={constructor:V,selector:"",dm:function(a,b,c){var d=a[0],e,f,g,h;if(d&&this[0]){e=d&&d.parentNode,f=e&&e.nodeType===11&&e.childNodes.length===this.length?e:bA(d),g=f.firstChild,f.childNodes.length===1&&(f=g);if(g)for(h=0,l=this.length;h<l;h++)c.call(this[h],f)}return this},ps:function(a,b,c){var d=this.constructor();return bs(a)?M.apply(d,a):bx(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d}};W.make=function(a){return Y(this,a),this},W.toArray=function(){return L.call(this,0)},W.get=function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},W.add=function(a,b){return this.make(V(a,b))},W.each=function(a){if(!br(a))return this;for(var b=0,c=this.length;b<c;b++)a.call(this[b],b,this[b]);return this},W.attr=function(a,b){var c=this[0];return bp(a)&&b===undefined?c&&c.nodeName==="INPUT"&&c.type==="text"&&a==="value"?this.val():c?c.getAttribute(a)||(a in c?c[a]:undefined):null:this.each(function(c){var d=this.nodeType;if(d!==3&&d!==8&&d!==2)if(bq(a))for(var e in a)b===null?this.removeAttribute(a):this.setAttribute(e,a[e]);else this.setAttribute(a,br(b)?b.call(this,c,this.getAttribute(a)):b)})},W.removeAttr=function(a){return this.each(function(){this.removeAttribute(a)})},W.data=function(a,b){return bl(this[0],a,b)},W.append=function(){return this.dm(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},W.prepend=function(){return this.dm(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},W.before=function(){return this.dm(arguments,!1,function(a){this.parentNode.insertBefore(a,this)})},W.after=function(){return this[0]&&this[0].parentNode&&this.dm(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)}),this},W.hide=function(){this.each(function(){this.style.display="none"})},W.show=function(){this.each(function(){this.style.display="block"})},W.toggle=function(){this.each(function(){this.style.display=this.style.display==="none"?"block":"none"})},W.eq=function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},W.first=function(){return this.eq(0)},W.last=function(){return this.eq(-1)},W.slice=function(){return this.ps(L.apply(this,arguments),"slice",L.call(arguments).join(","))},W.map=function(a){return this.ps(bk(this,function(b,c){return a.call(b,c,b)}))},W.find=function(a){var b=this,c,d;if(!bp(a))return V(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(x(b[c],this))return!0});var e=this.ps("","find",a),f,g,h;for(c=0,d=this.length;c<d;c++){f=e.len,bx(e,V(a,this[c]));if(c==0)for(g=f;g<e.length;g++)for(h=0;h<f;h++)if(e[h]===e[g]){e.splice(g--,1);break}}return e},W.not=function(a){return this.ps(X(this,a,!1),"not",a)},W.filter=function(a){return this.ps(X(this,a,!0),"filter",a)},W.indexOf=function(a){return be(this,a)},W.is=function(a){return this.length>0&&V(this[0]).filter(a).length>0},W.remove=function(){for(var a=0,b;(b=this[a])!=null;a++)b.parentNode&&b.parentNode.removeChild(b);return this},W.val=function(a){return a==null?this[0]&&this[0].value||"":this.each(function(){this.value=a})},W.html=function(a){return a==null?this[0]&&this[0].innerHTML||"":this.each(function(){this.innerHTML=a})},W.text=function(a){var b=this[0],c;return typeof a=="undefined"?b&&(c=b.nodeType)?c===1||c===9?typeof b.textContent=="string"?b.textContent:b.innerText.replace(o,""):c===3||c===4?b.nodeValue:null:null:this.empty().append((b&&b.ownerDocument||d).createTextNode(txt))},W.empty=function(){for(var a=0,b;(b=this[a])!=null;a++)while(b.firstChild)b.removeChild(b.firstChild);return this},W.addClass=function(a){var b,c,d,e,f,g,h;if(br(a))return this.each(function(b){V(this).addClass(a.call(this,b,this.className))});if(a&&bp(a)){b=a.split(k);for(c=0,d=this.length;c<d;c++){e=this[c];if(e&&e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)~f.indexOf(" "+b[g]+" ")||(f+=b[g]+" ");e.className=u(f)}}}return this},W.removeClass=function(a){var b,c,d,e,f,g,h;if(br(a))return this.each(function(b){V(this).removeClass(a.call(this,b,this.className))});if(a&&bp(a)||a===undefined){b=(a||"").split(k);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1&&e.className)if(a){f=(" "+e.className+" ").replace(j," ");for(g=0,h=b.length;g<h;g++)f=f.replace(" "+b[g]+" "," ");e.className=u(f)}else e.className=""}}return this},W.hasClass=function(a){return Z(this,a)},W.fadeIn=function(){this.each(function(){V(this).show()})},W.fadeOut=function(){this.each(function(){V(this).hide()})},W.serializeArray=function(){return this.map(function(){return this.elements?bz(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||r.test(this.nodeName)||s.test(this.type))}).map(function(a,b){var c=V(this).val();return c==null||bs(c)?bk(c,function(a){return{name:b.name,value:a.replace(q,"\r\n")}}):{name:b.name,value:c.replace(q,"\r\n")}}).get()},R.prototype=W,V.hasClass=Z,V.walk=$,V.$$=_,V.setQuery=function(a){V.query=function(b,c){return _(b,c,a||function(a,b){return b.querySelectorAll(a)})}};var ba=c();V.setQuery(ba||function(a,b){return d.querySelectorAll?(b||d).querySelectorAll(a):[]}),V.loadScript=bb,V.each=function(a,b,c){var d,e=0,f=a.length,g=f===undefined||br(a);if(c){if(g)for(d in a){if(b.apply(a[d],c)===!1)break;for(;e<f;)if(b.apply(a[e++],c)===!1)break}}else if(g)for(d in a){if(b.call(a[d],d,a[d])===!1)break;for(;e<f;)if(b.call(a[e],e,a[e++])===!1)break}return a},V._each=bd,V._indexOf=be,V._defaults=function(a){return bd(L.call(arguments,1),function(b){for(var c in b)a[c]==null&&(a[c]=b[c])}),a},V._filter=bf,V.proxy=function(a,b){if(typeof b=="string"){var c=a[b];b=a,a=c}if(br(a)){var d=L.call(arguments,2),e=function(){return a.apply(b,d.concat(L.call(arguments)))};return e.guid=a.guid=a.guid||e.guid||U++,e}},V.dir=bg,V.nth=bh,V.sibling=bi,V.grep=bj,V.map=bk,V.data=bl,V.attrs=bm,V.eqSI=bn,V.trim=u=t?function(a){return a==null?"":t.call(a)}:function(a){return a==null?"":a.toString().replace(v,"").replace(w,"")},V.indexOf=V.inArray=function(a,b){if(!b)return-1;if(N)return N.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},bd("Boolean Number String Function Array Date RegExp Object".split(" "),function(a){return B["[object "+a+"]"]=a.toLowerCase(),this}),V.type=bo,V.isFunction=br,V.isArray=Array.isArray||bs,V.isWindow=bu,V.isNaN=bv,V.merge=bx,V.extend=V.fn.extend=by,V.makeArray=bz,V.htmlFrag=bA;var bD=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1};return x=V.contains=e.contains?function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:function(){return!1},y=e.compareDocumentPosition?(x=function(a,b){return!!(a.compareDocumentPosition(b)&16)})&&function(a,b){return a===b?(C=!0,0):!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition?-1:1:a.compareDocumentPosition(b)&4?-1:1}:function(a,b){if(a===b)return C=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,h=b.parentNode,i=g;if(g===h)return bD(a,b);if(!g)return-1;if(!h)return 1;while(i)e.unshift(i),i=i.parentNode;i=h;while(i)f.unshift(i),i=i.parentNode;c=e.length,d=f.length;for(var j=0;j<c&&j<d;j++)if(e[j]!==f[j])return bD(e[j],f[j]);return j===c?bD(a,f[j],-1):bD(e[j],b,1)},V.unique=bE,bd({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return bg(a,"parentNode")},parentsUntil:function(a,b,c){return bg(a,"parentNode",c)},next:function(a){return bh(a,2,"nextSibling")},prev:function(a){return bh(a,2,"previousSibling")},nextAll:function(a){return bg(a,"nextSibling")},prevAll:function(a){return bg(a,"previousSibling")},nextUntil:function(a,b,c){return bg(a,"nextSibling",c)},prevUntil:function(a,b,c){return bg(a,"previousSibling",c)},siblings:function(a){return bi(a.parentNode.firstChild,a)},children:function(a){return bi(a.firstChild)},contents:function(a){return a.nodeName==="iframe"?a.contentDocument||a.contentWindow["document "]:bz(a.childNodes)}},function(a,b){V.fn[b]=function(c,d){var e=bk(this,a,c),i=L.call(arguments);return f.test(b)||(d=c),d&&bp(d)&&(e=_(d,e)),e=this.length>1&&!z[b]?bE(e):e,(this.length>1||g.test(d))&&h.test(b)&&(e=e.reverse()),this.ps(e,b,i.join(","))}}),function(){var a=document.createElement("div");a.style.display="none",a.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var b=a.getElementsByTagName("a")[0];V.support={boxModel:null,opacity:/^0.55$/.test(b.style.opacity),cssFloat:!!b.style.cssFloat};var c=/(webkit)[ \/]([\w.]+)/,d=/(opera)(?:.*version)?[ \/]([\w.]+)/,e=/(msie) ([\w.]+)/,f=/(mozilla)(?:.*? rv:([\w.]+))?/,g=navigator.userAgent.toLowerCase(),h=c.exec(g)||d.exec(g)||e.exec(g)||g.indexOf("compatible")<0&&f.exec(g)||[],i;i=V.browser={version:h[2]||"0"},i[h[1]||""]=!0}(),V.init=!1,V.onload=function(){if(!V.init)try{V.support.boxModel=bF(),!ba&&!d.querySelectorAll&&bb(b,function(){V.setQuery=c()}),V.init=!0}catch(a){}},d.body&&!V.init&&V.onload(),V.hook=function(a){S.push(a)},V.plug=function(a,b){var c=bp(a)?a:a.name;b=br(a)?a:b;if(!br(b))throw"Plugin fn required";c&&b&&(T[c]=b),b(V)},V}()$.plug("ajax",function($){function _xhr(){if(_xhrf!=null)return _xhrf();for(var a=0,b=xhrs.length;a<b;a++)try{var c=xhrs[a],d=c();if(d!=null)return _xhrf=c,d}catch(e){}return function(){}}function _xhrResp(xhr,dataType){dataType=dataType||xhr.getResponseHeader("Content-Type").split(";")[0];switch(dataType){case"text/xml":return xhr.responseXML;case"json":case"text/json":case"application/json":case"text/javascript":case"application/javascript":case"application/x-javascript":return window.JSON?JSON.parse(xhr.responseText):eval(xhr.responseText);default:return xhr.responseText}}function ajax(a){var b=_xhr(),c,d=0;a=$._defaults(a,{userAgent:"XMLHttpRequest",lang:"en",type:"GET",data:null,contentType:"application/x-www-form-urlencoded",dataType:"application/json"}),a.timeout&&(c=setTimeout(function(){b.abort(),a.timeoutFn&&a.timeoutFn(a.url)},a.timeout)),b.onreadystatechange=function(){b.readyState==4?(c&&clearTimeout(c),b.status<300?a.success&&a.success(_xhrResp(b,a.dataType)):a.error&&a.error(b,b.status,b.statusText),a.complete&&a.complete(b,b.statusText)):a.progress&&a.progress(++d)};var e=a.url,f=null,g=a.type=="POST"||a.type=="PUT";!g&&a.data&&(e+="?"+formData(a.data)),b.open(a.type,e);if(g){var h=a.dataType.indexOf("json")>=0;f=h?JSON.stringify(a.data):formData(a.data),b.setRequestHeader("Content-Type",h?"application/json":"application/x-www-form-urlencoded")}b.send(f)}var xhrs=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")}],_xhrf=null;$.xhr=_xhr,$._xhrResp=_xhrResp,$.formData=function(a){var b=[],c=/%20/g;for(var d in a)b.push(encodeURIComponent(d).replace(c,"+")+"="+encodeURIComponent(a[d].toString()).replace(c,"+"));return b.join("&")},$.ajax=ajax,$.getJSON=function(a,b,c,d){$.isFunction(b)&&(d=c,c=b,b=null),ajax({url:a,dataType:"json",data:b,success:c,error:d})},$.get=function(a,b,c,d){$.isFunction(b)&&(d=c,c=b,b=null),ajax({url:a,type:"GET",data:b,success:c,dataType:d||"text/plain"})},$.post=function(a,b,c,d){$.isFunction(b)&&(d=c,c=b,b=null),ajax({url:a,type:"POST",data:b,success:c,dataType:d||"text/plain"})}})$.plug("css",function(a){function m(b,c,d,e){if(!b||b.nodeType===3||b.nodeType===8||!b.style)return;var f,g=p(c),h=b.style,i=a.cssHooks[g];c=a.cssProps[g]||g;if(d===undefined)return i&&"get"in i&&(f=i.get(b,!1,e))!==undefined?f:h[c];if(typeof d=="number"&&isNaN(d)||d==null)return;typeof d=="number"&&!a.cssNumber[g]&&(d+="px");if(!i||!("set"in i)||(d=i.set(b,d))!==undefined)try{h[c]=d}catch(j){}}function n(b,c,d){var e,f=p(c),g=a.cssHooks[f];c=a.cssProps[f]||f;if(g&&"get"in g&&(e=g.get(b,!0,d))!==undefined)return e;if(i)return i(b,c,f)}function o(a,b,c){var d={},e;for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}function p(a){return a.replace(e,l)}function q(b,c,d,e,f,g){var h=b.length;if(typeof c=="object"){for(var i in c)q(b,i,c[i],e,f,d);return b}if(d!==undefined){e=!g&&e&&a.isFunction(d);for(var j=0;j<h;j++)f(b[j],c,e?d.call(b[j],j,f(b[j],c)):d,g);return b}return h?f(b[0],c):undefined}function r(b){return a.isWindow(b)?b:b.nodeType===9?b.defaultView||b.parentWindow:!1}var b=document,c=/alpha\([^)]*\)/i,d=/opacity=([^)]*)/,e=/-([a-z])/ig,f=/([A-Z])/g,g=/^-?\d+(?:px)?$/i,h=/^-?\d/,i,j,k,l=function(a,b){return b.toUpperCase()};a.cssHooks={opacity:{get:function(a,b){if(!b)return a.style.opacity;var c=i(a,"opacity","opacity");return c===""?"1":c}}},a.support.opacity||(a.support.opacity={get:function(a,b){return d.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(b,d){var e=b.style;e.zoom=1;var f=a.isNaN(d)?"":"alpha(opacity="+d*100+")",g=e.filter||"";e.filter=c.test(g)?g.replace(c,f):e.filter+" "+f}}),b.defaultView&&b.defaultView.getComputedStyle&&(j=function(b,c,d){var e,g,h;d=d.replace(f,"-$1").toLowerCase();if(!(g=b.ownerDocument.defaultView))return undefined;if(h=g.getComputedStyle(b,null))e=h.getPropertyValue(d),e===""&&!a.contains(b.ownerDocument.documentElement,b)&&(e=a.style(b,d));return e}),b.documentElement.currentStyle&&(k=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;return!g.test(d)&&h.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e)),d===""?"auto":d}),i=j||k,a.fn.css=function(a,b){return arguments.length===2&&b===undefined?this:q(this,a,b,!0,function(a,b,c){return c!==undefined?m(a,b,c):n(a,b)})},a.cssNumber={zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},a.cssProps={"float":a.support.cssFloat?"cssFloat":"styleFloat"},a.style=m,a.css=n,a.swap=o,a.camelCase=p,a._each(["Height","Width"],function(b,c){var d=b.toLowerCase();a.fn["inner"+b]=function(){var a=this[0];return a&&a.style?parseFloat(n(a,d,"padding")):null},a.fn["outer"+b]=function(a){var b=this[0];return b&&b.style?parseFloat(n(b,d,a?"margin":"border")):null},a.fn[d]=function(c){var e=this[0];if(!e)return c==null?null:this;if(a.isFunction(c))return this.each(function(b){var e=a(this);e[d](c.call(this,b,e[d]()))});if(a.isWindow(e)){var f=e.document.documentElement["client"+b],g=e.document.body;return e.document.compatMode==="CSS1Compat"&&f||g&&g["client"+b]||f}if(e.nodeType===9)return Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]);if(c===undefined){var h=n(e,d),i=parseFloat(h);return a.isNaN(i)?h:i}return this.css(d,typeof c=="string"?c:c+"px")}}),a._each(["Left","Top"],function(b,c){var d="scroll"+b;a.fn[d]=function(b){var e,f;return b===undefined?(e=this[0],e?(f=r(e),f?"pageXOffset"in f?f[c?"pageYOffset":"pageXOffset"]:a.support.boxModel&&f.document.documentElement[d]||f.document.body[d]:e[d]):null):this.each(function(){f=r(this),f?f.scrollTo(c?a(f).scrollLeft():b,c?b:a(f).scrollTop()):this[d]=b})}})})$.plug("custom",function(a){var b=window,c=document,d={},e=b.location.search.substring(1).split("&");for(var f=0;f<e.length;f++){var g=e[f].split("=");d[g[0]]=unescape(g[1])}a.queryString=function(a){return d[a]};var h=a.Key=function(a){this.keyCode=a};h.namedKeys={Backspace:8,Tab:9,Enter:13,Shift:16,Ctrl:17,Alt:18,Pause:19,Capslock:20,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,LeftArrow:37,UpArrow:38,RightArrow:39,DownArrow:40,Insert:45,Delete:46},a._each(h.namedKeys,function(a,b){var c=a;h.prototype["is"+b]=function(){return this.keyCode===c}}),a.key=function(a){return a=a||window.event,new h(a.keyCode||a.which)},a.cancelEvent=function(a){return a||(a=window.event),a.cancelBubble=!0,a.returnValue=!1,a.stopPropagation&&(a.stopPropagation(),a.preventDefault()),!1},a.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},a._template=function(b,c){var d=a.templateSettings,e="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+b.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape,function(a,b){return"',_.escape("+b.replace(/\\'/g,"'")+"),'"}).replace(d.interpolate,function(a,b){return"',"+b.replace(/\\'/g,"'")+",'"}).replace(d.evaluate||null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",f=new Function("obj","_",e);return c?f(c,a):function(b){return f(b,a)}}})$.plug("docready",function(a){function i(){if(g)return;try{c.documentElement.doScroll("left")}catch(a){setTimeout(i,1);return}j()}function j(b){b===!0&&h--;if(!h||b!==!0&&!g){if(!c.body)return setTimeout(i,1);g=!0;if(b!==!0&&--h>0)return;if(f){var d,e=0,i=f;f=null;while(d=i[e++])d.call(c,a);a.fn.trigger&&a(c).trigger("ready").unbind("ready")}}}var b=window,c=document,d,e,f=[],g=!1,h=1;a.hook(function(a,b){if(typeof a=="function")return this.ready(a),!0}),a.ready=j,d=c.addEventListener?function(){c.removeEventListener("DOMContentLoaded",d,!1),j()}:function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",d),j())},a.bindReady=function(){if(e)return;e=!0;if(c.readyState==="complete")return setTimeout(j,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",d,!1),b.addEventListener("load",j,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",d),b.attachEvent("onload",j);var a=!1;try{a=window.frameElement==null}catch(f){}c.documentElement.doScroll&&a&&i()}},a.fn.ready=function(b){return a.bindReady(),g?b.call(c,a):f&&f.push(b),this},a.init||a(document).ready(a.onload)})$.plug("events",function(a){function e(a){return a._jquid||(a._jquid=d++)}function f(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):(a["e"+b+c]=c,a[b+c]=function(){a["e"+b+c](window.event)},a.attachEvent("on"+b,a[b+c]))}function g(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):(a.detachEvent("on"+b,a[b+c]),a[b+c]=null)}function h(a){var b=(""+a).split(".");return{e:b[0],ns:b.slice(1).sort().join(" ")}}function i(a){return new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)")}function j(b,d,f,g){d=h(d);if(d.ns)var j=i(d.ns);return a._filter(c[e(b)]||[],function(a){return a&&(!d.e||a.e==d.e)&&(!d.ns||j.test(a.ns))&&(!f||a.fn==f)&&(!g||a.sel==g)})}function k(b,d,g,i,j){var k=e(b),l=c[k]||(c[k]=[]);a._each(d.split(/\s/),function(c){var d=a.extend(h(c),{fn:g,sel:i,del:j,i:l.length});l.push(d),f(b,d.e,j||g)}),b=null}function l(b,d,f,h){var i=e(b);a._each((d||"").split(/\s/),function(d){a._each(j(b,d,f,h),function(a){delete c[i][a.i],g(b,a.e,a.del||a.fn)})})}function n(b){var c=a.extend({originalEvent:b},b);return a._each(m,function(a){c[a]=function(){return b[a].apply(b,arguments)}}),c}var b=document,c={},d=1;a.bind=f,a.unbind=g;var m=["preventDefault","stopImmediatePropagation","stopPropagation"],o=a.fn;a._each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a){o[a]=function(b,c){return arguments.length>0?this.bind(a,b,c):this.trigger(a)}}),o.bind=function(a,b){return this.each(function(){k(this,a,b)})},o.unbind=function(a,b){return this.each(function(){l(this,a,b)})},o.one=function(a,b){return this.each(function(){var c=this;k(this,a,function(){b(),l(c,a,arguments.callee)})})},o.delegate=function(b,c,d){return this.each(function(e,f){k(f,c,d,b,function(c){var e=c.target,g=a.$$(b,f);while(e&&g.indexOf(e)<0)e=e.parentNode;e&&e!==f&&e!==document&&d.call(e,a.extend(n(c||window.event),{currentTarget:e,liveFired:f}))})})},o.undelegate=function(a,b,c){return this.each(function(){l(this,b,c,a)})},o.live=function(c,d){return a(b.body).delegate(this.selector,c,d),this},o.die=function(c,d){return a(b.body).undelegate(this.selector,c,d),this},o.trigger=function(a){return this.each(function(){if(b.createEvent){var c=b.createEvent("Events");this.dispatchEvent(c,c.initEvent(a,!0,!0))}else if(this.fireEvent)try{this.fireEvent("on"+a)}catch(c){}})},a.init||a(window).bind("load",a.onload)})
View
2 dist/jquip.events.min.js
@@ -1 +1 @@
-$.plug("events",function(a){function e(a){return a._jquid||(a._jquid=d++)}function f(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):(a["e"+b+c]=c,a[b+c]=function(){a["e"+b+c](window.event)},a.attachEvent("on"+b,a[b+c]))}function g(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):(a.detachEvent("on"+b,a[b+c]),a[b+c]=null)}function h(a){var b=(""+a).split(".");return{e:b[0],ns:b.slice(1).sort().join(" ")}}function i(a){return new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)")}function j(b,d,f,g){d=h(d);if(d.ns)var j=i(d.ns);return a._filter(c[e(b)]||[],function(a){return a&&(!d.e||a.e==d.e)&&(!d.ns||j.test(a.ns))&&(!f||a.fn==f)&&(!g||a.sel==g)})}function k(b,d,g,i,j){var k=e(b),l=c[k]||(c[k]=[]);a._each(d.split(/\s/),function(c){var d=a.extend(h(c),{fn:g,sel:i,del:j,i:l.length});l.push(d),f(b,d.e,j||g)}),b=null}function l(b,d,f,h){var i=e(b);a._each((d||"").split(/\s/),function(d){a._each(j(b,d,f,h),function(a){delete c[i][a.i],g(b,a.e,a.del||a.fn)})})}function n(b){var c=a.extend({originalEvent:b},b);return a._each(m,function(a){c[a]=function(){return b[a].apply(b,arguments)}}),c}var b=document,c={},d=1;a.bind=f,a.unbind=g;var m=["preventDefault","stopImmediatePropagation","stopPropagation"],o=a.fn;a._each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a){o[a]=function(b,c){return arguments.length>0?this.bind(a,b,c):this.trigger(a)}}),o.bind=function(a,b){return this.each(function(){k(this,a,b)})},o.unbind=function(a,b){return this.each(function(){l(this,a,b)})},o.one=function(a,b){return this.each(function(){var c=this;k(this,a,function(){b(),l(c,a,arguments.callee)})})},o.delegate=function(b,c,d){return this.each(function(e,f){k(f,c,d,b,function(c){var e=c.target,g=a.$$(b,f);while(e&&g.indexOf(e)<0)e=e.parentNode;e&&e!==f&&e!==document&&d.call(e,a.extend(n(c||window.event),{currentTarget:e,liveFired:f}))})})},o.undelegate=function(a,b,c){return this.each(function(){l(this,b,c,a)})},o.live=function(c,d){return a(b.body).delegate(this.selector,c,d),this},o.die=function(c,d){return a(b.body).undelegate(this.selector,c,d),this},o.trigger=function(a){return this.each(function(){if(b.createEvent){var c=b.createEvent("Events");this.dispatchEvent(c,c.initEvent(a,!0,!0))}else this.fireEvent&&this.fireEvent("on"+a)})},a.init||a(window).bind("load",a.onload)})
+$.plug("events",function(a){function e(a){return a._jquid||(a._jquid=d++)}function f(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):(a["e"+b+c]=c,a[b+c]=function(){a["e"+b+c](window.event)},a.attachEvent("on"+b,a[b+c]))}function g(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):(a.detachEvent("on"+b,a[b+c]),a[b+c]=null)}function h(a){var b=(""+a).split(".");return{e:b[0],ns:b.slice(1).sort().join(" ")}}function i(a){return new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)")}function j(b,d,f,g){d=h(d);if(d.ns)var j=i(d.ns);return a._filter(c[e(b)]||[],function(a){return a&&(!d.e||a.e==d.e)&&(!d.ns||j.test(a.ns))&&(!f||a.fn==f)&&(!g||a.sel==g)})}function k(b,d,g,i,j){var k=e(b),l=c[k]||(c[k]=[]);a._each(d.split(/\s/),function(c){var d=a.extend(h(c),{fn:g,sel:i,del:j,i:l.length});l.push(d),f(b,d.e,j||g)}),b=null}function l(b,d,f,h){var i=e(b);a._each((d||"").split(/\s/),function(d){a._each(j(b,d,f,h),function(a){delete c[i][a.i],g(b,a.e,a.del||a.fn)})})}function n(b){var c=a.extend({originalEvent:b},b);return a._each(m,function(a){c[a]=function(){return b[a].apply(b,arguments)}}),c}var b=document,c={},d=1;a.bind=f,a.unbind=g;var m=["preventDefault","stopImmediatePropagation","stopPropagation"],o=a.fn;a._each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a){o[a]=function(b,c){return arguments.length>0?this.bind(a,b,c):this.trigger(a)}}),o.bind=function(a,b){return this.each(function(){k(this,a,b)})},o.unbind=function(a,b){return this.each(function(){l(this,a,b)})},o.one=function(a,b){return this.each(function(){var c=this;k(this,a,function(){b(),l(c,a,arguments.callee)})})},o.delegate=function(b,c,d){return this.each(function(e,f){k(f,c,d,b,function(c){var e=c.target,g=a.$$(b,f);while(e&&g.indexOf(e)<0)e=e.parentNode;e&&e!==f&&e!==document&&d.call(e,a.extend(n(c||window.event),{currentTarget:e,liveFired:f}))})})},o.undelegate=function(a,b,c){return this.each(function(){l(this,b,c,a)})},o.live=function(c,d){return a(b.body).delegate(this.selector,c,d),this},o.die=function(c,d){return a(b.body).undelegate(this.selector,c,d),this},o.trigger=function(a){return this.each(function(){if(b.createEvent){var c=b.createEvent("Events");this.dispatchEvent(c,c.initEvent(a,!0,!0))}else if(this.fireEvent)try{this.fireEvent("on"+a)}catch(c){}})},a.init||a(window).bind("load",a.onload)})
View
4 src/jquip.events.js
@@ -130,7 +130,9 @@ $['plug']("events", function($){
var e = doc.createEvent('Events');
this.dispatchEvent(e, e.initEvent(evt, true, true));
} else if (this.fireEvent)
- this.fireEvent("on" + evt);
+ try {
+ this.fireEvent("on" + evt);
+ } catch(e){}
});
};
if (!$['init']) $(window)['bind']("load",$['onload']);

0 comments on commit ce3541b

Please sign in to comment.
Something went wrong with that request. Please try again.