/** * jQuery.fastClick.js * * Work around the 300ms delay for the click event in some mobile browsers. * * Code based on * * @usage * $('button').fastClick(function() {alert('clicked!');}); * * @license MIT * @author Dave Hulbert (dave1010) * @version 1.0.0 2013-01-17 */ !function(t){t.fn.fastClick=function(n){return t(this).each((function(){t.FastButton(t(this)[0],n)}))},t.FastButton=function(n,c){var i,o,e=function(){t(n).unbind("touchend"),t("body").unbind("touchmove.fastClick")},u=function(n){n.stopPropagation(),e(),c.call(this,n),"touchend"===n.type&&t.clickbuster.preventGhostClick(i,o)},s=function(t){(Math.abs(t.originalEvent.touches[0].clientX-i)>10||Math.abs(t.originalEvent.touches[0].clientY-o)>10)&&e()};t(n).bind({touchstart:function(c){c.stopPropagation(),t(n).bind("touchend",u),t("body").bind("touchmove.fastClick",s),i=c.originalEvent.touches[0].clientX,o=c.originalEvent.touches[0].clientY},click:u})},t.clickbuster={coordinates:[],preventGhostClick:function(n,c){t.clickbuster.coordinates.push(n,c),window.setTimeout(t.clickbuster.pop,2500)},pop:function(){t.clickbuster.coordinates.splice(0,2)},onClick:function(n){var c,i,o;for(o=0;o