/*!
 * fancyBox - jQuery Plugin
 * version: 2.0.6 (16/04/2012)
 * @requires jQuery v1.6 or later
 *
 * Examples at http://fancyapps.com/fancybox/
 * License: www.fancyapps.com/fancybox/#license
 *
 * Copyright 2012 Janis Skarnelis - janis@fancyapps.com
 *
 */

(function(a,b,c,d){"use strict";var e=c(a),f=c(b),g=c.fancybox=function(){g.open.apply(this,arguments)},h=false,i=null,j=0,k=b.createTouch!==d,l=function(a){return c.type(a)==="string"},m=function(a){return l(a)&&a.indexOf("%")>0},n=function(a,b){if(b&&m(a)){a=g.getViewport()[b]/100*parseInt(a,10)}return Math.round(a)+"px"};c.extend(g,{version:"2.0.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,removeFirst:false,autoSize:true,autoResize:!k,autoCenter:!k,fitToView:true,aspectRatio:false,topRatio:.5,fixed:false,scrolling:"auto",wrapCSS:"",arrows:true,closeBtn:true,closeClick:false,nextClick:false,mouseWheel:true,autoPlay:false,playSpeed:3e3,preload:3,modal:false,loop:true,ajax:{dataType:"html",headers:{"X-fancyBox":true}},keys:{next:[13,32,34,39,40],prev:[8,33,37,38],close:[27]},index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe class="fancybox-iframe" name="fancybox-frame{rnd}" frameborder="0" hspace="0"'+(c.browser.msie?' allowtransparency="true"':"")+"></iframe>",swf:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{href}" /><embed src="{href}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="100%" height="100%" wmode="transparent"></embed></object>',error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<div title="Close" class="fancybox-item fancybox-close"></div>',next:'<a title="Next" class="fancybox-nav fancybox-next"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev"><span></span></a>'},openEffect:"fade",openSpeed:300,openEasing:"swing",openOpacity:true,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:300,closeEasing:"swing",closeOpacity:true,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:300,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:300,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:{speedIn:0,speedOut:300,opacity:.8,css:{cursor:"pointer"},closeClick:true},title:{type:"float"}},onCancel:c.noop,beforeLoad:c.noop,afterLoad:c.noop,beforeShow:c.noop,afterShow:c.noop,beforeClose:c.noop,afterClose:c.noop},group:{},opts:{},coming:null,current:null,isOpen:false,isOpened:false,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:false},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,b){g.close(true);if(a&&!c.isArray(a)){a=a instanceof c?c(a).get():[a]}if(b.removeFirst){a.splice(0,1)}g.isActive=true;g.opts=c.extend(true,{},g.defaults,b);if(c.isPlainObject(b)&&b.keys!==d){g.opts.keys=b.keys?c.extend({},g.defaults.keys,b.keys):false}g.group=a;g._start(g.opts.index||j)},cancel:function(){if(g.coming&&false===g.trigger("onCancel")){return}g.coming=null;g.hideLoading();if(g.ajaxLoad){g.ajaxLoad.abort()}g.ajaxLoad=null;if(g.imgPreload){g.imgPreload.onload=g.imgPreload.onabort=g.imgPreload.onerror=null}},close:function(a){g.cancel();if(!g.current||false===g.trigger("beforeClose")){return}g.unbindEvents();if(!g.isOpen||a&&a[0]===true){c(".fancybox-wrap").stop().trigger("onReset").remove();g._afterZoomOut()}else{g.isOpen=g.isOpened=false;c(".fancybox-item, .fancybox-nav").remove();g.wrap.stop(true).removeClass("fancybox-opened");g.inner.css("overflow","hidden");g.transitions[g.current.closeMethod]()}},play:function(a){var b=function(){clearTimeout(g.player.timer)},d=function(){b();if(g.current&&g.player.isActive){g.player.timer=setTimeout(g.next,g.current.playSpeed)}},e=function(){b();c("body").unbind(".player");g.player.isActive=false;g.trigger("onPlayEnd")},f=function(){if(g.current&&(g.current.loop||g.current.index<g.group.length-1)){g.player.isActive=true;c("body").bind({"afterShow.player onUpdate.player":d,"onCancel.player beforeClose.player":e,"beforeLoad.player":b});d();g.trigger("onPlayStart")}};if(g.player.isActive||a&&a[0]===false){e()}else{f()}},next:function(){if(g.current){g.jumpto(g.current.index+1)}},prev:function(){if(g.current){g.jumpto(g.current.index-1)}},setIndex:function(a){if(typeof a=="undefined"){a=0}a=parseInt(a);j=a},jumpto:function(a){if(!g.current){return}a=parseInt(a,10);if(g.group.length>1&&g.current.loop){if(a>=g.group.length){a=0}else if(a<0){a=g.group.length-1}}if(g.group[a]!==d){g.cancel();g._start(a)}},reposition:function(a,b){var c;if(g.isOpen){c=g._getPosition(b);if(a&&a.type==="scroll"){delete c.position;g.wrap.stop(true,true).animate(c,200)}else{g.wrap.css(c)}}},update:function(a){if(!g.isOpen){return}if(!h){i=setTimeout(function(){var b=g.current,c=!a||a&&a.type==="orientationchange";if(h){h=false;if(!b){return}if(!a||a.type!=="scroll"||c){if(b.autoSize&&b.type!=="iframe"){g.inner.height("auto");b.height=g.inner.height()}if(b.autoResize||c){g._setDimension()}if(b.canGrow&&b.type!=="iframe"){g.inner.height("auto")}}if(b.autoCenter||c){g.reposition(a)}g.trigger("onUpdate")}},200)}h=true},toggle:function(){if(g.isOpen){g.current.fitToView=!g.current.fitToView;g.update()}},hideLoading:function(){f.unbind("keypress.fb");c("#fancybox-loading").remove()},showLoading:function(){g.hideLoading();f.bind("keypress.fb",function(a){if(a.keyCode===27){a.preventDefault();g.cancel()}});c('<div id="fancybox-loading"><div></div></div>').click(g.cancel).appendTo("body")},getViewport:function(){return{x:e.scrollLeft(),y:e.scrollTop(),w:k&&a.innerWidth?a.innerWidth:e.width(),h:k&&a.innerHeight?a.innerHeight:e.height()}},unbindEvents:function(){if(g.wrap){g.wrap.unbind(".fb")}f.unbind(".fb");e.unbind(".fb")},bindEvents:function(){var a=g.current,b=a.keys;if(!a){return}e.bind("resize.fb orientationchange.fb"+(a.autoCenter&&!a.fixed?" scroll.fb":""),g.update);if(b){f.bind("keydown.fb",function(a){var d,e=a.target||a.srcElement;if(!a.ctrlKey&&!a.altKey&&!a.shiftKey&&!a.metaKey&&!(e&&(e.type||c(e).is("[contenteditable]")))){d=a.keyCode;if(c.inArray(d,b.close)>-1){g.close();a.preventDefault()}else if(c.inArray(d,b.next)>-1){g.next();a.preventDefault()}else if(c.inArray(d,b.prev)>-1){g.prev();a.preventDefault()}}})}if(c.fn.mousewheel&&a.mouseWheel&&g.group.length>1){g.wrap.bind("mousewheel.fb",function(a,b){var c=a.target||null;if(b!==0&&(!c||c.clientHeight===0||c.scrollHeight===c.clientHeight&&c.scrollWidth===c.clientWidth)){a.preventDefault();g[b>0?"prev":"next"]()}})}},trigger:function(a,b){var d,e=b||g[c.inArray(a,["onCancel","beforeLoad","afterLoad"])>-1?"coming":"current"];if(!e){return}if(c.isFunction(e[a])){d=e[a].apply(e,Array.prototype.slice.call(arguments,1))}if(d===false){return false}if(e.helpers){c.each(e.helpers,function(b,d){if(d&&c.isPlainObject(g.helpers[b])&&c.isFunction(g.helpers[b][a])){g.helpers[b][a](d,e)}})}c.event.trigger(a+".fb")},isImage:function(a){return l(a)&&a.match(/\.(jpe?g|gif|png|bmp)((\?|#).*)?$/i)},isSWF:function(a){return l(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var b={},d=g.group[a]||null,e,f,h,i,j;if(d&&(d.nodeType||d instanceof c)){e=true;if(c.metadata){b=c(d).metadata()}}b=c.extend(true,{},g.opts,{index:a,element:d},c.isPlainObject(d)?d:b);c.each(["href","title","content","type"],function(a,f){b[f]=g.opts[f]||e&&c(d).attr(f)||b[f]||null});if(typeof b.margin==="number"){b.margin=[b.margin,b.margin,b.margin,b.margin]}if(b.modal){c.extend(true,b,{closeBtn:false,closeClick:false,nextClick:false,arrows:false,mouseWheel:false,keys:null,helpers:{overlay:{css:{cursor:"auto"},closeClick:false}}})}g.coming=b;if(false===g.trigger("beforeLoad")){g.coming=null;return}h=b.type;f=b.href||d;if(!h){if(e){h=c(d).data("fancybox-type");if(!h){i=d.className.match(/fancybox\.(\w+)/);h=i?i[1]:null}}if(!h&&l(f)){if(g.isImage(f)){h="image"}else if(g.isSWF(f)){h="swf"}else if(f.match(/^#/)){h="inline"}}if(!h){h=e?"inline":"html"}b.type=h}if(h==="inline"||h==="html"){if(!b.content){if(h==="inline"){b.content=c(l(f)?f.replace(/.*(?=#[^\s]+$)/,""):f)}else{b.content=d}}if(!b.content||!b.content.length){h=null}}else if(!f){h=null}if(h==="ajax"&&l(f)){j=f.split(/\s+/,2);f=j.shift();b.selector=j.shift()}b.href=f;b.group=g.group;b.isDom=e;switch(h){case"image":g._loadImage();break;case"ajax":g._loadAjax();break;case"inline":case"iframe":case"swf":case"html":g._afterLoad();break;default:g._error("type")}},_error:function(a){g.hideLoading();c.extend(g.coming,{type:"html",autoSize:true,minWidth:0,minHeight:0,padding:15,hasError:a,content:g.coming.tpl.error});g._afterLoad()},_loadImage:function(){var a=g.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;g.coming.width=this.width;g.coming.height=this.height;g._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;g._error("image")};a.src=g.coming.href;if(a.complete===d||!a.complete){g.showLoading()}},_loadAjax:function(){g.showLoading();g.ajaxLoad=c.ajax(c.extend({},g.coming.ajax,{url:g.coming.href,error:function(a,b){if(g.coming&&b!=="abort"){g._error("ajax",a)}else{g.hideLoading()}},success:function(a,b){if(b==="success"){g.coming.content=a;g._afterLoad()}}}))},_preloadImages:function(){var a=g.group,b=g.current,d=a.length,e,f,h,i=Math.min(b.preload,d-1);if(!b.preload||a.length<2){return}for(h=1;h<=i;h+=1){e=a[(b.index+h)%d];f=e.href||c(e).attr("href")||e;if(e.type==="image"||g.isImage(f)){(new Image).src=f}}},_afterLoad:function(){g.hideLoading();if(!g.coming||false===g.trigger("afterLoad",g.current)){g.coming=false;return}if(g.isOpened){c(".fancybox-item, .fancybox-nav").remove();g.wrap.stop(true).removeClass("fancybox-opened");g.inner.css("overflow","hidden");g.transitions[g.current.prevMethod]()}else{c(".fancybox-wrap").stop().trigger("onReset").remove();g.trigger("afterClose")}g.unbindEvents();g.isOpen=false;g.current=g.coming;g.wrap=c(g.current.tpl.wrap).addClass("fancybox-"+(k?"mobile":"desktop")+" fancybox-type-"+g.current.type+" fancybox-tmp "+g.current.wrapCSS).appendTo("body");g.skin=c(".fancybox-skin",g.wrap).css("padding",n(g.current.padding));g.outer=c(".fancybox-outer",g.wrap);g.inner=c(".fancybox-inner",g.wrap);g._setContent()},_setContent:function(){var a=g.current,b=a.content,d=a.type,e=a.minWidth,f=a.minHeight,h=a.maxWidth,i=a.maxHeight,j;switch(d){case"inline":case"ajax":case"html":if(a.selector){b=c("<div>").html(b).find(a.selector)}else if(b instanceof c){if(b.parent().hasClass("fancybox-inner")){b.parents(".fancybox-wrap").unbind("onReset")}b=b.show().detach();c(g.wrap).bind("onReset",function(){b.appendTo("body").hide()})}if(a.autoSize){j=c('<div class="fancybox-wrap '+g.current.wrapCSS+' fancybox-tmp"></div>').appendTo("body").css({minWidth:n(e,"w"),minHeight:n(f,"h"),maxWidth:n(h,"w"),maxHeight:n(i,"h")}).append(b);a.width=j.width();a.height=j.height();j.width(g.current.width);if(j.height()>a.height){j.width(a.width+1);a.width=j.width();a.height=j.height()}b=j.contents().detach();j.remove()}break;case"image":b=a.tpl.image.replace("{href}",a.href);a.aspectRatio=true;break;case"swf":b=a.tpl.swf.replace(/\{width\}/g,a.width).replace(/\{height\}/g,a.height).replace(/\{href\}/g,a.href);break;case"iframe":b=c(a.tpl.iframe.replace("{rnd}",(new Date).getTime())).attr("scrolling",a.scrolling).attr("src",a.href);a.scrolling=k?"scroll":"auto";break}if(d==="image"||d==="swf"){a.autoSize=false;a.scrolling="visible"}if(d==="iframe"&&a.autoSize){g.showLoading();g._setDimension();g.inner.css("overflow",a.scrolling);b.bind({onCancel:function(){c(this).unbind();g._afterZoomOut()},load:function(){g.hideLoading();try{if(this.contentWindow.document.location){g.current.height=c(this).contents().find("body").height()}}catch(a){g.current.autoSize=false}g[g.isOpen?"_afterZoomIn":"_beforeShow"]()}}).appendTo(g.inner)}else{g.inner.append(b);g._beforeShow()}},_beforeShow:function(){g.coming=null;g.trigger("beforeShow");g._setDimension();g.wrap.hide().removeClass("fancybox-tmp");g.bindEvents();g._preloadImages();g.transitions[g.isOpened?g.current.nextMethod:g.current.openMethod]()},_setDimension:function(){var a=g.wrap,b=g.inner,d=g.current,e=g.getViewport(),f=d.margin,h=d.padding*2,i=d.width,j=d.height,k=d.maxWidth+h,l=d.maxHeight+h,o=d.minWidth+h,p=d.minHeight+h,q,r;e.w-=f[1]+f[3];e.h-=f[0]+f[2];if(m(i)){i=(e.w-h)*parseFloat(i)/100}if(m(j)){j=(e.h-h)*parseFloat(j)/100}q=i/j;i+=h;j+=h;if(d.fitToView){k=Math.min(e.w,k);l=Math.min(e.h,l)}if(d.aspectRatio){if(i>k){i=k;j=(i-h)/q+h}if(j>l){j=l;i=(j-h)*q+h}if(i<o){i=o;j=(i-h)/q+h}if(j<p){j=p;i=(j-h)*q+h}}else{i=Math.max(o,Math.min(i,k));j=Math.max(p,Math.min(j,l))}i=Math.round(i);j=Math.round(j);c(a.add(b)).width("auto").height("auto");b.width(i-h).height(j-h);a.width(i);r=a.height();if(i>k||r>l){while((i>k||r>l)&&i>o&&r>p){j=j-10;if(d.aspectRatio){i=Math.round((j-h)*q+h);if(i<o){i=o;j=(i-h)/q+h}}else{i=i-10}b.width(i-h).height(j-h);a.width(i);r=a.height()}}d.dim={width:n(i),height:n(r)};d.canGrow=d.autoSize&&j>p&&j<l;d.canShrink=false;d.canExpand=false;if(i-h<d.width||j-h<d.height){d.canExpand=true}else if((i>e.w||r>e.h)&&i>o&&j>p){d.canShrink=true}g.innerSpace=r-h-b.height()},_getPosition:function(a){var b=g.current,c=g.getViewport(),d=b.margin,e=g.wrap.width()+d[1]+d[3],f=g.wrap.height()+d[0]+d[2],h={position:"absolute",top:d[0]+c.y,left:d[3]+c.x};if(b.autoCenter&&b.fixed&&!a&&f<=c.h&&e<=c.w){h={position:"fixed",top:d[0],left:d[3]}}h.top=n(Math.max(h.top,h.top+(c.h-f)*b.topRatio));h.left=n(Math.max(h.left,h.left+(c.w-e)*.5));return h},_afterZoomIn:function(){var a=g.current,b=a?a.scrolling:"no";if(!a){return}g.isOpen=g.isOpened=true;g.wrap.addClass("fancybox-opened");g.inner.css("overflow",b==="yes"?"scroll":b==="no"?"hidden":b);g.trigger("afterShow");g.update();if(a.closeClick||a.nextClick){g.inner.css("cursor","pointer").bind("click.fb",function(b){if(!c(b.target).is("a")&&!c(b.target).parent().is("a")){g[a.closeClick?"close":"next"]()}})}if(a.closeBtn){c(a.tpl.closeBtn).appendTo(g.skin).bind("click.fb",g.close)}if(a.arrows&&g.group.length>1){if(a.loop||a.index>0){c(a.tpl.prev).appendTo(g.outer).bind("click.fb",g.prev)}if(a.loop||a.index<g.group.length-1){c(a.tpl.next).appendTo(g.outer).bind("click.fb",g.next)}}if(g.opts.autoPlay&&!g.player.isActive){g.opts.autoPlay=false;g.play()}},_afterZoomOut:function(){var a=g.current;g.wrap.trigger("onReset").remove();c.extend(g,{group:{},opts:{},current:null,isActive:false,isOpened:false,isOpen:false,wrap:null,skin:null,outer:null,inner:null});g.trigger("afterClose",a)}});g.transitions={getOrigPosition:function(){var a=g.current,b=a.element,d=a.padding,e=c(a.orig),f={},h=50,i=50,j;if(!e.length&&a.isDom&&c(b).is(":visible")){e=c(b).find("img:first");if(!e.length){e=c(b)}}if(e.length){f=e.offset();if(e.is("img")){h=e.outerWidth();i=e.outerHeight()}}else{j=g.getViewport();f.top=j.y+(j.h-i)*.5;f.left=j.x+(j.w-h)*.5}f={top:n(f.top-d),left:n(f.left-d),width:n(h+d*2),height:n(i+d*2)};return f},step:function(a,b){var c=b.prop,d,e;if(c==="width"||c==="height"){d=Math.ceil(a-g.current.padding*2);if(c==="height"){e=(a-b.start)/(b.end-b.start);if(b.start>b.end){e=1-e}d-=g.innerSpace*e}g.inner[c](d)}},zoomIn:function(){var a=g.wrap,b=g.current,d=b.openEffect,e=d==="elastic",f=b.dim,h=c.extend({},f,g._getPosition(e)),i=c.extend({opacity:1},h);delete i.position;if(e){h=this.getOrigPosition();if(b.openOpacity){h.opacity=0}g.outer.add(g.inner).width("auto").height("auto")}else if(d==="fade"){h.opacity=0}a.css(h).show().animate(i,{duration:d==="none"?0:b.openSpeed,easing:b.openEasing,step:e?this.step:null,complete:g._afterZoomIn})},zoomOut:function(){var a=g.wrap,b=g.current,c=b.openEffect,d=c==="elastic",e={opacity:0};if(d){if(a.css("position")==="fixed"){a.css(g._getPosition(true))}e=this.getOrigPosition();if(b.closeOpacity){e.opacity=0}}a.animate(e,{duration:c==="none"?0:b.closeSpeed,easing:b.closeEasing,step:d?this.step:null,complete:g._afterZoomOut})},changeIn:function(){var a=g.wrap,b=g.current,c=b.nextEffect,d=c==="elastic",e=g._getPosition(d),f={opacity:1};e.opacity=0;if(d){e.top=n(parseInt(e.top,10)-200);f.top="+=200px"}a.css(e).show().animate(f,{duration:c==="none"?0:b.nextSpeed,easing:b.nextEasing,complete:g._afterZoomIn})},changeOut:function(){var a=g.wrap,b=g.current,d=b.prevEffect,e={opacity:0},f=function(){c(this).trigger("onReset").remove()};a.removeClass("fancybox-opened");if(d==="elastic"){e.top="+=200px"}a.animate(e,{duration:d==="none"?0:b.prevSpeed,easing:b.prevEasing,complete:f})}};g.helpers.overlay={overlay:null,update:function(){var a,d,g;this.overlay.width("100%").height("100%");if(c.browser.msie||k){d=Math.max(b.documentElement.scrollWidth,b.body.scrollWidth);g=Math.max(b.documentElement.offsetWidth,b.body.offsetWidth);a=d<g?e.width():d}else{a=f.width()}this.overlay.width(a).height(f.height())},beforeShow:function(a){if(this.overlay){return}a=c.extend(true,{},g.defaults.helpers.overlay,a);this.overlay=c('<div id="fancybox-overlay"></div>').css(a.css).appendTo("body");if(a.closeClick){this.overlay.bind("click.fb",g.close)}if(g.current.fixed&&!k){this.overlay.addClass("overlay-fixed")}else{this.update();this.onUpdate=function(){this.update()}}this.overlay.fadeTo(a.speedIn,a.opacity)},afterClose:function(a){if(this.overlay){this.overlay.fadeOut(a.speedOut||0,function(){c(this).remove()})}this.overlay=null}};g.helpers.title={beforeShow:function(a){var b,d=g.current.title;if(d){b=c('<div class="fancybox-title fancybox-title-'+a.type+'-wrap">'+d+"</div>").appendTo("body");if(a.type==="float"){b.width(b.width());b.wrapInner('<span class="child"></span>');g.current.margin[2]+=Math.abs(parseInt(b.css("margin-bottom"),10))}b.appendTo(a.type==="over"?g.inner:a.type==="outside"?g.wrap:g.skin)}}};c.fn.fancybox=function(a){var b=c(this),d=this.selector||"",e,h=function(f){var h=this,i=e,j,k;if(!(f.ctrlKey||f.altKey||f.shiftKey||f.metaKey)&&!c(h).is(".fancybox-wrap")){f.preventDefault();j=a.groupAttr||"data-fancybox-group";k=c(h).attr(j);if(!k){j="rel";k=h[j]}if(k&&k!==""&&k!=="nofollow"){h=d.length?c(d):b;h=h.filter("["+j+'="'+k+'"]');i=h.index(this)}a.index=i;g.open(h,a)}};a=a||{};e=a.index||0;if(d){f.undelegate(d,"click.fb-start").delegate(d,"click.fb-start",h)}else{b.unbind("click.fb-start").bind("click.fb-start",h)}return this};c(b).ready(function(){g.defaults.fixed=c.support.fixedPosition||!(c.browser.msie&&c.browser.version<=6)&&!k})})(window,document,jQuery);

(function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);