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