/*
 Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 Licensed under the MIT License (LICENSE.txt).

 Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 Thanks to: Seamus Leahy for adding deltaX and deltaY

 Version: 3.0.4

 Requires: 1.2.2+
*/
(function(g,f){var a={};f.$widgetkit={lazyloaders:{},load:function(b){a[b]||(a[b]=g.getScript(b));return a[b]},lazyload:function(a){a=a||document;g("[data-widgetkit]",a).each(function(){var a=g(this),b=a.data("widgetkit"),c=a.data("options")||{};!a.data("wk-loaded")&&$widgetkit.lazyloaders[b]&&($widgetkit.lazyloaders[b](a,c),a.data("wk-loaded",!0))})}};g(function(){$widgetkit.lazyload()});for(var b=document.createElement("div"),c=b.style,b=!1,d=["-webkit-","-moz-","-o-","-ms-","-khtml-"],e=["Webkit",
"Moz","O","ms","Khtml"],j="",h=0;h<e.length;h++)if(""===c[e[h]+"Transition"]){b=e[h]+"Transition";j=d[h];break}$widgetkit.prefix=j;c=$widgetkit;b=(d=b)&&"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix&&!navigator.userAgent.match(/Chrome/i);e=document.createElement("canvas");e=!(!e.getContext||!e.getContext("2d"));c.support={transition:d,css3d:b,canvas:e};$widgetkit.css3=function(a){a=a||{};a.transition&&(a[j+"transition"]=a.transition);a.transform&&(a[j+"transform"]=a.transform);a["transform-origin"]&&
(a[j+"transform-origin"]=a["transform-origin"]);return a};if(!(b=g.browser))c=navigator.userAgent,c=c.toLowerCase(),b={},c=/(chrome)[ \/]([\w.]+)/.exec(c)||/(webkit)[ \/]([\w.]+)/.exec(c)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(c)||/(msie) ([\w.]+)/.exec(c)||0>c.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(c)||[],b[c[1]]=!0,b.version=c[2]||"0";g.browser=b;b=null})(jQuery,window);
(function(g){var f;a:{try{f=parseInt(navigator.appVersion.match(/MSIE (\d\.\d)/)[1],10);break a}catch(a){}f=!1}f&&9>f&&(g(document).ready(function(){g("body").addClass("wk-ie wk-ie"+f)}),g.each("abbr article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),function(){document.createElement(this)}))})(jQuery);
(function(g,f){f.$widgetkit.trans={__data:{},addDic:function(a){g.extend(this.__data,a)},add:function(a,b){this.__data[a]=b},get:function(a){if(!this.__data[a])return a;var b=1==arguments.length?[]:Array.prototype.slice.call(arguments,1);return this.printf(String(this.__data[a]),b)},printf:function(a,b){if(!b)return a;var c="",d=a.split("%s");if(1==d.length)return a;for(var e=0;e<b.length;e++)d[e].lastIndexOf("%")==d[e].length-1&&e!=b.length-1&&(d[e]+="s"+d.splice(e+1,1)[0]),c+=d[e]+b[e];return c+
d[d.length-1]}}})(jQuery,window);
(function(g){g.easing.jswing=g.easing.swing;g.extend(g.easing,{def:"easeOutQuad",swing:function(f,a,b,c,d){return g.easing[g.easing.def](f,a,b,c,d)},easeInQuad:function(f,a,b,c,d){return c*(a/=d)*a+b},easeOutQuad:function(f,a,b,c,d){return-c*(a/=d)*(a-2)+b},easeInOutQuad:function(f,a,b,c,d){return 1>(a/=d/2)?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b},easeInCubic:function(f,a,b,c,d){return c*(a/=d)*a*a+b},easeOutCubic:function(f,a,b,c,d){return c*((a=a/d-1)*a*a+1)+b},easeInOutCubic:function(f,a,b,c,d){return 1>
(a/=d/2)?c/2*a*a*a+b:c/2*((a-=2)*a*a+2)+b},easeInQuart:function(f,a,b,c,d){return c*(a/=d)*a*a*a+b},easeOutQuart:function(f,a,b,c,d){return-c*((a=a/d-1)*a*a*a-1)+b},easeInOutQuart:function(f,a,b,c,d){return 1>(a/=d/2)?c/2*a*a*a*a+b:-c/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(f,a,b,c,d){return c*(a/=d)*a*a*a*a+b},easeOutQuint:function(f,a,b,c,d){return c*((a=a/d-1)*a*a*a*a+1)+b},easeInOutQuint:function(f,a,b,c,d){return 1>(a/=d/2)?c/2*a*a*a*a*a+b:c/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(f,a,
b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},easeOutSine:function(f,a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},easeInOutSine:function(f,a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},easeInExpo:function(f,a,b,c,d){return 0==a?b:c*Math.pow(2,10*(a/d-1))+b},easeOutExpo:function(f,a,b,c,d){return a==d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b},easeInOutExpo:function(f,a,b,c,d){return 0==a?b:a==d?b+c:1>(a/=d/2)?c/2*Math.pow(2,10*(a-1))+b:c/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(f,a,b,c,d){return-c*
(Math.sqrt(1-(a/=d)*a)-1)+b},easeOutCirc:function(f,a,b,c,d){return c*Math.sqrt(1-(a=a/d-1)*a)+b},easeInOutCirc:function(f,a,b,c,d){return 1>(a/=d/2)?-c/2*(Math.sqrt(1-a*a)-1)+b:c/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(f,a,b,c,d){f=1.70158;var e=0,g=c;if(0==a)return b;if(1==(a/=d))return b+c;e||(e=0.3*d);g<Math.abs(c)?(g=c,f=e/4):f=e/(2*Math.PI)*Math.asin(c/g);return-(g*Math.pow(2,10*(a-=1))*Math.sin((a*d-f)*2*Math.PI/e))+b},easeOutElastic:function(f,a,b,c,d){f=1.70158;var e=0,g=c;
if(0==a)return b;if(1==(a/=d))return b+c;e||(e=0.3*d);g<Math.abs(c)?(g=c,f=e/4):f=e/(2*Math.PI)*Math.asin(c/g);return g*Math.pow(2,-10*a)*Math.sin((a*d-f)*2*Math.PI/e)+c+b},easeInOutElastic:function(f,a,b,c,d){f=1.70158;var e=0,g=c;if(0==a)return b;if(2==(a/=d/2))return b+c;e||(e=d*0.3*1.5);g<Math.abs(c)?(g=c,f=e/4):f=e/(2*Math.PI)*Math.asin(c/g);return 1>a?-0.5*g*Math.pow(2,10*(a-=1))*Math.sin((a*d-f)*2*Math.PI/e)+b:0.5*g*Math.pow(2,-10*(a-=1))*Math.sin((a*d-f)*2*Math.PI/e)+c+b},easeInBack:function(f,
a,b,c,d,e){void 0==e&&(e=1.70158);return c*(a/=d)*a*((e+1)*a-e)+b},easeOutBack:function(f,a,b,c,d,e){void 0==e&&(e=1.70158);return c*((a=a/d-1)*a*((e+1)*a+e)+1)+b},easeInOutBack:function(f,a,b,c,d,e){void 0==e&&(e=1.70158);return 1>(a/=d/2)?c/2*a*a*(((e*=1.525)+1)*a-e)+b:c/2*((a-=2)*a*(((e*=1.525)+1)*a+e)+2)+b},easeInBounce:function(f,a,b,c,d){return c-g.easing.easeOutBounce(f,d-a,0,c,d)+b},easeOutBounce:function(f,a,b,c,d){return(a/=d)<1/2.75?c*7.5625*a*a+b:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+0.75)+
b:a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(f,a,b,c,d){return a<d/2?0.5*g.easing.easeInBounce(f,2*a,0,c,d)+b:0.5*g.easing.easeOutBounce(f,2*a-d,0,c,d)+0.5*c+b}})})(jQuery);
(function(g){function f(a){var c=a||window.event,d=[].slice.call(arguments,1),e=0,f=0,h=0;a=g.event.fix(c);a.type="mousewheel";a.wheelDelta&&(e=a.wheelDelta/120);a.detail&&(e=-a.detail/3);h=e;void 0!==c.axis&&c.axis===c.HORIZONTAL_AXIS&&(h=0,f=-1*e);void 0!==c.wheelDeltaY&&(h=c.wheelDeltaY/120);void 0!==c.wheelDeltaX&&(f=-1*c.wheelDeltaX/120);d.unshift(a,e,f,h);return g.event.handle.apply(this,d)}var a=["DOMMouseScroll","mousewheel"];g.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var b=
a.length;b;)this.addEventListener(a[--b],f,!1);else this.onmousewheel=f},teardown:function(){if(this.removeEventListener)for(var b=a.length;b;)this.removeEventListener(a[--b],f,!1);else this.onmousewheel=null}};g.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
(function(g){var f=g.support;var a=document.createElement("INPUT");a.type="file";if(a="files"in a)a=new XMLHttpRequest,a=!(!a||!("upload"in a&&"onprogress"in a.upload))&&!!window.FormData;f.ajaxupload=a;g.support.ajaxupload&&g.event.props.push("dataTransfer");g.fn.uploadOnDrag=function(a){return!g.support.ajaxupload?this:this.each(function(){var c=g(this),b=g.extend({action:"",single:!1,method:"POST",params:{},loadstart:function(){},load:function(){},loadend:function(){},progress:function(){},complete:function(){},
allcomplete:function(){},readystatechange:function(){}},a);c.on("drop",function(a){function c(a,b){for(var d=new FormData,e=new XMLHttpRequest,f=0,h;h=a[f];f++)d.append("files[]",h);for(var l in b.params)d.append(l,b.params[l]);e.upload.addEventListener("progress",function(a){b.progress(100*(a.loaded/a.total),a)},!1);e.addEventListener("loadstart",function(a){b.loadstart(a)},!1);e.addEventListener("load",function(a){b.load(a)},!1);e.addEventListener("loadend",function(a){b.loadend(a)},!1);e.addEventListener("error",
function(a){b.error(a)},!1);e.addEventListener("abort",function(a){b.abort(a)},!1);e.open(b.method,b.action,!0);e.onreadystatechange=function(){b.readystatechange(e);if(4==e.readyState){var a=e.responseText;if("json"==b.type)try{a=g.parseJSON(a)}catch(c){a=!1}b.complete(a,e)}};e.send(d)}a.stopPropagation();a.preventDefault();var d=a.dataTransfer.files;if(b.single){var f=a.dataTransfer.files.length,e=0,j=b.complete;b.complete=function(a,g){e+=1;j(a,g);e<f?c([d[e]],b):b.allcomplete()};c([d[0]],b)}else c(d,
b)}).on("dragover",function(a){a.stopPropagation();a.preventDefault()})})};g.fn.ajaxform=function(a){return!g.support.ajaxupload?this:this.each(function(){var b=g(this),c=g.extend({action:b.attr("action"),method:b.attr("method"),loadstart:function(){},load:function(){},loadend:function(){},progress:function(){},complete:function(){},readystatechange:function(){}},a);b.on("submit",function(a){a.preventDefault();a=new FormData(this);var b=new XMLHttpRequest;a.append("formdata","1");b.upload.addEventListener("progress",
function(a){c.progress(100*(a.loaded/a.total),a)},!1);b.addEventListener("loadstart",function(a){c.loadstart(a)},!1);b.addEventListener("load",function(a){c.load(a)},!1);b.addEventListener("loadend",function(a){c.loadend(a)},!1);b.addEventListener("error",function(a){c.error(a)},!1);b.addEventListener("abort",function(a){c.abort(a)},!1);b.open(c.method,c.action,!0);b.onreadystatechange=function(){c.readystatechange(b);if(4==b.readyState){var a=b.responseText;if("json"==c.type)try{a=g.parseJSON(a)}catch(d){a=
!1}c.complete(a,b)}};b.send(a)})})};if(!g.event.special.debouncedresize){var b=g.event,c,d;c=b.special.debouncedresize={setup:function(){g(this).on("resize",c.handler)},teardown:function(){g(this).off("resize",c.handler)},handler:function(a,f){var g=this,m=arguments,k=function(){a.type="debouncedresize";b.dispatch.apply(g,m)};d&&clearTimeout(d);f?k():d=setTimeout(k,c.threshold)},threshold:150}}})(jQuery);
