window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){arguments.callee=arguments.callee.caller;var a=[].slice.call(arguments);(typeof console.log==="object"?log.apply.call(console.log,console,a):console.log.apply(console,a))}};
(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();){b[a]=b[a]||c}})((function(){try
{console.log();return window.console;}catch(err){return window.console={};}})());

// easing
$.easing.easeOutCubic = function (x, t, b, c, d) { return c*((t=t/d-1)*t*t + 1) + b; };

/*!
 * jCarousel - Riding carousels with jQuery
 *   http://sorgalla.com/jcarousel/
 *
 * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Built on top of the jQuery library
 *   http://jquery.com
 *
 * Inspired by the "Carousel Component" by Bill Scott
 *   http://billwscott.com/carousel/
 */

(function(g){var q={vertical:!1,rtl:!1,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,setupCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,animationStepCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click", buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},m=!1;g(window).bind("load.jcarousel",function(){m=!0});g.jcarousel=function(a,c){this.options=g.extend({},q,c||{});this.autoStopped=this.locked=!1;this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!c||c.rtl===void 0)this.options.rtl=(g(a).attr("dir")||g("html").attr("dir")||"").toLowerCase()=="rtl";this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical? this.options.rtl?"right":"left":"top";for(var b="",d=a.className.split(" "),f=0;f<d.length;f++)if(d[f].indexOf("jcarousel-skin")!=-1){g(a).removeClass(d[f]);b=d[f];break}a.nodeName.toUpperCase()=="UL"||a.nodeName.toUpperCase()=="OL"?(this.list=g(a),this.clip=this.list.parents(".jcarousel-clip"),this.container=this.list.parents(".jcarousel-container")):(this.container=g(a),this.list=this.container.find("ul,ol").eq(0),this.clip=this.container.find(".jcarousel-clip"));if(this.clip.size()===0)this.clip= this.list.wrap("<div></div>").parent();if(this.container.size()===0)this.container=this.clip.wrap("<div></div>").parent();b!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('<div class=" '+b+'"></div>');this.buttonPrev=g(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null)this.buttonPrev=g(this.options.buttonPrevHTML).appendTo(this.container);this.buttonPrev.addClass(this.className("jcarousel-prev"));this.buttonNext= g(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null)this.buttonNext=g(this.options.buttonNextHTML).appendTo(this.container);this.buttonNext.addClass(this.className("jcarousel-next"));this.clip.addClass(this.className("jcarousel-clip")).css({position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"}); !this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var j=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null,b=this.list.children("li"),e=this;if(b.size()>0){var h=0,i=this.options.offset;b.each(function(){e.format(this,i++);h+=e.dimension(this,j)});this.list.css(this.wh,h+100+"px");if(!c||c.size===void 0)this.options.size=b.size()}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display", "block");this.funcNext=function(){e.next()};this.funcPrev=function(){e.prev()};this.funcResize=function(){e.resizeTimer&&clearTimeout(e.resizeTimer);e.resizeTimer=setTimeout(function(){e.reload()},100)};this.options.initCallback!==null&&this.options.initCallback(this,"init");!m&&g.browser.safari?(this.buttons(!1,!1),g(window).bind("load.jcarousel",function(){e.setup()})):this.setup()};var f=g.jcarousel;f.fn=f.prototype={jcarousel:"0.2.8"};f.fn.extend=f.extend=g.extend;f.fn.extend({setup:function(){this.prevLast= this.prevFirst=this.last=this.first=null;this.animating=!1;this.tail=this.resizeTimer=this.timer=null;this.inTail=!1;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var a=this.pos(this.options.start,!0);this.prevFirst=this.prevLast=null;this.animate(a,!1);g(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize);this.options.setupCallback!==null&&this.options.setupCallback(this)}},reset:function(){this.list.empty();this.list.css(this.lt, "0px");this.list.css(this.wh,"10px");this.options.initCallback!==null&&this.options.initCallback(this,"reset");this.setup()},reload:function(){this.tail!==null&&this.inTail&&this.list.css(this.lt,f.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=!1;this.options.reloadCallback!==null&&this.options.reloadCallback(this);if(this.options.visible!==null){var a=this,c=Math.ceil(this.clipping()/this.options.visible),b=0,d=0;this.list.children("li").each(function(f){b+=a.dimension(this, c);f+1<a.first&&(d=b)});this.list.css(this.wh,b+"px");this.list.css(this.lt,-d+"px")}this.scroll(this.first,!1)},lock:function(){this.locked=!0;this.buttons()},unlock:function(){this.locked=!1;this.buttons()},size:function(a){if(a!==void 0)this.options.size=a,this.locked||this.buttons();return this.options.size},has:function(a,c){if(c===void 0||!c)c=a;if(this.options.size!==null&&c>this.options.size)c=this.options.size;for(var b=a;b<=c;b++){var d=this.get(b);if(!d.length||d.hasClass("jcarousel-item-placeholder"))return!1}return!0}, get:function(a){return g(">.jcarousel-item-"+a,this.list)},add:function(a,c){var b=this.get(a),d=0,p=g(c);if(b.length===0)for(var j,e=f.intval(a),b=this.create(a);;){if(j=this.get(--e),e<=0||j.length){e<=0?this.list.prepend(b):j.after(b);break}}else d=this.dimension(b);p.get(0).nodeName.toUpperCase()=="LI"?(b.replaceWith(p),b=p):b.empty().append(c);this.format(b.removeClass(this.className("jcarousel-item-placeholder")),a);p=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible): null;d=this.dimension(b,p)-d;a>0&&a<this.first&&this.list.css(this.lt,f.intval(this.list.css(this.lt))-d+"px");this.list.css(this.wh,f.intval(this.list.css(this.wh))+d+"px");return b},remove:function(a){var c=this.get(a);if(c.length&&!(a>=this.first&&a<=this.last)){var b=this.dimension(c);a<this.first&&this.list.css(this.lt,f.intval(this.list.css(this.lt))+b+"px");c.remove();this.list.css(this.wh,f.intval(this.list.css(this.wh))-b+"px")}},next:function(){this.tail!==null&&!this.inTail?this.scrollTail(!1): this.scroll((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!==null&&this.last==this.options.size?1:this.first+this.options.scroll)},prev:function(){this.tail!==null&&this.inTail?this.scrollTail(!0):this.scroll((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!==null&&this.first==1?this.options.size:this.first-this.options.scroll)},scrollTail:function(a){if(!this.locked&&!this.animating&&this.tail){this.pauseAuto();var c=f.intval(this.list.css(this.lt)), c=!a?c-this.tail:c+this.tail;this.inTail=!a;this.prevFirst=this.first;this.prevLast=this.last;this.animate(c)}},scroll:function(a,c){!this.locked&&!this.animating&&(this.pauseAuto(),this.animate(this.pos(a),c))},pos:function(a,c){var b=f.intval(this.list.css(this.lt));if(this.locked||this.animating)return b;this.options.wrap!="circular"&&(a=a<1?1:this.options.size&&a>this.options.size?this.options.size:a);for(var d=this.first>a,g=this.options.wrap!="circular"&&this.first<=1?1:this.first,j=d?this.get(g): this.get(this.last),e=d?g:g-1,h=null,i=0,k=!1,l=0;d?--e>=a:++e<a;){h=this.get(e);k=!h.length;if(h.length===0&&(h=this.create(e).addClass(this.className("jcarousel-item-placeholder")),j[d?"before":"after"](h),this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size)))j=this.get(this.index(e)),j.length&&(h=this.add(e,j.clone(!0)));j=h;l=this.dimension(h);k&&(i+=l);if(this.first!==null&&(this.options.wrap=="circular"||e>=1&&(this.options.size===null||e<= this.options.size)))b=d?b+l:b-l}for(var g=this.clipping(),m=[],o=0,n=0,j=this.get(a-1),e=a;++o;){h=this.get(e);k=!h.length;if(h.length===0){h=this.create(e).addClass(this.className("jcarousel-item-placeholder"));if(j.length===0)this.list.prepend(h);else j[d?"before":"after"](h);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size))j=this.get(this.index(e)),j.length&&(h=this.add(e,j.clone(!0)))}j=h;l=this.dimension(h);if(l===0)throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting..."); this.options.wrap!="circular"&&this.options.size!==null&&e>this.options.size?m.push(h):k&&(i+=l);n+=l;if(n>=g)break;e++}for(h=0;h<m.length;h++)m[h].remove();i>0&&(this.list.css(this.wh,this.dimension(this.list)+i+"px"),d&&(b-=i,this.list.css(this.lt,f.intval(this.list.css(this.lt))-i+"px")));i=a+o-1;if(this.options.wrap!="circular"&&this.options.size&&i>this.options.size)i=this.options.size;if(e>i){o=0;e=i;for(n=0;++o;){h=this.get(e--);if(!h.length)break;n+=this.dimension(h);if(n>=g)break}}e=i-o+ 1;this.options.wrap!="circular"&&e<1&&(e=1);if(this.inTail&&d)b+=this.tail,this.inTail=!1;this.tail=null;if(this.options.wrap!="circular"&&i==this.options.size&&i-o+1>=1&&(d=f.intval(this.get(i).css(!this.options.vertical?"marginRight":"marginBottom")),n-d>g))this.tail=n-g-d;if(c&&a===this.options.size&&this.tail)b-=this.tail,this.inTail=!0;for(;a-- >e;)b+=this.dimension(this.get(a));this.prevFirst=this.first;this.prevLast=this.last;this.first=e;this.last=i;return b},animate:function(a,c){if(!this.locked&& !this.animating){this.animating=!0;var b=this,d=function(){b.animating=!1;a===0&&b.list.css(b.lt,0);!b.autoStopped&&(b.options.wrap=="circular"||b.options.wrap=="both"||b.options.wrap=="last"||b.options.size===null||b.last<b.options.size||b.last==b.options.size&&b.tail!==null&&!b.inTail)&&b.startAuto();b.buttons();b.notify("onAfterAnimation");if(b.options.wrap=="circular"&&b.options.size!==null)for(var c=b.prevFirst;c<=b.prevLast;c++)c!==null&&!(c>=b.first&&c<=b.last)&&(c<1||c>b.options.size)&&b.remove(c)}; this.notify("onBeforeAnimation");if(!this.options.animation||c===!1)this.list.css(this.lt,a+"px"),d();else{var f=!this.options.vertical?this.options.rtl?{right:a}:{left:a}:{top:a},d={duration:this.options.animation,easing:this.options.easing,complete:d};if(g.isFunction(this.options.animationStepCallback))d.step=this.options.animationStepCallback;this.list.animate(f,d)}}},startAuto:function(a){if(a!==void 0)this.options.auto=a;if(this.options.auto===0)return this.stopAuto();if(this.timer===null){this.autoStopped= !1;var c=this;this.timer=window.setTimeout(function(){c.next()},this.options.auto*1E3)}},stopAuto:function(){this.pauseAuto();this.autoStopped=!0},pauseAuto:function(){if(this.timer!==null)window.clearTimeout(this.timer),this.timer=null},buttons:function(a,c){if(a==null&&(a=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size===null||this.last<this.options.size),!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!==null&& this.last>=this.options.size))a=this.tail!==null&&!this.inTail;if(c==null&&(c=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1),!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1))c=this.tail!==null&&this.inTail;var b=this;this.buttonNext.size()>0?(this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext),a&&this.buttonNext.bind(this.options.buttonNextEvent+".jcarousel",this.funcNext), this.buttonNext[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?!1:!0),this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=a&&this.buttonNext.each(function(){b.options.buttonNextCallback(b,this,a)}).data("jcarouselstate",a)):this.options.buttonNextCallback!==null&&this.buttonNextState!=a&&this.options.buttonNextCallback(b,null,a);this.buttonPrev.size()>0?(this.buttonPrev.unbind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev), c&&this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev),this.buttonPrev[c?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",c?!1:!0),this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=c&&this.buttonPrev.each(function(){b.options.buttonPrevCallback(b,this,c)}).data("jcarouselstate",c)):this.options.buttonPrevCallback!==null&&this.buttonPrevState!=c&&this.options.buttonPrevCallback(b,null,c);this.buttonNextState= a;this.buttonPrevState=c},notify:function(a){var c=this.prevFirst===null?"init":this.prevFirst<this.first?"next":"prev";this.callback("itemLoadCallback",a,c);this.prevFirst!==this.first&&(this.callback("itemFirstInCallback",a,c,this.first),this.callback("itemFirstOutCallback",a,c,this.prevFirst));this.prevLast!==this.last&&(this.callback("itemLastInCallback",a,c,this.last),this.callback("itemLastOutCallback",a,c,this.prevLast));this.callback("itemVisibleInCallback",a,c,this.first,this.last,this.prevFirst, this.prevLast);this.callback("itemVisibleOutCallback",a,c,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(a,c,b,d,f,j,e){if(!(this.options[a]==null||typeof this.options[a]!="object"&&c!="onAfterAnimation")){var h=typeof this.options[a]=="object"?this.options[a][c]:this.options[a];if(g.isFunction(h)){var i=this;if(d===void 0)h(i,b,c);else if(f===void 0)this.get(d).each(function(){h(i,this,d,b,c)});else for(var a=function(a){i.get(a).each(function(){h(i,this,a,b,c)})},k=d;k<=f;k++)k!== null&&!(k>=j&&k<=e)&&a(k)}}},create:function(a){return this.format("<li></li>",a)},format:function(a,c){for(var a=g(a),b=a.get(0).className.split(" "),d=0;d<b.length;d++)b[d].indexOf("jcarousel-")!=-1&&a.removeClass(b[d]);a.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+c)).css({"float":this.options.rtl?"right":"left","list-style":"none"}).attr("jcarouselindex",c);return a},className:function(a){return a+" "+a+(!this.options.vertical?"-horizontal":"-vertical")}, dimension:function(a,c){var b=g(a);if(c==null)return!this.options.vertical?b.outerWidth(!0)||f.intval(this.options.itemFallbackDimension):b.outerHeight(!0)||f.intval(this.options.itemFallbackDimension);else{var d=!this.options.vertical?c-f.intval(b.css("marginLeft"))-f.intval(b.css("marginRight")):c-f.intval(b.css("marginTop"))-f.intval(b.css("marginBottom"));g(b).css(this.wh,d+"px");return this.dimension(b)}},clipping:function(){return!this.options.vertical?this.clip[0].offsetWidth-f.intval(this.clip.css("borderLeftWidth"))- f.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-f.intval(this.clip.css("borderTopWidth"))-f.intval(this.clip.css("borderBottomWidth"))},index:function(a,c){if(c==null)c=this.options.size;return Math.round(((a-1)/c-Math.floor((a-1)/c))*c)+1}});f.extend({defaults:function(a){return g.extend(q,a||{})},intval:function(a){a=parseInt(a,10);return isNaN(a)?0:a},windowLoaded:function(){m=!0}});g.fn.jcarousel=function(a){if(typeof a=="string"){var c=g(this).data("jcarousel"),b=Array.prototype.slice.call(arguments, 1);return c[a].apply(c,b)}else return this.each(function(){var b=g(this).data("jcarousel");b?(a&&g.extend(b.options,a),b.reload()):g(this).data("jcarousel",new f(this,a))})}})(jQuery);

 /*
 * TipTip
 * Copyright 2010 Drew Wilson
 * www.drewwilson.com
 * code.drewwilson.com/entry/tiptip-jquery-plugin
 *
 * Version 1.3   -   Updated: Mar. 23, 2010
 *
 * This Plug-In will create a custom tooltip to replace the default
 * browser tooltip. It is extremely lightweight and very smart in
 * that it detects the edges of the browser window and will make sure
 * the tooltip stays within the current window size. As a result the
 * tooltip will adjust itself to be displayed above, below, to the left 
 * or to the right depending on what is necessary to stay within the
 * browser window. It is completely customizable as well via CSS.
 *
 * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
(function(d){d.fn.tipTip=function(g){var k={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:0,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},afterEnter:function(){},exit:function(){},afterExit:function(){},cssClass:"",detectTextDir:true};if(d("#tiptip_holder").length<=0){var i=d("<div>",{id:"tiptip_arrow_inner"}),j=d("<div>",{id:"tiptip_arrow"}).append(i),h=d("<div>",{id:"tiptip_content"}),f=d("<div>",{id:"tiptip_holder"}).append(j).append(h);d("body").append(f)}else{var f=d("#tiptip_holder"),h=d("#tiptip_content"),j=d("#tiptip_arrow")}return this.each(function(){var q=d(this),p=q.data("tipTip"),n=p&&p.options||d.extend({},k,g),m={holder:f,content:h,arrow:j,options:n};if(p){switch(g){case"show":s();break;case"hide":r();break;case"destroy":q.unbind(".tipTip").removeData("tipTip");break;case"position":l()}}else{var o=false;q.data("tipTip",{options:n});if(n.activation=="hover"){q.bind("mouseenter.tipTip",function(){s()}).bind("mouseleave.tipTip",function(){if(!n.keepAlive){r()}else{f.one("mouseleave.tipTip",function(){r()})}})}else{if(n.activation=="focus"){q.bind("focus.tipTip",function(){s()}).bind("blur.tipTip",function(){r()})}else{if(n.activation=="click"){q.bind("click.tipTip",function(t){t.preventDefault();s();return false}).bind("mouseleave.tipTip",function(){if(!n.keepAlive){r()}else{f.one("mouseleave.tipTip",function(){r()})}})}else{if(n.activation=="manual"){}}}}}function s(){if(n.enter.call(q,m)===false){return}var t;if(n.content){t=d.isFunction(n.content)?n.content.call(q,m):n.content}else{t=n.content=q.attr(n.attribute);q.removeAttr(n.attribute)}if(!t){return}h.html(t);f.hide().removeAttr("class").css({"max-width":n.maxWidth});if(n.cssClass){f.addClass(n.cssClass)}l();if(o){clearTimeout(o)}o=setTimeout(function(){f.stop(true,true).fadeIn(n.fadeIn)},n.delay);d(window).bind("resize.tipTip scroll.tipTip",l);q.addClass("tiptip_visible");n.afterEnter.call(q,m)}function r(){if(n.exit.call(q,m)===false){return}if(o){clearTimeout(o)}f.fadeOut(n.fadeOut);d(window).unbind("resize.tipTip scroll.tipTip");q.removeClass("tiptip_visible");n.afterExit.call(q,m)}function l(){var N=q.offset(),u=N.top,G=N.left,Q=q.outerWidth(),v=q.outerHeight(),y,J,L=f.outerWidth(),D=f.outerHeight(),I,P={top:"tip_top",bottom:"tip_bottom",left:"tip_left",right:"tip_right"},F,K,x=12,R=12,B=d(window),C=B.scrollTop(),E=B.scrollLeft(),O=B.width(),H=B.height(),z=n.detectTextDir&&e(h.text());function M(){I=P.top;y=u-D-n.edgeOffset-(R/2);J=G+((Q-L)/2)}function w(){I=P.bottom;y=u+v+n.edgeOffset+(R/2);J=G+((Q-L)/2)}function t(){I=P.left;y=u+((v-D)/2);J=G-L-n.edgeOffset-(x/2)}function A(){I=P.right;y=u+((v-D)/2);J=G+Q+n.edgeOffset+(x/2)}if(n.defaultPosition=="bottom"){w()}else{if(n.defaultPosition=="top"){M()}else{if(n.defaultPosition=="left"&&!z){t()}else{if(n.defaultPosition=="left"&&z){A()}else{if(n.defaultPosition=="right"&&!z){A()}else{if(n.defaultPosition=="right"&&z){t()}else{w()}}}}}}if(I==P.left&&!z&&J<E){A()}else{if(I==P.left&&z&&J-L<E){A()}else{if(I==P.right&&!z&&J>E+O){t()}else{if(I==P.right&&z&&J+L>E+O){t()}else{if(I==P.top&&y<C){w()}else{if(I==P.bottom&&y>C+H){M()}}}}}}if(I==P.left||I==P.right){if(y+D>H+C){y=u+v>H+C?u+v-D:H+C-D}else{if(y<C){y=u<C?u:C}}}if(I==P.top||I==P.bottom){if(J+L>O+E){J=G+Q>O+E?G+Q-L:O+E-L}else{if(J<E){J=G<E?G:E}}}f.css({left:Math.round(J),top:Math.round(y)}).removeClass(P.top).removeClass(P.bottom).removeClass(P.left).removeClass(P.right).addClass(I);if(I==P.top){F=D;K=G-J+((Q-x)/2)}else{if(I==P.bottom){F=-R;K=G-J+((Q-x)/2)}else{if(I==P.left){F=u-y+((v-R)/2);K=L}else{if(I==P.right){F=u-y+((v-R)/2);K=-x}}}}j.css({left:Math.round(K),top:Math.round(F)})}})};var a="A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF",c="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",b=new RegExp("^[^"+a+"]*["+c+"]");function e(f){return b.test(f)}})(jQuery);

/**
 *
 * Use :
 * $(selector).hoverintent(myEnterFunction, myLeaveFunction [, options]);
 * $(selector).mouseenterintent(myFunction [, options]);
 * $(selector).mouseleaveintent(myFunction [, options]);
 * $(selector).bind('mouseenterintent' [, options], myFunction);
 * $(selector).bind('mouseleaveintent' [, options], myFunction);
 *
 * Options :
 *   maxSpeed           : (default: 150) mouse cursor must go slower than this maximum mouse speed (pixels/s)
 *   enterTimeout       : (default: 500) if mouse cursor stay this time (ms) inside the element the enter event is triggered
 *   leaveTimeout       : (default: 300) if mouse cursor go out of the element more than this time (ms) the leave event is triggered
 *   checkSpeedInterval : (default: 40) interval for mouse speed checks (can't be lower than 10)
 *   group              : (default: false) treat all nodes in the jQuery selection as one element
 *
 *
 * This script was inspired by a script written by : Brian Cherne <brian@cherne.net>
 *
 * Free to use, free to study, free to change, free to redistibute
 *
 * @author  : Nicolas Deveaud <nicolas@deveaud.fr>
 * @version : 1.4.1 (realease date: june 26 2011)
 */
(function(window,Math,$,undef){if($===undef){throw new window.Error('Unsolved Dependency : jQuery');}
function HoverIntent(elem,options){var timeoutEnter,timeoutLeave,checkSpeedInterval,inside,event,cur={},prv={};function mousemove(e){cur.X=e.pageX;cur.Y=e.pageY;}
function stopEnterEngine(){window.clearInterval(checkSpeedInterval);window.clearTimeout(timeoutEnter);$(elem).unbind('mousemove',mousemove);prv={};}
function triggerEvent(){inside=!inside;event.type=inside?'mouseenterintent':'mouseleaveintent';$.event.handle.call(elem,event);}
function triggerMouseEnter(){stopEnterEngine();triggerEvent();}
function checkSpeed(){if(prv.X!==undef&&prv.Y!==undef){var speed=(Math.sqrt(Math.pow(prv.X-cur.X,2)+Math.pow(prv.Y-cur.Y,2))/options.checkSpeedInterval)*1000;if(speed<=options.maxSpeed){triggerMouseEnter();}}
prv.X=cur.X;prv.Y=cur.Y;}
function hoverHandler(e){event=e;stopEnterEngine();window.clearTimeout(timeoutLeave);if(e.type==='mouseenter'&&!inside){if(options.maxSpeed>=0){$(elem).mousemove(mousemove);checkSpeedInterval=window.setInterval(checkSpeed,options.checkSpeedInterval);}
timeoutEnter=window.setTimeout(triggerMouseEnter,options.enterTimeout);}
else if(e.type==='mouseleave'&&inside){timeoutLeave=window.setTimeout(triggerEvent,options.leaveTimeout);}}
function init(){options=$.extend({maxSpeed:-1,enterTimeout:0,leaveTimeout:0},options);if(!options.checkSpeedInterval||options.checkSpeedInterval<10){options.checkSpeedInterval=10;}
$(elem).bind('mouseenter mouseleave',hoverHandler);}
this.changeOptions=function changeOptions(opt){for(var i in opt){if(typeof opt[i]==='number'){options[i]=opt[i];}}};this.unbind=function unbind(eventName){if(eventName==='enter'){options.enterTimeout=0;options.maxSpeed=-1;}
else if(eventName==='leave'){options.leaveTimeout=0;}};init();}
function specialEventSetter(eventName,defaultValues){return{setup:function(options){options=$.extend({},defaultValues,options);$(this).each(function(){var instance=$(this).data('HoverIntent');if(instance&&typeof instance.changeOptions==='function'){instance.changeOptions(options);}
else{$(this).data('HoverIntent',new HoverIntent(this,options));}});},teardown:function(){var instance=$(this).data('HoverIntent');if(instance){instance.unbind(eventName);}}};}
function mouseenterintent(fn,options){if(typeof options==='number'){options={maxSpeed:options};if(typeof arguments[2]==='number'){options.enterTimeout=arguments[2];}
if(typeof arguments[3]==='number'){options.checkSpeedInterval=arguments[3];}}
return this.bind('mouseenterintent',options,fn);}
function mouseleaveintent(fn,options){if(typeof options==='number'){options={leaveTimeout:options};}
return this.bind('mouseleaveintent',options,fn);}
function hoverintent(fnin,fnout,options){if(options&&options.group){var spectre={cible:this};$(spectre).bind('mouseenterintent',function(){fnin.apply(this.cible,arguments);}).bind('mouseleaveintent',options,function(){fnout.apply(this.cible,arguments);});return this.bind('mouseenter mouseleave mousemove',function(evt){$.event.handle.call(spectre,evt);});}
return this.bind('mouseenterintent',fnin).bind('mouseleaveintent',options,fnout);}
$.event.special.mouseenterintent=$.event.special.mouseenterintent||specialEventSetter('enter',{maxSpeed:150,enterTimeout:500,checkSpeedInterval:40});$.event.special.mouseleaveintent=$.event.special.mouseleaveintent||specialEventSetter('leave',{leaveTimeout:300});$.fn.mouseenterintent=$.fn.mouseenterintent||mouseenterintent;$.fn.mouseleaveintent=$.fn.mouseleaveintent||mouseleaveintent;$.fn.hoverintent=$.fn.hoverintent||hoverintent;$.fn.hoverIntent=$.fn.hoverIntent||function(f,g){var cfg=$.extend({},g?{over:f,out:g}:f),options={};if(cfg.sensitivity){options.maxSpeed=(cfg.sensitivity/7)*150;}
if(cfg.timeout){options.leaveTimeout=cfg.timeout;}
if(cfg.interval){options.checkSpeedInterval=cfg.interval;}
return $.fn.hoverintent.apply(this,[cfg.over,cfg.out,options]);};}(this,this.Math,this.jQuery));

/**
 * Google Maps InfoBox
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7 p(a){a=a||{};5.8.1N.2h(2,32);2.L=a.1u||"";2.1D=a.1q||H;2.P=a.1H||0;2.E=a.1B||1f 5.8.1U(0,0);2.B=a.W||1f 5.8.2t(0,0);2.S=a.11||q;2.1n=a.1l||"28";2.1k=a.D||{};2.1G=a.1E||"34";2.M=a.19||"2W://2Q.5.2L/2I/2G/2F/1v.2z";3(a.19===""){2.M=""}2.1i=a.1r||1f 5.8.1U(1,1);2.Y=a.1s||H;2.1a=a.1p||H;2.1K=a.2k||"2g";2.17=a.1m||H;2.4=q;2.w=q;2.X=q;2.16=q;2.15=q;2.13=q;2.12=q;2.O=q}p.r=1f 5.8.1N();p.r.22=7(){6 a;6 d=2;6 c=7(e){e.1Z=U;3(e.18){e.18()}};6 b=7(e){e.2S=H;3(e.1Y){e.1Y()}3(!d.17){c(e)}};3(!2.4){2.4=1g.2K("2J");2.1d();3(t 2.L.1w==="u"){2.4.J=2.F()+2.L}v{2.4.J=2.F();2.4.1b(2.L)}2.2y()[2.1K].1b(2.4);2.1F();3(2.4.9.A){2.O=U}v{3(2.P!==0&&2.4.Z>2.P){2.4.9.A=2.P;2.4.9.2u="2s";2.O=U}v{a=2.24();2.4.9.A=(2.4.Z-a.14-a.T)+"R";2.O=H}}2.1t(2.1D);3(!2.17){2.X=5.8.s.I(2.4,"2n",c);2.16=5.8.s.I(2.4,"1L",c);2.15=5.8.s.I(2.4,"2m",c);2.1o=5.8.s.I(2.4,"2l",7(e){2.9.1J="2j"})}2.12=5.8.s.I(2.4,"2i",b);5.8.s.Q(2,"2f")}};p.r.F=7(){6 a="";3(2.M!==""){a="<2e";a+=" 2d=\'"+2.M+"\'";a+=" 2c=T";a+=" 9=\'";a+=" W: 2b;";a+=" 1J: 2a;";a+=" 29: "+2.1G+";";a+="\'>"}N a};p.r.1F=7(){6 a;3(2.M!==""){a=2.4.27;2.w=5.8.s.I(a,\'1L\',2.1I())}v{2.w=q}};p.r.1I=7(){6 a=2;N 7(e){e.1Z=U;3(e.18){e.18()}a.1v();5.8.s.Q(a,"26")}};p.r.1t=7(d){6 m;6 n;6 e=0,G=0;3(!d){m=2.25();3(m 39 5.8.38){3(!m.23().37(2.B)){m.36(2.B)}n=m.23();6 a=m.35();6 h=a.Z;6 f=a.21;6 k=2.E.A;6 l=2.E.1j;6 g=2.4.Z;6 b=2.4.21;6 i=2.1i.A;6 j=2.1i.1j;6 o=2.20().31(2.B);3(o.x<(-k+i)){e=o.x+k-i}v 3((o.x+g+k+i)>h){e=o.x+g+k+i-h}3(2.1a){3(o.y<(-l+j+b)){G=o.y+l-j-b}v 3((o.y+l+j)>f){G=o.y+l+j-f}}v{3(o.y<(-l+j)){G=o.y+l-j}v 3((o.y+b+l+j)>f){G=o.y+b+l+j-f}}3(!(e===0&&G===0)){6 c=m.30();m.2Z(e,G)}}}};p.r.1d=7(){6 i,D;3(2.4){2.4.2Y=2.1n;2.4.9.2X="";D=2.1k;2V(i 2U D){3(D.2R(i)){2.4.9[i]=D[i]}}3(t 2.4.9.1h!=="u"&&2.4.9.1h!==""){2.4.9.2P="2O(1h="+(2.4.9.1h*2N)+")"}2.4.9.W="2M";2.4.9.V=\'1y\';3(2.S!==q){2.4.9.11=2.S}}};p.r.24=7(){6 c;6 a={1e:0,1c:0,14:0,T:0};6 b=2.4;3(1g.1x&&1g.1x.1V){c=b.2H.1x.1V(b,"");3(c){a.1e=C(c.1T,10)||0;a.1c=C(c.1S,10)||0;a.14=C(c.1R,10)||0;a.T=C(c.1W,10)||0}}v 3(1g.2E.K){3(b.K){a.1e=C(b.K.1T,10)||0;a.1c=C(b.K.1S,10)||0;a.14=C(b.K.1R,10)||0;a.T=C(b.K.1W,10)||0}}N a};p.r.2D=7(){3(2.4){2.4.2C.2B(2.4);2.4=q}};p.r.1A=7(){2.22();6 a=2.20().2A(2.B);2.4.9.14=(a.x+2.E.A)+"R";3(2.1a){2.4.9.1c=-(a.y+2.E.1j)+"R"}v{2.4.9.1e=(a.y+2.E.1j)+"R"}3(2.Y){2.4.9.V=\'1y\'}v{2.4.9.V="1X"}};p.r.2T=7(a){3(t a.1l!=="u"){2.1n=a.1l;2.1d()}3(t a.D!=="u"){2.1k=a.D;2.1d()}3(t a.1u!=="u"){2.1Q(a.1u)}3(t a.1q!=="u"){2.1D=a.1q}3(t a.1H!=="u"){2.P=a.1H}3(t a.1B!=="u"){2.E=a.1B}3(t a.1p!=="u"){2.1a=a.1p}3(t a.W!=="u"){2.1z(a.W)}3(t a.11!=="u"){2.1P(a.11)}3(t a.1E!=="u"){2.1G=a.1E}3(t a.19!=="u"){2.M=a.19}3(t a.1r!=="u"){2.1i=a.1r}3(t a.1s!=="u"){2.Y=a.1s}3(t a.1m!=="u"){2.17=a.1m}3(2.4){2.1A()}};p.r.1Q=7(a){2.L=a;3(2.4){3(2.w){5.8.s.z(2.w);2.w=q}3(!2.O){2.4.9.A=""}3(t a.1w==="u"){2.4.J=2.F()+a}v{2.4.J=2.F();2.4.1b(a)}3(!2.O){2.4.9.A=2.4.Z+"R";3(t a.1w==="u"){2.4.J=2.F()+a}v{2.4.J=2.F();2.4.1b(a)}}2.1F()}5.8.s.Q(2,"2x")};p.r.1z=7(a){2.B=a;3(2.4){2.1A()}5.8.s.Q(2,"1O")};p.r.1P=7(a){2.S=a;3(2.4){2.4.9.11=a}5.8.s.Q(2,"2w")};p.r.2v=7(){N 2.L};p.r.1C=7(){N 2.B};p.r.33=7(){N 2.S};p.r.2r=7(){2.Y=H;3(2.4){2.4.9.V="1X"}};p.r.2q=7(){2.Y=U;3(2.4){2.4.9.V="1y"}};p.r.2p=7(c,b){6 a=2;3(b){2.B=b.1C();2.13=5.8.s.2o(b,"1O",7(){a.1z(2.1C())})}2.1M(c);3(2.4){2.1t()}};p.r.1v=7(){3(2.w){5.8.s.z(2.w);2.w=q}3(2.X){5.8.s.z(2.X);5.8.s.z(2.16);5.8.s.z(2.15);5.8.s.z(2.1o);2.X=q;2.16=q;2.15=q;2.1o=q}3(2.13){5.8.s.z(2.13);2.13=q}3(2.12){5.8.s.z(2.12);2.12=q}2.1M(q)};',62,196,'||this|if|div_|google|var|function|maps|style||||||||||||||||InfoBox|null|prototype|event|typeof|undefined|else|closeListener_|||removeListener|width|position_|parseInt|boxStyle|pixelOffset_|getCloseBoxImg_|yOffset|false|addDomListener|innerHTML|currentStyle|content_|closeBoxURL_|return|fixedWidthSet_|maxWidth_|trigger|px|zIndex_|right|true|visibility|position|eventListener1_|isHidden_|offsetWidth||zIndex|contextListener_|moveListener_|left|eventListener3_|eventListener2_|enableEventPropagation_|stopPropagation|closeBoxURL|alignBottom_|appendChild|bottom|setBoxStyle_|top|new|document|opacity|infoBoxClearance_|height|boxStyle_|boxClass|enableEventPropagation|boxClass_|eventListener4_|alignBottom|disableAutoPan|infoBoxClearance|isHidden|panBox_|content|close|nodeType|defaultView|hidden|setPosition|draw|pixelOffset|getPosition|disableAutoPan_|closeBoxMargin|addClickHandler_|closeBoxMargin_|maxWidth|getCloseClickHandler_|cursor|pane_|click|setMap|OverlayView|position_changed|setZIndex|setContent|borderLeftWidth|borderBottomWidth|borderTopWidth|Size|getComputedStyle|borderRightWidth|visible|preventDefault|cancelBubble|getProjection|offsetHeight|createInfoBoxDiv_|getBounds|getBoxWidths_|getMap|closeclick|firstChild|infoBox|margin|pointer|relative|align|src|img|domready|floatPane|apply|contextmenu|default|pane|mouseover|dblclick|mousedown|addListener|open|hide|show|auto|LatLng|overflow|getContent|zindex_changed|content_changed|getPanes|gif|fromLatLngToDivPixel|removeChild|parentNode|onRemove|documentElement|mapfiles|en_us|ownerDocument|intl|div|createElement|com|absolute|100|alpha|filter|www|hasOwnProperty|returnValue|setOptions|in|for|http|cssText|className|panBy|getCenter|fromLatLngToContainerPixel|arguments|getZIndex|2px|getDiv|setCenter|contains|Map|instanceof'.split('|'),0,{}));

/**
 * DropKick
 *
 * Highly customizable <select> lists
 * https://github.com/JamieLottering/DropKick
 *
 * &copy; 2011 Jamie Lottering <http://github.com/JamieLottering>
 *                        <http://twitter.com/JamieLottering>
 * 
 */
(function($,window,document){var ie6=false;if($.browser.msie&&$.browser.version.substr(0,1)<7){ie6=true;}else{document.documentElement.className=document.documentElement.className+" dk_fouc";}var methods={},lists=[],keyMap={"left":37,"up":38,"right":39,"down":40,"enter":13},dropdownTemplate=['<div class="dk_container" id="dk_container_{{ id }}" tabindex="{{ tabindex }}">','<a class="dk_toggle">','<span class="dk_label">{{ label }}</span>',"</a>",'<div class="dk_options">','<ul class="dk_options_inner">',"</ul>","</div>","</div>"].join(""),optionTemplate='<li class="{{ current }}"><a data-dk-dropdown-value="{{ value }}">{{ text }}</a></li>',defaults={startSpeed:1000,theme:false,change:false},keysBound=false;methods.init=function(settings){settings=$.extend({},defaults,settings);return this.each(function(){var $select=$(this),$original=$select.find(":selected").first(),$options=$select.find("option"),data=$select.data("dropkick")||{},id=$select.attr("id")||$select.attr("name"),width=settings.width||$select.outerWidth(),tabindex=$select.attr("tabindex")?$select.attr("tabindex"):"",$dk=false,theme;if(data.id){return $select;}else{data.settings=settings;data.tabindex=tabindex;data.id=id;data.$original=$original;data.$select=$select;data.value=_notBlank($select.val())||_notBlank($original.attr("value"));data.label=$original.text();data.options=$options;}$dk=_build(dropdownTemplate,data);$dk.find(".dk_toggle").css({"width":width+"px"});$select.before($dk);$dk=$("#dk_container_"+id).fadeIn(settings.startSpeed);theme=settings.theme?settings.theme:"default";$dk.addClass("dk_theme_"+theme);data.theme=theme;data.$dk=$dk;$select.data("dropkick",data);$dk.data("dropkick",data);lists[lists.length]=$select;$dk.bind("focus.dropkick",function(e){$dk.addClass("dk_focus");}).bind("blur.dropkick",function(e){$dk.removeClass("dk_open dk_focus");});setTimeout(function(){$select.hide();},0);});};methods.theme=function(newTheme){var $select=$(this),list=$select.data("dropkick"),$dk=list.$dk,oldtheme="dk_theme_"+list.theme;$dk.removeClass(oldtheme).addClass("dk_theme_"+newTheme);list.theme=newTheme;};methods.reset=function(){for(var i=0,l=lists.length;i<l;i++){var listData=lists[i].data("dropkick"),$dk=listData.$dk,$current=$dk.find("li").first();$dk.find(".dk_label").text(listData.label);$dk.find(".dk_options_inner").animate({scrollTop:0},0);_setCurrent($current,$dk);_updateFields($current,$dk,true);}};$.fn.dropkick=function(method){if(!ie6){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);}}}};function _handleKeyBoardNav(e,$dk){var code=e.keyCode,data=$dk.data("dropkick"),options=$dk.find(".dk_options"),open=$dk.hasClass("dk_open"),current=$dk.find(".dk_option_current"),first=options.find("li").first(),last=options.find("li").last(),next,prev;switch(code){case keyMap.enter:if(open){_updateFields(current.find("a"),$dk);_closeDropdown($dk);}else{_openDropdown($dk);}e.preventDefault();break;case keyMap.up:prev=current.prev("li");if(open){if(prev.length){_setCurrent(prev,$dk);}else{_setCurrent(last,$dk);}}else{_openDropdown($dk);}e.preventDefault();break;case keyMap.down:if(open){next=current.next("li").first();if(next.length){_setCurrent(next,$dk);}else{_setCurrent(first,$dk);}}else{_openDropdown($dk);}e.preventDefault();break;default:break;}}function _updateFields(option,$dk,reset){var value,label,data;value=option.attr("data-dk-dropdown-value");label=option.text();data=$dk.data("dropkick");$select=data.$select;$select.val(value);$dk.find(".dk_label").text(label);reset=reset||false;if(data.settings.change&&!reset){data.settings.change.call($select,value,label);}}function _setCurrent($current,$dk){$dk.find(".dk_option_current").removeClass("dk_option_current");$current.addClass("dk_option_current");_setScrollPos($dk,$current);}function _setScrollPos($dk,anchor){var height=anchor.prevAll("li").outerHeight()*anchor.prevAll("li").length;$dk.find(".dk_options_inner").animate({scrollTop:height+"px"},0);}function _closeDropdown($dk){$dk.removeClass("dk_open");}function _openDropdown($dk){var data=$dk.data("dropkick");$dk.find(".dk_options").css({top:$dk.find(".dk_toggle").outerHeight()-1});$dk.toggleClass("dk_open");}function _build(tpl,view){var template=tpl,options=[],$dk;template=template.replace("{{ id }}",view.id);template=template.replace("{{ label }}",view.label);template=template.replace("{{ tabindex }}",view.tabindex);if(view.options&&view.options.length){for(var i=0,l=view.options.length;i<l;i++){var $option=$(view.options[i]),current="dk_option_current",oTemplate=optionTemplate;oTemplate=oTemplate.replace("{{ value }}",$option.val());oTemplate=oTemplate.replace("{{ current }}",(_notBlank($option.val())===view.value)?current:"");oTemplate=oTemplate.replace("{{ text }}",$option.text());options[options.length]=oTemplate;}}$dk=$(template);$dk.find(".dk_options_inner").html(options.join(""));return $dk;}function _notBlank(text){return($.trim(text).length>0)?text:false;}$(function(){$(".dk_toggle").live("click",function(e){var $dk=$(this).parents(".dk_container").first();_openDropdown($dk);if("ontouchstart" in window){$dk.addClass("dk_touch");$dk.find(".dk_options_inner").addClass("scrollable vertical");}e.preventDefault();return false;});$(".dk_options a").live(($.browser.msie?"mousedown":"click"),function(e){var $option=$(this),$dk=$option.parents(".dk_container").first(),data=$dk.data("dropkick");_closeDropdown($dk);_updateFields($option,$dk);_setCurrent($option.parent(),$dk);e.preventDefault();return false;});$(document).bind("keydown.dk_nav",function(e){var $open=$(".dk_container.dk_open"),$focused=$(".dk_container.dk_focus"),$dk=null;if($open.length){$dk=$open;}else{if($focused.length&&!$open.length){$dk=$focused;}}if($dk){_handleKeyBoardNav(e,$dk);}});});})(jQuery,window,document);

/*
 * jQuery scrollstop event
 * http://james.padolsey.com/javascript/special-scroll-events-for-jquery/
 */
(function(){var a=jQuery.event.special,c="D"+(+new Date()),b="D"+(+new Date()+1);a.scrollstart={setup:function(){var e,d=function(h){var f=this,g=arguments;if(e){clearTimeout(e)}else{h.type="scrollstart";jQuery.event.handle.apply(f,g)}e=setTimeout(function(){e=null},a.scrollstop.latency)};jQuery(this).bind("scroll",d).data(c,d)},teardown:function(){jQuery(this).unbind("scroll",jQuery(this).data(c))}};a.scrollstop={latency:300,setup:function(){var e,d=function(h){var f=this,g=arguments;if(e){clearTimeout(e)}e=setTimeout(function(){e=null;h.type="scrollstop";jQuery.event.handle.apply(f,g)},a.scrollstop.latency)};jQuery(this).bind("scroll",d).data(b,d)},teardown:function(){jQuery(this).unbind("scroll",jQuery(this).data(b))}}})();

/*
 * Lazy Load - jQuery plugin for lazy loading images
 *
 * Copyright (c) 2007-2011 Mika Tuupola
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Project home:
 *   http://www.appelsiini.net/projects/lazyload
 *
 * Version:  1.6.0
 *
 */
(function(a){a.fn.lazyload=function(b){var c={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:window,skip_invisible:!0};b&&(null!==b.failurelimit&&(b.failure_limit=b.failurelimit,delete b.failurelimit),a.extend(c,b));var d=this;return 0==c.event.indexOf("scroll")&&a(c.container).bind(c.event,function(b){var e=0;d.each(function(){if(c.skip_invisible&&!a(this).is(":visible"))return;if(!a.abovethetop(this,c)&&!a.leftofbegin(this,c))if(!a.belowthefold(this,c)&&!a.rightoffold(this,c))a(this).trigger("appear");else if(++e>c.failure_limit)return!1});var f=a.grep(d,function(a){return!a.loaded});d=a(f)}),this.each(function(){var b=this;b.loaded=!1,a(b).one("appear",function(){this.loaded||a("<img />").bind("load",function(){a(b).hide().attr("src",a(b).data("original"))[c.effect](c.effectspeed),b.loaded=!0}).attr("src",a(b).data("original"))}),0!=c.event.indexOf("scroll")&&a(b).bind(c.event,function(c){b.loaded||a(b).trigger("appear")})}),a(c.container).trigger(c.event),this},a.belowthefold=function(b,c){if(c.container===undefined||c.container===window)var d=a(window).height()+a(window).scrollTop();else var d=a(c.container).offset().top+a(c.container).height();return d<=a(b).offset().top-c.threshold},a.rightoffold=function(b,c){if(c.container===undefined||c.container===window)var d=a(window).width()+a(window).scrollLeft();else var d=a(c.container).offset().left+a(c.container).width();return d<=a(b).offset().left-c.threshold},a.abovethetop=function(b,c){if(c.container===undefined||c.container===window)var d=a(window).scrollTop();else var d=a(c.container).offset().top;return d>=a(b).offset().top+c.threshold+a(b).height()},a.leftofbegin=function(b,c){if(c.container===undefined||c.container===window)var d=a(window).scrollLeft();else var d=a(c.container).offset().left;return d>=a(b).offset().left+c.threshold+a(b).width()},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0,container:window})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0,container:window})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0,container:window})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0,container:window})}})})(jQuery);
