-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.min-0.2.js
26 lines (26 loc) · 48.2 KB
/
karma.min-0.2.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
* Karmagination 0.2 - Fast and Easy
* http://www.karmagination.com
* Released under the MIT, BSD, and GPL Licenses - Choose one that fit your needs
* Copyright (c) 2009 Kean L. Tan
* Start date: 2009-04-01
* Build Time: 2009-09-01 09:26:51 PM
* Build: 2165
*
* Attribution:
* onDOMready based on many JS experts' input especially Dean Edwards, see the unminified source code for names
* Custom events based on Dean Edwards' blog post enlightenment
* CSS and browser detection copyright Valerio Proietti of Mootools
* Offsets, dimensions, and extend copyright John Resig of jQuery
* Selector engine, Sizzle, founded by John Resig, copyright Dojo Foundation
* Common Feature Test, event support detection copyright Juriy Zaytsev/kangax
* Animation based loosely on Ryan Morr's FX library
*/
(function karma_anonymous(){var d=this,a=this.document,c=this.Karma,f=this.$;var e=this.$=this.Karma=function(j,i){if(this.constructor!==e){return new e(j,i)}j=j||a;this.context=i=i||a;this.KarmaStack=[];var g=[];if(j.nodeType||j===d){this[0]=j;this.length=1;this.query=j;return}else{if(typeof j=="string"){this.query=j=e.trim(j);if(!j.length){this[0]=a;this.length=1;this.query=j;return}var i=this.context.ownerDocument||this.context;g=e.isHTML(j)?e.HTMLtoNode(j,i):e.Sizzle(j,i)}else{if(typeof j=="function"){(!e.isReady)?e.readyQueue(function h(){j(e)}):j(e);return}else{g=j;if(j.query){this.query=j.query}}}}this.populate(g)};e.fn=e.prototype;e.extend=e.fn.extend=function(){var n=arguments[0]||{},k=1,m=arguments.length,g=false,j;if(typeof n=="boolean"){g=n;n=arguments[1]||{};k=2}if(typeof n!="object"&&typeof n!="function"){n={}}if(m==k){n=this;--k}for(;k<m;k++){if((j=arguments[k])!=null){for(var h in j){var p=n[h],q=j[h];if(n===q){continue}if(g&&q&&typeof q=="object"&&!q.nodeType){n[h]=e.extend(g,p||(q.length!=null?[]:{}),q)}else{if(typeof q!="undefined"){n[h]=q}}}}}return n};e.fn.extend({populate:function(g,h){h=h||0;this.length=h;g=e.makeArray(g);if(!g.length){return this}Array.prototype.push.apply(this,g);return this},wipe:function(h){h=h||0;for(var g=h;g<this.length;g++){delete this[g]}this.length=h;return this},stack:function(g){this.query=g.query;this.KarmaStack.push(g);return this},end:function(){return this.KarmaStack[0]},length:0,query:null,isKarma:0.2});e.extend({HTMLtoNode:function(j,i){i=i||a;var j=e.cleanHTML(j);var h=(i===d)?e.temp.div.cloneNode(false):i.createElement("DIV"),g=j.substring(0,8).toLowerCase();if(!g.indexOf("<tr")){j="<table>"+j+"</table>";h.innerHTML=j;h=h.firstChild.firstChild}else{if(!g.indexOf("<td")||!g.indexOf("<th")){j="<table><tr>"+j+"</tr></table>";h.innerHTML=j;h=h.firstChild.firstChild.firstChild}else{if(!g.indexOf("<legend")){j="<fieldset>"+j+"</fieldset>";h.innerHTML=j;h=h.firstChild}else{if(!g.indexOf("<option")){j='<select multiple="multiple">'+j+"</select>";h.innerHTML=j;h=h.firstChild}else{if(/^<thead|tbody|tfoot|colg|capt/.test(g)){j="<table>"+j+"</table>";h.innerHTML=j;h=h.firstChild}else{if(!g.indexOf("<col")){j="<table><colgroup>"+j+"</colgroup></table>";h.innerHTML=j;h=h.firstChild.firstChild.firstChild}else{if(!g.indexOf("<script")||!g.indexOf("<link")){j="div<div>"+j+"</div>";h.innerHTML=j;h=h.lastChild}else{h.innerHTML=j}}}}}}}return h.childNodes.length?e.makeArray(h.childNodes):null},isArray:function(g){return Object.prototype.toString.call(g)=="[object Array]"},isObject:function(g){return Object.prototype.toString.call(g)=="[object Object]"},isDate:function(g){return Object.prototype.toString.call(g)=="[object Date]"},isGenericObject:function(g){return typeof g=="object"},isFunction:function(g){return typeof g=="function"},isString:function(g){return typeof g=="string"},isNumber:function(g){return typeof g=="number"},isValue:function(g){return typeof g=="number"||typeof g=="string"},isBoolean:function(g){return typeof g=="boolean"},isDefined:function(g){return typeof g!="undefined"},isHTML:function(g){return e.isString(g)?/^<.+/.test(g.substring(0,3)):false},isKarma:function(g){return g.constructor===e},isIE:!!(!d.addEventListener&&d.ActiveXObject),isIE6:typeof a.createElement("DIV").style.maxHeight=="undefined",isIE7:!!(!d.addEventListener&&d.XMLHttpRequest&&!a.querySelectorAll),isIE8:!!(!d.addEventListener&&a.querySelectorAll),isGecko:navigator.product=="Gecko",isOpera:!!d.opera,isWebkit:!!(!d.opera&&!navigator.taintEnable&&a.evaluate&&navigator.product!="Gecko"),cleanHTML:function(g){return g.replace?g.replace(/[\n\r]/g," "):g},makeArray:function(k){if(e.isArray(k)){return k}if(e.support.nodeListToArray){return Array.prototype.slice.call(k)}var g=[];if(k.length){for(var h=0;h<k.length;h++){g.push(k[h])}}else{var j=0;for(var m in k){g[m]=k[m];j++}g.length=j}return g},noConflict:function(g){d.$=f;if(g){d.Karma=c}return e},unique:function(m){var h=[];o:for(var j=0,k=m.length;j<k;j++){for(var g=j+1;g<k;g++){if(m[g]===m[j]){continue o}}h.push(m[j])}return h},readyFunctions:[],isReady:false,readyQueue:function(g){if(e.isFunction(g)){e.readyFunctions.push(g)}},ready:function(){var h=function(){if(e.isReady){return}e.isReady=true;for(var j=0;j<e.readyFunctions.length;j++){e.readyFunctions[j](e)}};if(e.support.addEventListener){a.addEventListener("DOMContentLoaded",h,false)}else{if(a.documentElement.doScroll){try{a.createElement("div").doScroll("left");return h()}catch(g){}}else{if(/loaded|complete/.test(a.readyState)){return h()}}}if(!e.isReady){setTimeout(arguments.callee,88)}}});e.browser={safari:e.isWebkit,opera:e.isOpera,mozilla:e.isGecko,msie:e.isIE};e.temp={div:a.createElement("DIV"),fragment:a.createDocumentFragment(),camelCase:{},nodeListToArray:function(){try{return Array.prototype.slice.call(a.forms,0) instanceof Array}catch(g){return false}},attrMap:{"for":"htmlFor","class":"className",maxlength:"maxLength",readonly:"readOnly",rowspan:"rowSpan",colspan:"colSpan",codebase:"codeBase",ismap:"isMap",accesskey:"accessKey",longdesc:"longDesc",tabindex:"tabIndex",valign:"vAlign",cellspacing:"cellSpacing",cellpadding:"cellPadding",id:"id",href:"href",dir:"dir",src:"src",title:"title",type:"type"},offsets:function(){var n=a.body,g=a.createElement("div"),i,h,r,j,q,p,k=a.body.style.marginTop,m='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';var q={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(p in q){g.style[p]=q[p]}g.innerHTML=m;n.insertBefore(g,n.firstChild);i=g.firstChild,h=i.firstChild,j=i.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(h.offsetTop!==5);this.doesAddBorderForTableAndCells=(j.offsetTop===5);i.style.overflow="hidden",i.style.position="relative";this.subtractsBorderForOverflowNotVisible=(h.offsetTop===-5);n.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(n.offsetTop===0);n.style.marginTop=k;n.removeChild(g)},calculatedOffsets:false};e.uniqueId=0;e.storage={};e.support={cssText:"cssText" in e.temp.div.style,cssFloat:"cssFloat" in e.temp.div.style,styleFloat:"styleFloat" in e.temp.div.style,opacity:"opacity" in e.temp.div.style,filter:"filter" in e.temp.div.style,outerHTML:"outerHTML" in e.temp.div,addEventListener:"addEventListener" in e.temp.div,attachEvent:"attachEvent" in e.temp.div,dispatchEvent:"dispatchEvent" in e.temp.div,fireEvent:"fireEvent" in e.temp.div,createEvent:"createEvent" in a,createEventObject:"createEventObject" in a,nodeListToArray:e.temp.nodeListToArray(),currentDocIsHTML:"innerHTML" in a.documentElement};e.ready();e.fn.extend({append:function(h){var g=e(h);if(!this.length||!g.length){return this}return e.temp.manipulate("append",g,this,g.query)},appendTo:function(h){var g=e(h);if(!this.length||!g.length){return this}return e.temp.manipulate("append",this,g,this.query,1)},prepend:function(h){var g=e(h);if(!this.length||!g.length){return this}return e.temp.manipulate("prepend",g,this,g.query)},prependTo:function(h){var g=e(h);if(!this.length||!g.length){return this}return e.temp.manipulate("prepend",this,g,this.query,1)},before:function(h){var g=e(h);if(!this.length||!g.length){return this}return e.temp.manipulate("before",g,this,g.query)},insertBefore:function(h){var g=e(h);if(!this.length||!g.length){return this}return e.temp.manipulate("before",this,g,this.query,1)},after:function(h){var g=e(h);if(!this.length||!g.length){return this}return e.temp.manipulate("after",g,this,g.query)},insertAfter:function(h){var g=e(h);if(!this.length||!g.length){return this}return e.temp.manipulate("after",this,g,this.query,1)},empty:function(){for(var g=0;g<this.length;g++){if(e.support.currentDocIsHTML){this[g].innerHTML=""}else{while(this[g].firstChild){if(this[g].firstChild.KarmaMap){e.storage[this[g].KarmaMap]=null}this[g].removeChild(this[g].firstChild)}}}return this},html:function(h){if(e.isValue(h)){for(var g=0;g<this.length;g++){this[g].innerHTML=h}return this}return this.length?this[0].innerHTML:null},text:function(h){if(e.isValue(h)){for(var g=0;g<this.length;g++){this[g].innerText?this[g].innerText=h:this[g].textContent=h}return this}var j=[];for(var g=0;g<this.length;g++){j.push(this[g].innerText||this[g].textContent)}return j.join(" ")},remove:function(j){var g=e.isString(j)?e.Sizzle.filter(j,this):this.length?this:[];for(var h=0;h<g.length;h++){if(g[h].KarmaMap){e.storage[g[h].KarmaMap]=null}g[h].parentNode.removeChild(g[h])}return this},clone:function(h){var n=[],m;for(var g=0;g<this.length;g++){if(e.support.outerHTML){n.push(e(this[g].outerHTML,this[g].ownerDocument||this[g])[0]);m=e(n[g]);m[0].KarmaMap=++e.uniqueId;e.storage[m[0].KarmaMap]={};if(h){for(var k in e.storage[this[g].KarmaMap].KarmaEvent){e.storage[m[0].KarmaMap][k]=[];for(var j in e.storage[this[g].KarmaMap].KarmaEvent[k]){e.storage[m[0].KarmaMap][k][j]=e.storage[this[g].KarmaMap].KarmaEvent[k][j]}}}}else{n.push(this[g].cloneNode(true));m=e(n[g]);if(h){for(var k in e.storage[this[g].KarmaMap].KarmaEvent){for(var j in e.storage[this[g].KarmaMap].KarmaEvent[k]){m.bind(k,e.storage[this[g].KarmaMap].KarmaEvent[k][j])}}}}}return e(n).stack(this)},wrap:function(j){for(var h=0;h<this.length;h++){var g=e(j,this[h].ownerDocument||this[h]).clone()[0];this[h].parentNode.replaceChild(g,this[h]);g.appendChild(this[h])}return this}});e.extend(e.temp,{manipulate:function(g,k,t,s,q){var r=k[0];if(k.length>1){r=e.temp.fragment.cloneNode(false);for(var n=0;n<k.length;n++){r.appendChild(k[n])}}if(e.isHTML(s)){var p=[];for(var n=0;n<t.length;n++){var u=t.length>1?r.cloneNode(true):r;if(q){if(u.nodeType===11){var h=e.makeArray(u.childNodes);for(var m=0;m<h.length;m++){p.push(h[m])}}else{p.push(u)}}if(g=="append"){t[n].appendChild(u)}else{if(g=="prepend"){t[n].insertBefore(u,t[n].firstChild)}else{if(g=="before"){t[n].parentNode.insertBefore(u,t[n])}else{if(g=="after"){t[n].nextSibling?t[n].parentNode.insertBefore(u,t[n].nextSibling):t[n].parentNode.appendChild(u)}}}}}return q?e(p):t}else{if(g=="append"){t[0].appendChild(r)}else{if(g=="prepend"){t[0].insertBefore(r,t[0].firstChild)}else{if(g=="before"){t[0].parentNode.insertBefore(r,t[0])}else{if(g=="after"){t[0].nextSibling?t[0].parentNode.insertBefore(r,t[0].nextSibling):t[0].parentNode.appendChild(r)}}}}}return q?k:t}});e.fn.extend({pedal:function(g,n,m){var k=[];for(var h=0;h<this.length;h++){var j=this[h][n];while(j){if(j.nodeType==1){k.push(j);if(!g){break}}j=j[n]}}k=(e.isString(m))?e.Sizzle.filter(m,e.unique(k)):e.unique(k);return e(k).stack(this)},next:function(g){return this.pedal(false,"nextSibling",g)},nextAll:function(g){return this.pedal(true,"nextSibling",g)},prev:function(g){return this.pedal(false,"previousSibling",g)},prevAll:function(g){return this.pedal(true,"previousSibling",g)},siblings:function(p){var n=this,r=[];for(var k=0;k<n.length;k++){var g=n[k],q=n[k].parentNode;for(var h=0;h<q.childNodes.length;h++){var m=q.childNodes[h];if(m.nodeType==1&&m!=g){r.push(m)}}}r=(e.isString(p))?e.Sizzle.filter(p,e.unique(r)):e.unique(r);return e(r).stack(this)},parent:function(k){var j=this,h=[];for(var g=0;g<j.length;g++){if(j[g].parentNode){h.push(j[g].parentNode)}}h=(e.isString(k))?e.Sizzle.filter(k,e.unique(h)):e.unique(h);return e(h).stack(this)},ancestors:function(m){var k=this,j=[];for(var g=0;g<k.length;g++){var h=k[g].parentNode;while(h!==a){j.push(h);h=h.parentNode||a}}j=(e.isString(m))?e.Sizzle.filter(m,e.unique(j)):e.unique(ancestorss);return e(j).stack(this)},children:function(n){var m=this,k=[];for(var h=0;h<m.length;h++){for(var g=0;g<m[h].childNodes.length;g++){if(m[h].childNodes[g].nodeType==1){k.push(m[h].childNodes[g])}}}if(e.isString(n)){k=e.Sizzle.filter(n,k)}return e(k).stack(this)},index:function(h){var g=(h.nodeType)?h:e(h)[0];return e.inArray(g,this)},slice:function(h,g){return e(Array.prototype.slice.call(this,h,g)).stack(this)},eq:function(g){return this[g]?e(this[g]).stack(this):e([]).stack(this)},get:function(g){return e.isValue(g)&&this.length?e.makeArray(this):this[g]},descendents:function(j){var g=[];for(var h=0;h<this.length;h++){g=e.merge(g,e.Sizzle(j,this[h]))}return e(e.unique(g)).stack(this)},filter:function(g){return g?e(e.Sizzle.filter(g,this)).stack(this):this},is:function(g){return g?!!e.Sizzle.filter(g,this).length:false},not:function(g){return g?e(e.Sizzle(":not("+g+")",this)).stack(this):this},add:function(g){return g?e(this).populate(e(g),this.length).stack(this):this},andSelf:function(){return this.KarmaStack.length?e(this).populate(this.KarmaStack[0],this.length).stack(this):this},each:function(h){for(var g=0;g<this.length;g++){h.call(this[g],g)}return this},map:function(j){var g=[];for(var h=0;h<this.length;h++){g.push(j.call(this[h],h))}return g},grep:function(k){var h=[];for(var j=0;j<this.length;j++){var g=k.call(this[j],j);if(g!==false){h.push(g)}}return this}});e.fn.extend({find:e.fn.descendents,parents:e.fn.ancestors});e.fn.extend({attr:function(j,h){if(e.isString(j)&&(e.isValue(h))){for(var g=0;g<this.length;g++){if(e.temp.attrMap[j]&&e.isDefined(this[g][e.temp.attrMap[j]])){this[g][e.temp.attrMap[j]]=h}else{if(j=="style"&&e.support.cssText){this[g].style.cssText=h}else{this[g].setAttribute(j,h)}}}return this}else{if(e.isObject(j)){for(property in j){this.attr(property,j[property])}return this}}return this.length?this[0].getAttribute(j):null},removeAttr:function(j){for(var g=0;g<this.length;g++){if(e.temp.attrMap[j]&&e.isDefined(this[g][e.temp.attrMap[j]])){this[g][e.temp.attrMap[j]]=""}else{if(j=="style"&&e.support.cssText){this[g].style.cssText=""}}try{this[g].removeAttribute(j)}catch(h){}}return this},data:function(h,j){if(e.isDefined(j)){for(var g=0;g<this.length;g++){e.data(this[g],h,j)}return this}return this[0]?e.data(this[0],h):null},removeData:function(h){if(e.isValue(h)){for(var g=0;g<this.length;g++){try{e.storage[this[g].KarmaMap].KarmaData[h]=null}catch(j){}}}return this},addClass:function(h){var j=" "+h+" ";for(var g=0;g<this.length;g++){if(this[g].classList){this[g].classList.add(h)}else{if((" "+this[g].className+" ").indexOf(j)<0){this[g].className.length?this[g].className+=" "+h:this[g].className=h}}}return this},removeClass:function(h){for(var g=0;g<this.length;g++){this[g].classList?this[g].classList.remove(h):this[g].className=e.trim(this[g].className.replace(h,""))}return this},hasClass:function(h){var i=" "+h+" ",g=false;if(this.length){g=this[0].classList?this[0].classList.contains(h):(" "+this[0].className+" ").indexOf(i)>=0}return g},toggleClass:function(j){var k=" "+j+" ";for(var g=0;g<this.length;g++){if(this[g].classList){this[g].classList.toggle(j)}else{var h=" "+this[g].className+" ";this[g].className=h.indexOf(k)>=0?h.replace(k,""):h+=k;this[g].className=e.trim(this[g].className)}}return this},val:function(h){if(e.isValue(h)){for(var g=0;g<this.length;g++){if(e.isDefined(this[g].value)){this[g].value=h}}return this}return(this[0]&&e.isString(this[0].value))?this[0].value:null},serialize:function(){var h="";for(var j=0;j<this.length;j++){var g=this[j].getAttribute("name");if(g&&g.length){var k=this[j].value||"";if(this[j].nodeName.toLowerCase()=="input"&&this[j].getAttribute("type").toLowerCase()=="checkbox"&&!this[j].checked){h+=encodeURIComponent(g)+"=&"}else{h+=encodeURIComponent(g)+"="+encodeURIComponent(k)+"&"}}}return h.length?h.substring(0,h.length-1):""}});e.extend({data:function(h,g,i){if(e.isDefined(i)){var j=0;if(h!==d){j=h.KarmaMap=h.KarmaMap||++e.uniqueId}e.storage[j]=e.storage[j]||{};e.storage[j].KarmaData=e.storage[j].KarmaData||{};e.storage[j].KarmaData[g]=i}return e.storage&&e.storage[h.KarmaMap]&&e.storage[h.KarmaMap].KarmaData&&e.storage[h.KarmaMap].KarmaData[g]?e.storage[h.KarmaMap].KarmaData[g]:null}});e.extend({ajax:function(h){h=e.extend({type:"GET",data:null,url:"",contentType:null,cache:false,loading:function(){},success:function(){},error:function(){},XHR:d.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP")},h);if(h.XHR===null||typeof h.XHR=="undefined"||!h.url.length){return}h.XHR.onreadystatechange=function(){try{if(h.XHR.readyState===4&&!h.successDone){h.success(h.XHR.responseText);h.successDone=true}if(h.XHR.status!=200&&!h.errorDone){h.error(h.XHR.responseText);h.successDone=true;h.errorDone=true}}catch(i){}};var g=h.url;if(h.type.toLowerCase()=="get"&&h.data){h.cache?g+="?karma_ts="+new Date().getTime()+"&"+h.data:g+="?"+h.data}h.XHR.open(h.type,g,true);h.loading();if(h.contentType){h.XHR.setRequestHeader("Content-Type",h.contentType)}(h.type.toLowerCase()=="post"&&h.data)?h.XHR.send(h.data):h.XHR.send(null)}});e.extend({getScript:function(k,p){var g=0,j=[],h=false,n=k.length||1;var q=function(){g++;if(!h&&g>=n){h=true;p()}};for(var m=0;m<n;m++){j[m]=a.createElement("SCRIPT");j[m].type="text/javascript";j[m].src=k[m]||k;a.documentElement.insertBefore(j[m],a.documentElement.firstChild);if(j[m].readyState){j[m].onreadystatechange=function(){if(j[m].readyState=="loaded"||j[m].readyState=="complete"){j[m].onreadystatechange=null;q()}}}else{j[m].onload=q}}}});e.include=e.getScript;e.fn.extend({bind:function(t,v,r){if(!this.length||!e.isString(t)||!e.isFunction(v)){return this}t=t.split(/\s+/);var q={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img",unload:"window",resize:"window"};var x=function(i){var y=q[i]?a.createElement(q[i]):e.temp.div;var A=y;if(q[i]=="window"){A=d}var z="on"+i,j=!!(z in A);if(!j){if(A===d){A=y}A.setAttribute(z,"return;");j=typeof A[z]=="function"}y=null;e.event.support=e.event.support||{};e.event.support[i]=j;return j};o:for(var k=0;k<t.length;k++){var w=t[k].split(".");if(e.event.special[w[0]]){var s=[];for(var p=0;p<arguments.length;p++){if(e.isFunction(arguments[p])){s.push(arguments[p])}}e.event.special[w[0]].setup.apply(this,s);continue o}for(var p=0;p<this.length;p++){if(!(this[p].nodeType==3||this[p].nodeType==8)){var h=0;if(this[p]!==d){h=this[p].KarmaMap=this[p].KarmaMap||++e.uniqueId}e.storage[h]=e.storage[h]||{};var n=e.storage[h].KarmaEvent=e.storage[h].KarmaEvent||{};n[w[0]]=n[w[0]]||[];if(r){var m=e.data(this.context,"KarmaLive")||{};m[w[0]]=m[w[0]]||{};m[w[0]][r]=m[w[0]][r]||[];if(w.length==1){m[w[0]][r].push(v)}else{if(w.length==2){m[w[0]][r][w[1]]=v}}e.data(this.context,"KarmaLive",m)}else{if(w.length==1){n[w[0]].push(v)}else{if(w.length==2){n[w[0]][w[1]]=v}}}if(e.event.support[w[0]]||(e.event.support[w[0]]!==false&&x(w[0]))){if(!e.isFunction(this[p]["on"+w[0]])){this[p]["on"+w[0]]=e.event.caller}}else{if(a.addEventListener){var u=0;for(var g in n[w[0]]){u++}if(!u){this[p].addEventListener(w[0],e.event.caller,false)}}else{this[p].customEvents=0;if(!e.isFunction(this[p].onpropertychange)){this[p].onpropertychange=e.event.caller}}}}}}return this},unbind:function(s,t,r){if(!s||!this.length){return this}var k=s.split(/\s+/);for(var m=0;m<k.length;m++){var u=k[m].split(".");for(var q=0;q<this.length;q++){var h=this===d?0:this[q].KarmaMap;var p=e.data(this[q],"KarmaLive");if(r){if(p&&p[u[0]]&&p[u[0]][r]){if(e.isFunction(t)){for(var t in p[u[0]][r]){if(p[u[0]][r][t]==t){delete p[u[0]][r][t]}}}else{if(u.length>1){delete p[u[0]][r][u[1]]}else{if(u.length==1){delete p[u[0]][r]}}}}}else{if(e.storage[h]&&e.storage[h].KarmaEvent){var n=e.storage[h].KarmaEvent;if(e.isFunction(t)){for(var g in n[u[0]]){if(n[u[0]][g]==t){delete n[u[0]][g]}}}else{if(u.length>1&&n[u[0]]){delete n[u[0]][u[1]]}else{if(n[u[0]]){this[q]["on"+u[0]]=null;delete n[u[0]]}}}}}}}return this},one:function(h,g){this.on(h,g);if(this.data("triggerOnce")===null){}this.data("triggerOnce",[]);this.data("triggerOnce").push(g);return this},triggerHandler:function(g){this.trigger(g,true)},trigger:function(k,r){try{for(var h=0;h<this.length;h++){var j=this[h]}if(e.support.createEvent){if(!j.dispatchEvent){j=a}var q=e.event[k];if(q){var g=a.createEvent(q.type);q.init(g,{});if(r){g.stopPropagation();g.preventDefault()}j.dispatchEvent(g)}else{var n=a.createEvent("UIEvents");n.initEvent(k,false,false);if(r){n.stopPropagation();n.preventDefault()}j.dispatchEvent(n)}}else{if(e.support.createEventObject){if(e.event.support[k]){j=(j===a||j===d)?a.documentElement:j;var g=a.createEventObject();if(r){g.cancelBubble=true;g.returnValue=false}j.fireEvent("on"+k,g)}else{var p=e(j).data("fireEvent")||[];p.push(k);e(j).data("fireEvent",p);j.customEvents++}}}}catch(m){}return this},live:function(h,g){return e(this.context).bind(h,g,this.query)},die:function(h,g){return e(this.context).unbind(h,g,this.query)}});if(e.support.createEvent){e.event={load:{type:"HTMLEvents",init:function(g){g.initEvent("load",false,false)}},unload:{type:"HTMLEvents",init:function(g){g.initEvent("unload",false,false)}},select:{type:"HTMLEvents",init:function(g){g.initEvent("select",true,false)}},change:{type:"HTMLEvents",init:function(g){g.initEvent("change",true,false)}},submit:{type:"HTMLEvents",init:function(h,g){h.initEvent("submit",true,true)}},reset:{type:"HTMLEvents",init:function(g){g.initEvent("reset",true,false)}},resize:{type:"HTMLEvents",init:function(g){g.initEvent("resize",true,false)}},scroll:{type:"HTMLEvents",init:function(g){g.initEvent("scroll",true,false)}},click:{type:"MouseEvents",init:function(h,g){h.initMouseEvent("click",true,true,d,1,g.screenX||0,g.screenY||0,g.clientX||0,g.clientY||0,g.ctrlKey||false,g.altKey||false,g.shiftKey||false,g.metaKey||false,g.button||0,g.relatedTarget||null)}},dblclick:{type:"MouseEvents",init:function(h,g){h.initMouseEvent("click",true,true,d,2,g.screenX||0,g.screenY||0,g.clientX||0,g.clientY||0,g.ctrlKey||false,g.altKey||false,g.shiftKey||false,g.metaKey||false,g.button||0,g.relatedTarget||null)}},mousedown:{type:"MouseEvents",init:function(h,g){h.initMouseEvent("mousedown",true,true,d,1,g.screenX||0,g.screenY||0,g.clientX||0,g.clientY||0,g.ctrlKey||false,g.altKey||false,g.shiftKey||false,g.metaKey||false,g.button||0,g.relatedTarget||null)}},mouseup:{type:"MouseEvents",init:function(h,g){h.initMouseEvent("mouseup",true,true,d,1,g.screenX||0,g.screenY||0,g.clientX||0,g.clientY||0,g.ctrlKey||false,g.altKey||false,g.shiftKey||false,g.metaKey||false,g.button||0,g.relatedTarget||null)}},mouseover:{type:"MouseEvents",init:function(h,g){h.initMouseEvent("mouseover",true,true,d,1,g.screenX||0,g.screenY||0,g.clientX||0,g.clientY||0,g.ctrlKey||false,g.altKey||false,g.shiftKey||false,g.metaKey||false,g.button||0,g.relatedTarget||null)}},mousemove:{type:"MouseEvents",init:function(h,g){h.initMouseEvent("mousemove",true,true,d,1,g.screenX||0,g.screenY||0,g.clientX||0,g.clientY||0,g.ctrlKey||false,g.altKey||false,g.shiftKey||false,g.metaKey||false,g.button||0,g.relatedTarget||null)}},mouseout:{type:"MouseEvents",init:function(h,g){h.initMouseEvent("mouseout",true,true,d,1,g.screenX||0,g.screenY||0,g.clientX||0,g.clientY||0,g.ctrlKey||false,g.altKey||false,g.shiftKey||false,g.metaKey||false,g.button||0,g.relatedTarget||null)}},focusin:{type:"UIEvents",init:function(g){g.initUIEvent("focusin",true,false,d,1)}},focusout:{type:"UIEvents",init:function(g){g.initUIEvent("focusout",true,false,d,1)}},activate:{type:"UIEvents",init:function(g){g.initUIEvent("activate",true,true,d,1)}},focus:{type:"UIEvents",init:function(g){g.initUIEvent("focus",false,false,d,1)}},blur:{type:"UIEvents",init:function(g){g.initUIEvent("blur",false,false,d,1)}}}}else{e.event={}}e.event.support={};e.event.special={hover:{setup:function(){var g=arguments;this.bind("mouseover",function(h){h.stopPropagation();return g[0].call(this,h)}).bind("mouseout",function(h){h.stopPropagation();return g[1].call(this,h)})},teardown:function(){this.unbind("mouseover").unbind("mouseout")}}};e.event.caller=function(w){var y=this===d?0:this.KarmaMap;w=d.event||w;if(!w.stopPropagation&&d.event){w.stopPropagation=function(){d.event.cancelBubble=true}}if(!w.preventDefault&&d.event){w.preventDefault=function(){d.event.returnValue=false}}if(!w.target&&w.srcElement){w.target=w.srcElement||a}try{if(w.type=="mouseover"&&!("relatedTarget" in w)){w.relatedTarget=w.fromElement}else{if(w.type=="mouseout"&&!("relatedTarget" in w)){w.relatedTarget=w.toElement}}if(w.wheelDelta){w.wheelDiff=w.wheelDelta/120;if(e.isOpera){w.wheelDiff=-w.wheelDiff}}else{if(w.detail){w.wheelDiff=-w.detail/3}}if(w.target.nodeType==3){w.target=w.target.parentNode}if(w.pageX==null&&w.clientX!=null){var A=a.documentElement,r=a.body;w.pageX=w.clientX+(A&&A.scrollLeft||r&&r.scrollLeft||0)-(A.clientLeft||0);w.pageY=w.clientY+(A&&A.scrollTop||r&&r.scrollTop||0)-(A.clientTop||0)}if(!w.which&&((w.charCode||w.charCode===0)?w.charCode:w.keyCode)){w.which=w.charCode||w.keyCode}if(!w.metaKey&&w.ctrlKey){w.metaKey=w.ctrlKey}if(!w.which&&w.button){w.which=(w.button&1?1:(w.button&2?3:(w.button&4?2:0)))}}catch(w){}var k=e.data(this.ownerDocument||a,"KarmaLive");if(k&&k[w.type]){var s=[],u=[],g=[],j=w.target;while(j){g.push(j);j=j.parentNode}for(var n in k[w.type]){var q=e.Sizzle.filter(n,g);if(q.length){for(var v=0;v<g.length;v++){if(g[v]===q[0]){s[v]=n;u[v]=q[0]}}}}for(var v=0;v<s.length;v++){if(s[v]&&k[w.type][s[v]]){var m=0;for(var x in k[w.type][s[v]]){if(k[w.type][s[v]][x].call(u[v],w)===false){w.preventDefault();w.stopPropagation();m++}}if(m){break}}}}if(w.propertyName=="customEvents"){var h=$(this).data("fireEvent");for(var p in h){try{for(var t in e.storage[y].KarmaEvent[h[p]]){if(e.storage[y].KarmaEvent[h[p]][t].call(this,w)===false){w.stopPropagation();w.preventDefault()}}h[p]=null}catch(w){}}$(this).data("fireEvent",h)}else{if(e.storage[y]&&e.storage[y].KarmaEvent&&e.storage[y].KarmaEvent[w.type]){for(var t in e.storage[y].KarmaEvent[w.type]){if(e.storage[y].KarmaEvent[w.type][t].call(this,w)===false){w.stopPropagation();w.preventDefault()}var z=e(this).data("triggerOnce");if(z){for(var v=0;v<z.length;v++){if(z[v]===e.storage[y].KarmaEvent[w.type][t]){e.storage[y].KarmaEvent[w.type][t]=null;delete e.storage[y].KarmaEvent[w.type][t]}}}}}}};e.fn.extend({style:function(h,g){if(e.isString(h)&&e.isValue(g)){return this.setStyle(h,g)}if(e.isObject(h)){for(var i in h){this.setStyle(i,h[i])}return this}return this.getStyle(h)},setStyle:function(j,h){if(!this.length){return this}j=e.camelCase(j);if(j=="opacity"){for(var g=0;g<this.length;g++){if(e.support.opacity){this[g].style.opacity=h}else{if(e.support.filter){this[g].style.zoom=1;this[g].style.filter=(parseInt(h,10)==1)?"":"alpha(opacity="+(h*100)+")"}}}return this}if(j=="scrollTop"||j=="scrollLeft"){for(var g=0;g<this.length;g++){if(this[g]===a.documentElement||this[g]===a||this[g]===a.body||this[g]===d){a.body[j]=h;a.documentElement[j]=h}else{this[g][j]=h}}return this}if(j=="float"){j=e.support.styleFloat?"styleFloat":"cssFloat"}var k=+h;if(k||k===0){h=k+"px"}if(e.isString(h)){for(var g=0;g<this.length;g++){this[g].style[j]=h}}return this},getStyle:function(j){if(!this.length){return null}j=e.camelCase(j);if(j=="scrollTop"||j=="scrollLeft"){return(this[0]===a||this[0]===a.documentElement||this[0]===d)?a.body[j]:this[0][j]}if(j=="float"){j=e.support.styleFloat?"styleFloat":"cssFloat"}else{if(j=="opacity"&&this[0].filters){try{var h=this[0].filters("alpha").opacity}catch(k){return 1}return h/100}}if(this[0].style){if(this[0].currentStyle){if(this[0].currentStyle[j]=="auto"&&this[0].style[j]==""){if(/width|height/i.test(j)){return this.width()}if(/left|top|right|bottom/i.test(j)){return 0}}return this[0].currentStyle[j]?this[0].currentStyle[j]:this[0].style[j]}else{if("getComputedStyle" in a.defaultView){var i=a.defaultView.getComputedStyle(this[0],null)[j];if(!i||!i.length){i=this[0].style[j]}if(j.toLowerCase().indexOf("color")>=0){var g=i.match(/rgba?\([\d\s,]+\)/);if(g){i=e.rgbToHex(g[0].match(/\d{1,3}/g))}}return i}}}return""},dimension:function(h,g){if(!this.length){return null}return this[0]===d?a.compatMode=="CSS1Compat"&&a.documentElement["client"+h]||a.body["client"+h]:this[0]===a?Math.max(a.documentElement["client"+h],a.body["scroll"+h],a.documentElement["scroll"+h],a.body["offset"+h],a.documentElement["offset"+h]):g?this[0]["offset"+h]:this[0]["client"+h]},width:function(h){var g=parseInt(this.getStyle("paddingLeft"),10)||0,i=parseInt(this.getStyle("paddingRight"),10)||0;return e.isValue(h)?this.setStyle("width",h):this.dimension("Width")-g-i},height:function(i){var g=parseInt(this.getStyle("paddingTop"),10)||0,h=parseInt(this.getStyle("paddingBottom"),10)||0;return e.isValue(i)?this.setStyle("height",i):this.dimension("Height")-g-h},innerWidth:function(){return this.dimension("Width")},innerHeight:function(g){return this.dimension("Height")},outerWidth:function(j,i){var h=i?parseInt(this.css("marginLeft"),10)||0:0,g=i?parseInt(this.css("marginRight"),10)||0:0;return this.dimension("Width",1)+h+g},outerHeight:function(j,h){var g=h?parseInt(this.css("marginTop"),10)||0:0,i=h?parseInt(this.css("marginBottom"),10)||0:0;return this.dimension("Height",1)+g+i},offset:function(){if(!this[0]){return null}e.calculateOffset();if(a.documentElement.getBoundingClientRect){if(this[0]===(this[0].ownerDocument||this[0]).body){var u=this[0].offsetTop,m=this[0].offsetLeft;if(e.support.offsetDoesNotIncludeMarginInBodyOffset){u+=parseInt(this.css("marginTop"),10)||0,m+=parseInt(this.css("marginLeft"),10)||0}return{top:u,left:m}}var p=this[0].getBoundingClientRect(),v=this[0].ownerDocument||v,q=v.body,j=v.documentElement,n=j.clientTop||q.clientTop||0,s=j.clientLeft||q.clientLeft||0,u=p.top+(self.pageYOffset||e.support.boxModel&&j.scrollTop||q.scrollTop)-n,m=p.left+(self.pageXOffset||e.support.boxModel&&j.scrollTop||q.scrollLeft)-s;return{top:u,left:m}}else{var k=this[0],i=k.offsetParent,h=k,v=k.ownerDocument||k,t,j=v.documentElement,q=v.body,r=v.defaultView,g=r.getComputedStyle(k,null),u=k.offsetTop,m=k.offsetLeft;while((k=k.parentNode)&&k!==q&&k!==j){t=r.getComputedStyle(k,null);u-=k.scrollTop,m-=k.scrollLeft;if(k===i){u+=k.offsetTop,m+=k.offsetLeft;if(e.support.offsetDoesNotAddBorder&&!(e.support.offsetDoesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(k.tagName))){u+=parseInt(t.borderTopWidth,10)||0,m+=parseInt(t.borderLeftWidth,10)||0}h=i,i=k.offsetParent}if(e.support.offsetSubtractsBorderForOverflowNotVisible&&t.overflow!=="visible"){u+=parseInt(t.borderTopWidth,10)||0,m+=parseInt(t.borderLeftWidth,10)||0}g=t}if(g.position==="relative"||g.position==="static"){u+=q.offsetTop,m+=q.offsetLeft}if(g.position==="fixed"){u+=Math.max(j.scrollTop,q.scrollTop),m+=Math.max(j.scrollLeft,q.scrollLeft)}return{top:u,left:m}}},position:function(){var m=0,k=0,h=null;if(this[0]){var j=this.offsetParent(),i=j.ownerDocument||j,n=this.offset(),g=(i.documentElement===j||i.body===j)?{top:0,left:0}:j.offset();n.top-=parseInt(this.css("marginTop"),10)||0;n.left-=parseInt(this.css("marginLeft"),10)||0;g.top+=parseInt(e(j).css("borderTopWidth"),10)||0;g.left+=parseInt(e(j).css("borderLeftWidth"),10)||0;h={top:n.top-g.top,left:n.left-g.left}}return h},offsetParent:function(){var h=this[0].offsetParent||a.body,g=h.ownerDocument||h;while(h&&h!==g.documentElement&&h!==g.body&&e(h).css("position")=="static"){h=h.offsetParent}return e(h)},scrollTop:function(){return this.css("scrollTop")},scrollLeft:function(){return this.css("scrollLeft")}});e.fn.css=e.fn.style;e.extend({camelCase:function(g){if(e.temp.camelCase[g]){g=e.temp.camelCase[g]}else{g=e.temp.camelCase[g]=g.replace(/\-(\w)/g,function(h,i){return i.toUpperCase()})}return g},rgbToHex:function(k){if(k.length<3){return null}if(k.length==4&&k[3]==0&&!k){return"transparent"}var h=[];for(var g=0;g<3;g++){var j=(k[g]-0).toString(16);h.push((j.length==1)?"0"+j:j)}return"#"+h.join("")},calculateOffset:function(){if(e.temp.calculatedOffsets){return}var g=new e.temp.offsets();e.extend(e.support,{offsetDoesNotAddBorder:g.doesNotAddBorder,offsetDoesAddBorderForTableAndCells:g.doesAddBorderForTableAndCells,offsetSubtractsBorderForOverflowNotVisible:g.subtractsBorderForOverflowNotVisible,offsetDoesNotIncludeMarginInBodyOffset:g.doesNotIncludeMarginInBodyOffset});e.temp.calculatedOffsets=true}});e.fn.extend({stop:function(){for(var h=0;h<this.length;h++){var j=e.data(this[h],"KarmaFX");for(var g in j){clearInterval(j[g].timer)}}return this.data("KarmaFX",null)},animate:function(m,j,s,q,h){if(!e.isGenericObject(m)||!this.length){return this}var k=this;j=j||500;q=q||e.easing.global;s=s||null;h=h||null;for(var n=0;n<k.length;n++){var r={start:{},end:{},duration:j,callback:s,attributes:m,easing:q,step:h};var p=e(k[n]),g=p.data("KarmaFX",p.data("KarmaFX")||[]).data("KarmaFX");g.push(e.temp.populateStartEndValues(p,r,m));e.temp.animate(p)}return this}});e.temp.populateStartEndValues=function(g,m,i){for(var p in i){m.start[p]=g.getStyle(p);m.start[p]=+m.start[p]||parseInt(m.start[p],10);var k=+i[p];if(k||k===0){m.end[p]=k}else{var n=i[p];if(n.indexOf("+=")>=0||n.indexOf("-=")>=0){var h=n.replace("+=","").replace("-=",""),j=+h;if(j||j===0||n.indexOf("px")>0){h=j||parseInt(h,10)}else{h=parseInt(g.setStyle(p,h).getStyle(p),10);g.setStyle(p,m.start[p])}m.end[p]=(n.indexOf("+=")==0)?m.start[p]+h:m.start[p]-h}else{if(n.indexOf("px")>0){m.end[p]=parseInt(n,10)}else{m.end[p]=parseInt(g.setStyle(p,n).getStyle(p),10);g.setStyle(p,m.start[p])}}}}return m};e.temp.animate=function(n){var g=n.data("KarmaFX");if(g.length==1){var p=0,m=new Date().getTime(),h=m+(g[p].duration||0),j;g[p].timer=j=setInterval(function q(){var r=new Date().getTime();if(!g){clearInterval(j)}else{if(r<h){k(r-m,g[p].end)}else{i()}}},13);var k=function(t,r){for(var x in r){var w=g[p].start[x],s=g[p].end[x],v=g[p].duration,u=g[p].easing(t,w,s-w,v);n.setStyle(x,u)}if(g&&g[p]&&g[p].step){g[p].step()}};var i=function(){clearInterval(j);if(g&&g[p]){if(g[p].callback){g[p].callback()}n.css(g[p].end)}g[p]=null;p++;if(g.length&&!g[p]){n.data("KarmaFX",null)}else{var t=new Date().getTime(),r=t+g[p].duration;for(var u in g[p].end){e.temp.populateStartEndValues(n,g[p],g[p].attributes)}g[p].timer=j=setInterval(function s(){var v=new Date().getTime();if(!g){clearInterval(j)}else{if(v<r){k(v-t,g[p].end)}else{i()}}},13)}}}};e.easing={easeIn:function(h,g,j,i){return j*(h/=i)*h+g}};e.easing.global=e.easing.easeIn;e.extend({namespace:function(j,h){if(e.isString(j)){j=j.split(".");var m=h||d;for(var k=0;k<j.length;k++){var g=j[k];m=m[g]||(m[g]={});if(k==j.length-1){return(typeof m=="function"||typeof m=="object")?m:false}}}},each:function(j,h){for(var g=0;g<j.length;g++){h.call(j[g],g,j[g])}},trim:function(j){if(j.trim){return j.trim()}if(!j.charAt){return j}var h=/[\s\xA0]/,i=0,g=j.length;while(h.test(j.charAt(i++))){}while(h.test(j.charAt(--g))){}return j.slice(i-1,g+1)},grep:function(k,j){var g=[];for(var h=0;h<k.length;h++){if(j.call(k[h],h,k[h])!==false){g.push(k[h])}}return g},inArray:function(h,j){for(var g=0;g<j.length;g++){if(j[g]===h){return g}}return -1},map:function(j,h){var k=[];for(var g=0;g<j.length;g++){k.push(h.call(j[g],g,j[g]))}return k},merge:function(){return Array.prototype.concat.apply([],arguments)}});e.Class=function(g){g.construct=g.construct||function(){};g.construct.adds=function(i){for(var j in i){if(j!=="construct"){g.construct.prototype[j]=i[j]}}};g.construct.inherits=function(i){g.construct.prototype.__proto__=i.prototype;g.construct.prototype.parent=i};for(var h in g){if(h!=="construct"){g.construct.prototype[h]=g[h]}}return g.construct};
/*
* Sizzle CSS Selector Engine - v1.0
* Copyright 2009, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
* More information: http://sizzlejs.com/
*/
(function(){var w=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,p=0,j=Object.prototype.toString,u=false;var h=function(L,B,I,D){I=I||[];var y=B=B||a;if(B.nodeType!==1&&B.nodeType!==9){return[]}if(!L||typeof L!=="string"){return I}var J=[],K,G,O,N,H,A,z=true,E=v(B);w.lastIndex=0;while((K=w.exec(L))!==null){J.push(K[1]);if(K[2]){A=RegExp.rightContext;break}}if(J.length>1&&q.exec(L)){if(J.length===2&&k.relative[J[0]]){G=m(J[0]+J[1],B)}else{G=k.relative[J[0]]?[B]:h(J.shift(),B);while(J.length){L=J.shift();if(k.relative[L]){L+=J.shift()}G=m(L,G)}}}else{if(!D&&J.length>1&&B.nodeType===9&&!E&&k.match.ID.test(J[0])&&!k.match.ID.test(J[J.length-1])){var P=h.find(J.shift(),B,E);B=P.expr?h.filter(P.expr,P.set)[0]:P.set[0]}if(B){var P=D?{expr:J.pop(),set:g(D)}:h.find(J.pop(),J.length===1&&(J[0]==="~"||J[0]==="+")&&B.parentNode?B.parentNode:B,E);G=P.expr?h.filter(P.expr,P.set):P.set;if(J.length>0){O=g(G)}else{z=false}while(J.length){var C=J.pop(),F=C;if(!k.relative[C]){C=""}else{F=J.pop()}if(F==null){F=B}k.relative[C](O,F,E)}}else{O=J=[]}}if(!O){O=G}if(!O){throw"Syntax error, unrecognized expression: "+(C||L)}if(j.call(O)==="[object Array]"){if(!z){I.push.apply(I,O)}else{if(B&&B.nodeType===1){for(var M=0;O[M]!=null;M++){if(O[M]&&(O[M]===true||O[M].nodeType===1&&n(B,O[M]))){I.push(G[M])}}}else{for(var M=0;O[M]!=null;M++){if(O[M]&&O[M].nodeType===1){I.push(G[M])}}}}}else{g(O,I)}if(A){h(A,y,I,D);h.uniqueSort(I)}return I};h.uniqueSort=function(z){if(i){u=false;z.sort(i);if(u){for(var y=1;y<z.length;y++){if(z[y]===z[y-1]){z.splice(y--,1)}}}}};h.matches=function(y,z){return h(y,null,null,z)};h.find=function(F,y,G){var E,C;if(!F){return[]}for(var B=0,A=k.order.length;B<A;B++){var D=k.order[B],C;if((C=k.match[D].exec(F))){var z=RegExp.leftContext;if(z.substr(z.length-1)!=="\\"){C[1]=(C[1]||"").replace(/\\/g,"");E=k.find[D](C,y,G);if(E!=null){F=F.replace(k.match[D],"");break}}}}if(!E){E=y.getElementsByTagName("*")}return{set:E,expr:F}};h.filter=function(I,H,L,B){var A=I,N=[],F=H,D,y,E=H&&H[0]&&v(H[0]);while(I&&H.length){for(var G in k.filter){if((D=k.match[G].exec(I))!=null){var z=k.filter[G],M,K;y=false;if(F==N){N=[]}if(k.preFilter[G]){D=k.preFilter[G](D,F,L,N,B,E);if(!D){y=M=true}else{if(D===true){continue}}}if(D){for(var C=0;(K=F[C])!=null;C++){if(K){M=z(K,D,C,F);var J=B^!!M;if(L&&M!=null){if(J){y=true}else{F[C]=false}}else{if(J){N.push(K);y=true}}}}}if(M!==undefined){if(!L){F=N}I=I.replace(k.match[G],"");if(!y){return[]}break}}}if(I==A){if(y==null){throw"Syntax error, unrecognized expression: "+I}else{break}}A=I}return F};var k=h.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(y){return y.getAttribute("href")}},relative:{"+":function(F,y,E){var C=typeof y==="string",G=C&&!/\W/.test(y),D=C&&!G;if(G&&!E){y=y.toUpperCase()}for(var B=0,A=F.length,z;B<A;B++){if((z=F[B])){while((z=z.previousSibling)&&z.nodeType!==1){}F[B]=D||z&&z.nodeName===y?z||false:z===y}}if(D){h.filter(y,F,true)}},">":function(E,z,F){var C=typeof z==="string";if(C&&!/\W/.test(z)){z=F?z:z.toUpperCase();for(var A=0,y=E.length;A<y;A++){var D=E[A];if(D){var B=D.parentNode;E[A]=B.nodeName===z?B:false}}}else{for(var A=0,y=E.length;A<y;A++){var D=E[A];if(D){E[A]=C?D.parentNode:D.parentNode===z}}if(C){h.filter(z,E,true)}}},"":function(B,z,D){var A=p++,y=x;if(!/\W/.test(z)){var C=z=D?z:z.toUpperCase();y=t}y("parentNode",z,A,B,C,D)},"~":function(B,z,D){var A=p++,y=x;if(typeof z==="string"&&!/\W/.test(z)){var C=z=D?z:z.toUpperCase();y=t}y("previousSibling",z,A,B,C,D)}},find:{ID:function(z,A,B){if(typeof A.getElementById!=="undefined"&&!B){var y=A.getElementById(z[1]);return y?[y]:[]}},NAME:function(A,D,E){if(typeof D.getElementsByName!=="undefined"){var z=[],C=D.getElementsByName(A[1]);for(var B=0,y=C.length;B<y;B++){if(C[B].getAttribute("name")===A[1]){z.push(C[B])}}return z.length===0?null:z}},TAG:function(y,z){return z.getElementsByTagName(y[1])}},preFilter:{CLASS:function(B,z,A,y,E,F){B=" "+B[1].replace(/\\/g,"")+" ";if(F){return B}for(var C=0,D;(D=z[C])!=null;C++){if(D){if(E^(D.className&&(" "+D.className+" ").indexOf(B)>=0)){if(!A){y.push(D)}}else{if(A){z[C]=false}}}}return false},ID:function(y){return y[1].replace(/\\/g,"")},TAG:function(z,y){for(var A=0;y[A]===false;A++){}return y[A]&&v(y[A])?z[1]:z[1].toUpperCase()},CHILD:function(y){if(y[1]=="nth"){var z=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(y[2]=="even"&&"2n"||y[2]=="odd"&&"2n+1"||!/\D/.test(y[2])&&"0n+"+y[2]||y[2]);y[2]=(z[1]+(z[2]||1))-0;y[3]=z[3]-0}y[0]=p++;return y},ATTR:function(C,z,A,y,D,E){var B=C[1].replace(/\\/g,"");if(!E&&k.attrMap[B]){C[1]=k.attrMap[B]}if(C[2]==="~="){C[4]=" "+C[4]+" "}return C},PSEUDO:function(C,z,A,y,D){if(C[1]==="not"){if(w.exec(C[3]).length>1||/^\w/.test(C[3])){C[3]=h(C[3],null,null,z)}else{var B=h.filter(C[3],z,A,true^D);if(!A){y.push.apply(y,B)}return false}}else{if(k.match.POS.test(C[0])||k.match.CHILD.test(C[0])){return true}}return C},POS:function(y){y.unshift(true);return y}},filters:{enabled:function(y){return y.disabled===false&&y.type!=="hidden"},disabled:function(y){return y.disabled===true},checked:function(y){return y.checked===true},selected:function(y){y.parentNode.selectedIndex;return y.selected===true},parent:function(y){return !!y.firstChild},empty:function(y){return !y.firstChild},has:function(A,z,y){return !!h(y[3],A).length},header:function(y){return/h\d/i.test(y.nodeName)},text:function(y){return"text"===y.type},radio:function(y){return"radio"===y.type},checkbox:function(y){return"checkbox"===y.type},file:function(y){return"file"===y.type},password:function(y){return"password"===y.type},submit:function(y){return"submit"===y.type},image:function(y){return"image"===y.type},reset:function(y){return"reset"===y.type},button:function(y){return"button"===y.type||y.nodeName.toUpperCase()==="BUTTON"},input:function(y){return/input|select|textarea|button/i.test(y.nodeName)}},setFilters:{first:function(z,y){return y===0},last:function(A,z,y,B){return z===B.length-1},even:function(z,y){return y%2===0},odd:function(z,y){return y%2===1},lt:function(A,z,y){return z<y[3]-0},gt:function(A,z,y){return z>y[3]-0},nth:function(A,z,y){return y[3]-0==z},eq:function(A,z,y){return y[3]-0==z}},filter:{PSEUDO:function(D,z,A,E){var y=z[1],B=k.filters[y];if(B){return B(D,A,z,E)}else{if(y==="contains"){return(D.textContent||D.innerText||"").indexOf(z[3])>=0}else{if(y==="not"){var C=z[3];for(A=0,l=C.length;A<l;A++){if(C[A]===D){return false}}return true}}}},CHILD:function(y,B){var E=B[1],z=y;switch(E){case"only":case"first":while((z=z.previousSibling)){if(z.nodeType===1){return false}}if(E=="first"){return true}z=y;case"last":while((z=z.nextSibling)){if(z.nodeType===1){return false}}return true;case"nth":var A=B[2],H=B[3];if(A==1&&H==0){return true}var D=B[0],G=y.parentNode;if(G&&(G.sizcache!==D||!y.nodeIndex)){var C=0;for(z=G.firstChild;z;z=z.nextSibling){if(z.nodeType===1){z.nodeIndex=++C}}G.sizcache=D}var F=y.nodeIndex-H;if(A==0){return F==0}else{return(F%A==0&&F/A>=0)}}},ID:function(z,y){return z.nodeType===1&&z.getAttribute("id")===y},TAG:function(z,y){return(y==="*"&&z.nodeType===1)||z.nodeName===y},CLASS:function(z,y){return(" "+(z.className||z.getAttribute("class"))+" ").indexOf(y)>-1},ATTR:function(D,B){var A=B[1],y=k.attrHandle[A]?k.attrHandle[A](D):D[A]!=null?D[A]:D.getAttribute(A),E=y+"",C=B[2],z=B[4];return y==null?C==="!=":C==="="?E===z:C==="*="?E.indexOf(z)>=0:C==="~="?(" "+E+" ").indexOf(z)>=0:!z?E&&y!==false:C==="!="?E!=z:C==="^="?E.indexOf(z)===0:C==="$="?E.substr(E.length-z.length)===z:C==="|="?E===z||E.substr(0,z.length+1)===z+"-":false},POS:function(C,z,A,D){var y=z[2],B=k.setFilters[y];if(B){return B(C,A,z,D)}}}};var q=k.match.POS;for(var s in k.match){k.match[s]=new RegExp(k.match[s].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var g=function(z,y){z=Array.prototype.slice.call(z,0);if(y){y.push.apply(y,z);return y}return z};try{Array.prototype.slice.call(a.documentElement.childNodes,0)}catch(r){g=function(C,B){var z=B||[];if(j.call(C)==="[object Array]"){Array.prototype.push.apply(z,C)}else{if(typeof C.length==="number"){for(var A=0,y=C.length;A<y;A++){z.push(C[A])}}else{for(var A=0;C[A];A++){z.push(C[A])}}}return z}}var i;if(a.documentElement.compareDocumentPosition){i=function(z,y){var A=z.compareDocumentPosition(y)&4?-1:z===y?0:1;if(A===0){u=true}return A}}else{if("sourceIndex" in a.documentElement){i=function(z,y){var A=z.sourceIndex-y.sourceIndex;if(A===0){u=true}return A}}else{if(a.createRange){i=function(B,z){var A=B.ownerDocument.createRange(),y=z.ownerDocument.createRange();A.selectNode(B);A.collapse(true);y.selectNode(z);y.collapse(true);var C=A.compareBoundaryPoints(Range.START_TO_END,y);if(C===0){u=true}return C}}}}(function(){var z=a.createElement("div"),A="script"+(new Date).getTime();z.innerHTML="<a name='"+A+"'/>";var y=a.documentElement;y.insertBefore(z,y.firstChild);if(!!a.getElementById(A)){k.find.ID=function(C,D,E){if(typeof D.getElementById!=="undefined"&&!E){var B=D.getElementById(C[1]);return B?B.id===C[1]||typeof B.getAttributeNode!=="undefined"&&B.getAttributeNode("id").nodeValue===C[1]?[B]:undefined:[]}};k.filter.ID=function(D,B){var C=typeof D.getAttributeNode!=="undefined"&&D.getAttributeNode("id");return D.nodeType===1&&C&&C.nodeValue===B}}y.removeChild(z);y=z=null})();(function(){var y=a.createElement("div");y.appendChild(a.createComment(""));if(y.getElementsByTagName("*").length>0){k.find.TAG=function(z,D){var C=D.getElementsByTagName(z[1]);if(z[1]==="*"){var B=[];for(var A=0;C[A];A++){if(C[A].nodeType===1){B.push(C[A])}}C=B}return C}}y.innerHTML="<a href='#'></a>";if(y.firstChild&&typeof y.firstChild.getAttribute!=="undefined"&&y.firstChild.getAttribute("href")!=="#"){k.attrHandle.href=function(z){return z.getAttribute("href",2)}}y=null})();if(a.querySelectorAll){(function(){var y=h,A=a.createElement("div");A.innerHTML="<p class='TEST'></p>";if(A.querySelectorAll&&A.querySelectorAll(".TEST").length===0){return}h=function(E,D,B,C){D=D||a;if(!C&&D.nodeType===9&&!v(D)){try{return g(D.querySelectorAll(E),B)}catch(F){}}return y(E,D,B,C)};for(var z in y){h[z]=y[z]}A=null})()}if(a.getElementsByClassName&&a.documentElement.getElementsByClassName){(function(){var y=a.createElement("div");y.innerHTML="<div class='test e'></div><div class='test'></div>";if(y.getElementsByClassName("e").length===0){return}y.lastChild.className="e";if(y.getElementsByClassName("e").length===1){return}k.order.splice(1,0,"CLASS");k.find.CLASS=function(z,A,B){if(typeof A.getElementsByClassName!=="undefined"&&!B){return A.getElementsByClassName(z[1])}};y=null})()}function t(z,E,D,I,F,H){var G=z=="previousSibling"&&!H;for(var B=0,A=I.length;B<A;B++){var y=I[B];if(y){if(G&&y.nodeType===1){y.sizcache=D;y.sizset=B}y=y[z];var C=false;while(y){if(y.sizcache===D){C=I[y.sizset];break}if(y.nodeType===1&&!H){y.sizcache=D;y.sizset=B}if(y.nodeName===E){C=y;break}y=y[z]}I[B]=C}}}function x(z,E,D,I,F,H){var G=z=="previousSibling"&&!H;for(var B=0,A=I.length;B<A;B++){var y=I[B];if(y){if(G&&y.nodeType===1){y.sizcache=D;y.sizset=B}y=y[z];var C=false;while(y){if(y.sizcache===D){C=I[y.sizset];break}if(y.nodeType===1){if(!H){y.sizcache=D;y.sizset=B}if(typeof E!=="string"){if(y===E){C=true;break}}else{if(h.filter(E,[y]).length>0){C=y;break}}}y=y[z]}I[B]=C}}}var n=a.compareDocumentPosition?function(z,y){return z.compareDocumentPosition(y)&16}:function(z,y){return z!==y&&(z.contains?z.contains(y):true)};var v=function(y){return y.nodeType===9&&y.innerHTML};var m=function(y,F){var B=[],C="",D,A=F.nodeType?[F]:F;while((D=k.match.PSEUDO.exec(y))){C+=D[0];y=y.replace(k.match.PSEUDO,"")}y=k.relative[y]?y+"*":y;for(var E=0,z=A.length;E<z;E++){h(y,A[E],B)}return h.filter(C,B)};e.Sizzle=h})();e.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error,hover").split(","),function(h,g){e.fn[g]=function(j){var i=[g].concat(e.makeArray(arguments));return arguments.length?this.bind.apply(this,i):this.trigger(g)}});e(function b(){if(a.body){var g=a.createElement("div");g.style.width=g.style.paddingLeft="1px";a.body.appendChild(g);e.support.boxModel=g.offsetWidth==2;a.body.removeChild(g).style.display="none"}e(d).bind("unload",function(){e.storage=e.event.caller=null})});e.Sizzle.selectors.filters.visible=function(g){return g.offsetWidth>0||g.offsetHeight>0};e.Sizzle.selectors.filters.hidden=function(g){return g.offsetWidth===0&&g.offsetHeight===0};e.Sizzle.selectors.filters.animated=function(g){return e(g).data("KarmaFX")}})();