/* QuoJS 2.0.2 http://quojs.tapquo.com Copyright (C) 2011,2012 Javi Jiménez Villar (@soyjavi) Generated by CoffeeScript 1.3.2 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ (function(){var a;a=function(){var d,l,f;l=[];f=function(g,e){g=g||l;g.__proto__=f.prototype;g.selector=e||"";return g};d=function(g){var e;if(g){e=d.getDomainSelector(g);return f(e,g)}else return f()};d.extend=function(g){Array.prototype.slice.call(arguments,1).forEach(function(e){var i,m;m=[];for(i in e)m.push(g[i]=e[i]);return m});return g};f.prototype=d.fn={};return d}();window.Quo=a;"$$"in window||(window.$$=a)}).call(this);(function(){(function(a){var d,l,f,g;d=[];l=Object.prototype;a.toType=function(e){return l.toString.call(e).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()};a.isOwnProperty=function(e,i){return l.hasOwnProperty.call(e,i)};a.getDomainSelector=function(e){var i,m,o;i=null;m=[1,9,11];o=a.toType(e);if(o==="array")i=f(e);else if(o==="string")i=a.query(document,e);else if(m.indexOf(e.nodeType)>=0||e===window)i=[e];return i};a.map=function(e,i){var m,o,p;p=[];m=void 0;if(a.toType(e)==="array")for(m=0;m=0}))};a.fn.forEach=d.forEach;a.fn.indexOf=d.indexOf;f=function(e){return e.filter(function(i){return i!==void 0&&i!==null})};g=function(e){return e.length>0?[].concat.apply([],e):e}})(Quo)}).call(this);(function(){(function(a){a.fn.attr=function(d,l){return a.toType(d)==="string"&&l===void 0?this[0].getAttribute(d):this.each(function(){return this.setAttribute(d,l)})};a.fn.data=function(d,l){return this.attr("data-"+d,l)};a.fn.val=function(d){return a.toType(d)==="string"?this.each(function(){return this.value=d}):this.length>0?this[0].value:null};a.fn.show=function(){return this.style("display","block")};a.fn.hide=function(){return this.style("display","none")};a.fn.height=function(){return this.offset().height}; a.fn.width=function(){return this.offset().width};a.fn.offset=function(){var d;d=this[0].getBoundingClientRect();return{left:d.left+window.pageXOffset,top:d.top+window.pageYOffset,width:d.width,height:d.height}};a.fn.remove=function(){return this.each(function(){if(this.parentNode!=null)return this.parentNode.removeChild(this)})}})(Quo)}).call(this);(function(){(function(a){var d,l,f,g,e,i,m;f=null;d=/WebKit\/([\d.]+)/;l={Android:/(Android)\s+([\d.]+)/,ipad:/(iPad).*OS\s([\d_]+)/,iphone:/(iPhone\sOS)\s([\d_]+)/,blackberry:/(BlackBerry).*Version\/([\d.]+)/,webos:/(webOS|hpwOS)[\s\/]([\d.]+)/};a.isMobile=function(){f=f||e();return f.isMobile};a.environment=function(){return f=f||e()};a.isOnline=function(){return navigator.onLine};e=function(){var o,p;p=navigator.userAgent;o={};o.browser=g(p);o.os=i(p);o.isMobile=o.os?true:false;o.screen=m();return o}; g=function(o){var p;return(p=o.match(d))?p[0]:o};i=function(o){var p,r,k;p=void 0;for(r in l)if(k=o.match(l[r])){p={name:r==="iphone"||r==="ipad"?"ios":r,version:k[2].replace("_",".")};break}return p};m=function(){return{width:window.innerWidth,height:window.innerHeight}}})(Quo)}).call(this);(function(){(function(a){a.fn.text=function(d){return d?this.each(function(){return this.textContent=d}):this[0].textContent};a.fn.html=function(d){var l;l=a.toType(d);return l==="string"||l==="number"?this.each(function(){return this.innerHTML=d}):this[0].innerHTML};a.fn.append=function(d){return this.each(function(){var l;if(a.toType(d)==="string"){if(d){l=document.createElement("div");l.innerHTML=d;return this.appendChild(l.firstChild)}}else return this.insertBefore(d)})};a.fn.prepend=function(d){return this.each(function(){var l; if(a.toType(d)==="string")return this.innerHTML=d+this.innerHTML;else{l=this.parentNode;return l.insertBefore(d,l.firstChild)}})};a.fn.empty=function(){return this.each(function(){this.innerHTML=null})}})(Quo)}).call(this);(function(){(function(a){var d,l;a.query=function(f,g){var e;e=f.querySelectorAll(g);return e=Array.prototype.slice.call(e)};a.fn.find=function(f){var g;g=void 0;g=this.length===1?Quo.query(this[0],f):this.map(function(){return Quo.query(this,f)});return a(g)};a.fn.parent=function(f){var g;g=f?l(this):this.instance("parentNode");return d(g,f)};a.fn.siblings=function(f){var g;g=this.map(function(e,i){return Array.prototype.slice.call(i.parentNode.children).filter(function(m){return m!==i})});return d(g, f)};a.fn.children=function(f){var g;g=this.map(function(){return Array.prototype.slice.call(this.children)});return d(g,f)};a.fn.get=function(f){return f===undefined?this:this[f]};a.fn.first=function(){return a(this[0])};a.fn.last=function(){return a(this[this.length-1])};a.fn.closest=function(f,g){var e,i;i=this[0];e=a(f);for(e.length||(i=null);i&&e.indexOf(i)<0;)i=i!==g&&i!==document&&i.parentNode;return a(i)};a.fn.each=function(f){this.forEach(function(g,e){return f.call(g,e,g)});return this}; l=function(f){var g;for(g=[];f.length>0;)f=a.map(f,function(e){if((e=e.parentNode)&&e!==document&&g.indexOf(e)<0){g.push(e);return e}});return g};d=function(f,g){return g===undefined?a(f):a(f).filter(g)}})(Quo)}).call(this);(function(){(function(a){var d,l;a.fn.addClass=function(f){return this.each(function(){if(!l(f,this.className)){this.className+=" "+f;return this.className=this.className.trim()}})};a.fn.removeClass=function(f){return this.each(function(){if(l(f,this.className))return this.className=this.className.replace(f," ").replace(/\s+/g," ").trim()})};a.fn.toggleClass=function(f){return this.each(function(){if(l(f,this.className))return this.className=this.className.replace(f," ");else{this.className+=" "+ f;return this.className=this.className.trim()}})};a.fn.hasClass=function(f){return l(f,this[0].className)};a.fn.style=function(f,g){return g?this.each(function(){return this.style[f]=g}):this[0].style[f]||d(this[0],f)};l=function(f,g){return g.split(/\s+/g).indexOf(f)>=0};d=function(f,g){return document.defaultView.getComputedStyle(f,"")[g]}})(Quo)}).call(this);(function(){(function(a){var d,l,f,g,e,i,m,o,p,r;d={TYPE:"GET",MIME:"json"};f={script:"text/javascript, application/javascript",json:"application/json",xml:"application/xml, text/xml",html:"text/html",text:"text/plain"};l=0;a.ajaxSettings={type:d.TYPE,async:true,success:{},error:{},context:null,dataType:d.MIME,headers:{},xhr:function(){return new window.XMLHttpRequest},crossDomain:false,timeout:0};a.ajax=function(k){var c,b,h;b=a.mix(a.ajaxSettings,k);if(g(b.url))return a.jsonp(b);h=b.xhr();h.onreadystatechange= function(){if(h.readyState===4){clearTimeout(c);return o(h,b)}};h.open(b.type,b.url,b.async);m(h,b);if(b.timeout>0)c=setTimeout(function(){return r(h,b)},b.timeout);h.send(b.data);return b.async?h:e(h,b)};a.jsonp=function(k){var c,b,h,j;if(k.async){b="jsonp"+ ++l;h=document.createElement("script");j={abort:function(){a(h).remove();if(b in window)return window[b]={}}};c=void 0;window[b]=function(n){clearTimeout(c);a(h).remove();delete window[b];return p(n,j,k)};h.src=k.url.replace(/=\?/,"="+b);a("head").append(h); if(k.timeout>0)c=setTimeout(function(){return r(j,k)},k.timeout);return j}else return console.error("ERROR: Unable to make jsonp synchronous call.")};a.get=function(k,c,b,h){k+=a.serializeParameters(c);return a.ajax({url:k,success:b,dataType:h})};a.post=function(k,c,b,h){return a.ajax({type:"POST",url:k,data:c,success:b,dataType:h,contentType:"application/x-www-form-urlencoded"})};a.json=function(k,c,b){k+=a.serializeParameters(c);return a.ajax({url:k,success:b,dataType:d.MIME})};a.serializeParameters= function(k){var c,b;b="?";for(c in k)if(k.hasOwnProperty(c)){if(b!=="?")b+="&";b+=c+"="+k[c]}return b==="?"?"":b};o=function(k,c){if(k.status===200||k.status===0)c.async&&p(e(k,c),k,c);else i("QuoJS \u00bb $$.ajax",k,c)};p=function(k,c,b){b.success.call(b.context,k,c)};i=function(k,c,b){b.error.call(b.context,k,c,b)};m=function(k,c){var b;if(c.contentType)c.headers["Content-Type"]=c.contentType;if(c.dataType)c.headers.Accept=f[c.dataType];for(b in c.headers)k.setRequestHeader(b,c.headers[b])};r=function(k, c){k.onreadystatechange={};k.abort();i("QuoJS \u00bb $$.ajax : timeout exceeded",k,c)};e=function(k,c){var b;if(b=k.responseText)if(c.dataType===d.MIME)try{b=JSON.parse(b)}catch(h){b=h;i("Parse Error",k,c)}else if(c.dataType==="xml")b=k.responseXML;return b};g=function(k){return/=\?/.test(k)}})(Quo)}).call(this);(function(){(function(a){var d,l;d=/complete|loaded|interactive/;l={touch:"touchstart",tap:"tap"};["touch","tap"].forEach(function(f){a.fn[f]=function(g){return a(document.body).delegate(this.selector,l[f],g)};return this});a.fn.on=function(f,g,e){return g===undefined||a.toType(g)==="function"?this.bind(f,g):this.delegate(g,f,e)};a.fn.off=function(f,g,e){return g===undefined||a.toType(g)==="function"?this.unbind(f,g):this.undelegate(g,f,e)};a.fn.ready=function(f){d.test(document.readyState)?f(a): a.fn.addEvent(document,"DOMContentLoaded",function(){return f(a)});return this}})(Quo)}).call(this);(function(){(function(a){var d,l,f,g,e,i,m,o,p,r,k;d=1;g={};f={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};l={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",tap:"click",doubletap:"dblclick",orientationchange:"resize"};a.Event=function(c,b){var h;h=document.createEvent("Events");h.initEvent(c,true,true,null,null,null,null,null,null,null,null,null,null,null,null);if(b){h.pageX=b.x1;h.pageY=b.y1; h.toX=b.x2;h.toY=b.y2;h.fingers=b.fingers}return h};a.fn.bind=function(c,b){return this.each(function(){r(this,c,b)})};a.fn.unbind=function(c,b){return this.each(function(){k(this,c,b)})};a.fn.delegate=function(c,b,h){return this.each(function(j,n){r(n,b,h,c,function(q){return function(s){var u,t;if(t=a(s.target).closest(c,n).get(0)){u=a.extend(e(s),{currentTarget:t,liveFired:n});return q.apply(t,[u].concat([].slice.call(arguments,1)))}}})})};a.fn.undelegate=function(c,b,h){return this.each(function(){k(this, b,h,c)})};a.fn.trigger=function(c,b){if(a.toType(c)==="string")c=a.Event(c,b);return this.each(function(){this.dispatchEvent(c)})};a.fn.addEvent=function(c,b,h){return c.addEventListener?c.addEventListener(b,h,false):c.attachEvent?c.attachEvent("on"+b,h):c["on"+b]=h};a.fn.removeEvent=function(c,b,h){return c.removeEventListener?c.removeEventListener(b,h,false):c.detachEvent?c.detachEvent("on"+b,h):c["on"+b]=null};r=function(c,b,h,j,n){var q;b=m(b);q=p(c);q=g[q]||(g[q]=[]);n=n&&n(h,b);b={event:b,callback:h, selector:j,proxy:i(n,h,c),delegate:n,index:q.length};q.push(b);return a.fn.addEvent(c,b.event,b.proxy)};k=function(c,b,h,j){var n;b=m(b);n=p(c);return o(n,b,h,j).forEach(function(q){delete g[n][q.index];return a.fn.removeEvent(c,q.event,q.proxy)})};p=function(c){return c._id||(c._id=d++)};m=function(c){return(a.isMobile()?c:l[c])||c};i=function(c,b,h){b=c||b;return function(j){var n;n=b.apply(h,[j].concat(j.data));n===false&&j.preventDefault();return n}};o=function(c,b,h,j){return(g[c]||[]).filter(function(n){return n&& (!b||n.event===b)&&(!h||n.fn===h)&&(!j||n.selector===j)})};e=function(c){var b;b=a.extend({originalEvent:c},c);a.each(f,function(h,j){b[h]=function(){this[j]=function(){return true};return c[h].apply(c,arguments)};return b[j]=function(){return false}});return b}})(Quo)}).call(this);(function(){(function(a){var d,l,f,g,e,i,m,o,p,r,k,c,b,h;d={};l=void 0;["doubleTap","hold","swipe","swiping","swipeLeft","swipeRight","swipeUp","swipeDown","drag"].forEach(function(j){a.fn[j]=function(n){return this.on(j,n)}});a(document).ready(function(){return o()});o=function(){var j;j=a(document.body);j.bind("touchstart",k);j.bind("touchmove",r);j.bind("touchend",p);return j.bind("touchcancel",g)};k=function(j){var n,q,s;q=Date.now();n=q-(d.last||q);s=f(j);l&&clearTimeout(l);d={el:a(c(s.target)), x1:s.pageX,y1:s.pageY,isDoubleTap:n>0&&n<=250?true:false,last:q,fingers:e(j)};return setTimeout(i,650)};r=function(j){var n;n=f(j);d.x2=n.pageX;d.y2=n.pageY;if(m(j))return d.el.trigger("swiping",d)};p=function(j){if(d.isDoubleTap)return h("doubleTap",true);else if(d.x2>0||d.y2>0){if(m(j))if(d.fingers===1){h("swipe",false);j=b(d.x1,d.x2,d.y1,d.y2);h(j,false)}else h("drag",false);return g()}else{d.el&&h("tap");return l=setTimeout(g,250)}};h=function(j,n){d.el.trigger(j,d);return n&&g()};g=function(){d= {};return clearTimeout(l)};m=function(){return d.el&&(Math.abs(d.x1-d.x2)>30||Math.abs(d.y1-d.y2)>30)};f=function(j){return a.isMobile()?j.touches[0]:j};c=function(j){return"tagName"in j?j:j.parentNode};b=function(j,n,q,s){return Math.abs(j-n)>=Math.abs(q-s)?j-n>0?"swipeLeft":"swipeRight":q-s>0?"swipeUp":"swipeDown"};i=function(){if(d.last&&Date.now()-d.last>=650){h("hold");g()}};e=function(j){return j.touches?j.touches.length:1}})(Quo)}).call(this);