function backTotop(){$("#ModalMenu").height($(window).height());$(window).height()+100<$(document).height()&&$("#top-link-block").removeClass("hidden").affix({offset:{top:100}})}var isSiteISEP=!0,opts,pp_alreadyInitialized;$(document).ready(function(){backTotop();$("#newsTab > li > a").click(function(){backTotop()})});$(document).ready(function(){$(".slider5").bxSlider({slideWidth:300,minSlides:3,maxSlides:3,moveSlides:3,slideMargin:10})});$(document).ready(function(){$(".div_up_menu2").hide();$(".div_down_menu2").hide();$(".a-menu-2").mouseenter(function(){$(".div_up_menu2").hide();$(".div_down_menu2").hide();var n=$(this).attr("id").split("_")[1];$("#div_up_"+n).show();$("#div_down_"+n).show()});$(".div-menu-all").mouseleave(function(){$(".div_up_menu2").hide();$(".div_down_menu2").hide()})});$(window).load(function(){var t=$(".div-link-menu2").length,n=920;t==1&&(n=306);t==2&&(n=612);$(".icon-menu-principal").css("max-width",n+"px");var i=$(".div-menu-2").width(),r=$(".div-menu-all div").height(),u=$(".div-link-menu2").height(),f="-"+(r-u+2)+"px";$(".div_up_menu2").css("top",f);$(".div_up_menu2").css("width",i);$(".div_down_menu2").css("width",i)});$(document).ready(function(){});$(document).ready(function(){$(".news-navigator a").click(function(n){var r,u;n.preventDefault();$(".filter-news .active").removeClass("active");$(this).addClass("active");var t=$(".filter-news .active").attr("id"),f=$("#holderNews"),i=f.clone();$("#holderNews div").fadeIn(1e3);t=="all"?(r=i.find(".typeNew"),$("#holderNews div").fadeIn(1e3)):(r=i.find("div[data-type="+t+"]"),u=i.find(".typeNew"),u.each(function(){var n="#"+$(this).attr("id");$(this).attr("data-type")!=t&&$(n).fadeOut(500)}))});for(var n=$("#p-25 p"),t=$("#p-25").height();n.outerHeight()>t;)n.text(function(n,t){return t.replace(/\W*\s(\S)*$/,"...")})});$(function(){$(".modal-video").click(function(){$("#ModalVideo .modal-body").append('<iframe width="560" height="315" src="https://www.youtube.com/embed/RdhLgf7LIJQ?autoplay=1" frameborder="0" allowfullscreen><\/iframe>');$("#ModalVideo .modal-title").html("O ISEP est&aacute; de parab&eacute;ns: 173 anos de excel&ecirc;ncia e inova&ccedil;&atilde;o");$("#ModalVideo").modal();$("#ModalVideo").on("hidden.bs.modal",function(){$("#ModalVideo .modal-body").html("")})});$(".modal-video_2").click(function(){$("#ModalVideo .modal-body").append('<iframe width="560" height="315" src="https://www.youtube.com/embed/PX8KRE7kdv4?autoplay=1" frameborder="0" allowfullscreen><\/iframe>');$("#ModalVideo .modal-title").html("V&iacute;deo de Natal ISEP");$("#ModalVideo").modal();$("#ModalVideo").on("hidden.bs.modal",function(){$("#ModalVideo .modal-body").html("")})});$(".modal-video_3").click(function(){$("#ModalVideo .modal-body").append('<iframe width="560" height="315" src="https://www.youtube.com/embed/toHt6HRxMe0?autoplay=1" frameborder="0" allowfullscreen><\/iframe>');$("#ModalVideo .modal-title").html("Tutorial de Matr&iacute;cula 24/25");$("#ModalVideo").modal();$("#ModalVideo").on("hidden.bs.modal",function(){$("#ModalVideo .modal-body").html("")})})});opts={lines:13,length:24,width:6,radius:18,scale:.5,corners:1,color:"#888",opacity:.2,rotate:25,direction:1,speed:.8,trail:56,fps:20,zIndex:2e9,className:"spinner-large",top:"51%",left:"50%",shadow:!1,hwaccel:!0,position:"absolute"},function(n){var t={},r={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"bx-wrapper",touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){},onSliderResize:function(){}};n.fn.bxSlider=function(u){var f,e;if(this.length==0)return this;if(this.length>1)return this.each(function(){n(this).bxSlider(u)}),this;f={};e=this;t.el=this;var w=n(window).width(),b=n(window).height(),k=function(){f.settings=n.extend({},r,u);f.settings.slideWidth=parseInt(f.settings.slideWidth);f.children=e.children(f.settings.slideSelector);f.children.length<f.settings.minSlides&&(f.settings.minSlides=f.children.length);f.children.length<f.settings.maxSlides&&(f.settings.maxSlides=f.children.length);f.settings.randomStart&&(f.settings.startSlide=Math.floor(Math.random()*f.children.length));f.active={index:f.settings.startSlide};f.carousel=f.settings.minSlides>1||f.settings.maxSlides>1;f.carousel&&(f.settings.preloadImages="all");f.minThreshold=f.settings.minSlides*f.settings.slideWidth+(f.settings.minSlides-1)*f.settings.slideMargin;f.maxThreshold=f.settings.maxSlides*f.settings.slideWidth+(f.settings.maxSlides-1)*f.settings.slideMargin;f.working=!1;f.controls={};f.interval=null;f.animProp=f.settings.mode=="vertical"?"top":"left";f.usingCSS=f.settings.useCSS&&f.settings.mode!="fade"&&function(){var i=document.createElement("div"),n=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"],t;for(t in n)if(i.style[n[t]]!==undefined)return f.cssPrefix=n[t].replace("Perspective","").toLowerCase(),f.animProp="-"+f.cssPrefix+"-transform",!0;return!1}();f.settings.mode=="vertical"&&(f.settings.maxSlides=f.settings.minSlides);e.data("origStyle",e.attr("style"));e.children(f.settings.slideSelector).each(function(){n(this).data("origStyle",n(this).attr("style"))});ft()},ft=function(){var i,t;e.wrap('<div class="'+f.settings.wrapperClass+'"><div class="bx-viewport"><\/div><\/div>');f.viewport=e.parent();f.loader=n('<div class="bx-loading" />');f.viewport.prepend(f.loader);e.css({width:f.settings.mode=="horizontal"?f.children.length*100+215+"%":"auto",position:"relative"});f.usingCSS&&f.settings.easing?e.css("-"+f.cssPrefix+"-transition-timing-function",f.settings.easing):f.settings.easing||(f.settings.easing="swing");i=h();f.viewport.css({width:"100%",overflow:"hidden",position:"relative"});f.viewport.parent().css({maxWidth:st()});f.settings.pager||f.viewport.parent().css({margin:"0 auto 0px"});f.children.css({float:f.settings.mode=="horizontal"?"left":"none",listStyle:"none",position:"relative"});f.children.css("width",d());f.settings.mode=="horizontal"&&f.settings.slideMargin>0&&f.children.css("marginRight",f.settings.slideMargin);f.settings.mode=="vertical"&&f.settings.slideMargin>0&&f.children.css("marginBottom",f.settings.slideMargin);f.settings.mode=="fade"&&(f.children.css({position:"absolute",zIndex:0,display:"none"}),f.children.eq(f.settings.startSlide).css({zIndex:f.settings.slideZIndex,display:"block"}));f.controls.el=n('<div class="bx-controls" />');f.settings.captions&&at();f.active.last=f.settings.startSlide==o()-1;f.settings.video&&e.fitVids();t=f.children.eq(f.settings.startSlide);f.settings.preloadImages=="all"&&(t=f.children);f.settings.ticker?f.settings.pager=!1:(f.settings.pager&&ht(),f.settings.controls&&ct(),f.settings.auto&&f.settings.autoControls&&lt(),(f.settings.controls||f.settings.autoControls||f.settings.pager)&&f.viewport.after(f.controls.el));et(t,ot)},et=function(t,i){var r=t.find("img, iframe").length,u;if(r==0){i();return}u=0;t.find("img, iframe").each(function(){n(this).one("load",function(){++u==r&&i()}).each(function(){this.complete&&n(this).load()})})},ot=function(){if(f.settings.infiniteLoop&&f.settings.mode!="fade"&&!f.settings.ticker){var t=f.settings.mode=="vertical"?f.settings.minSlides:f.settings.maxSlides,i=f.children.slice(0,t).clone().addClass("bx-clone"),r=f.children.slice(-t).clone().addClass("bx-clone");e.append(i).prepend(r)}f.loader.remove();g();f.settings.mode=="vertical"&&(f.settings.adaptiveHeight=!0);f.viewport.height(l());e.redrawSlider();f.settings.onSliderLoad(f.active.index);f.initialized=!0;f.settings.responsive&&n(window).bind("resize",ut);f.settings.auto&&f.settings.autoStart&&(o()>1||f.settings.autoSlideForOnePage)&&kt();f.settings.ticker&&dt();f.settings.pager&&v(f.settings.startSlide);f.settings.controls&&tt();f.settings.touchEnabled&&!f.settings.ticker&&gt()},l=function(){var r=0,t=n(),u;if(f.settings.mode=="vertical"||f.settings.adaptiveHeight)if(f.carousel)for(u=f.settings.moveSlides==1?f.active.index:f.active.index*c(),t=f.children.eq(u),i=1;i<=f.settings.maxSlides-1;i++)t=u+i>=f.children.length?t.add(f.children.eq(i-1)):t.add(f.children.eq(u+i));else t=f.children.eq(f.active.index);else t=f.children;return f.settings.mode=="vertical"?(t.each(function(){r+=n(this).outerHeight()}),f.settings.slideMargin>0&&(r+=f.settings.slideMargin*(f.settings.minSlides-1))):r=Math.max.apply(Math,t.map(function(){return n(this).outerHeight(!1)}).get()),f.viewport.css("box-sizing")=="border-box"?r+=parseFloat(f.viewport.css("padding-top"))+parseFloat(f.viewport.css("padding-bottom"))+parseFloat(f.viewport.css("border-top-width"))+parseFloat(f.viewport.css("border-bottom-width")):f.viewport.css("box-sizing")=="padding-box"&&(r+=parseFloat(f.viewport.css("padding-top"))+parseFloat(f.viewport.css("padding-bottom"))),r},st=function(){var n="100%";return f.settings.slideWidth>0&&(n=f.settings.mode=="horizontal"?f.settings.maxSlides*f.settings.slideWidth+(f.settings.maxSlides-1)*f.settings.slideMargin:f.settings.slideWidth),n},d=function(){var t=f.settings.slideWidth,n=f.viewport.width();return f.settings.slideWidth==0||f.settings.slideWidth>n&&!f.carousel||f.settings.mode=="vertical"?t=n:f.settings.maxSlides>1&&f.settings.mode=="horizontal"&&(n>f.maxThreshold||n<f.minThreshold&&(t=(n-f.settings.slideMargin*(f.settings.minSlides-1))/f.settings.minSlides)),t},h=function(){var n=1,t;return f.settings.mode=="horizontal"&&f.settings.slideWidth>0?f.viewport.width()<f.minThreshold?n=f.settings.minSlides:f.viewport.width()>f.maxThreshold?n=f.settings.maxSlides:(t=f.children.first().width()+f.settings.slideMargin,n=Math.floor((f.viewport.width()+f.settings.slideMargin)/t)):f.settings.mode=="vertical"&&(n=f.settings.minSlides),n},o=function(){var n=0,t,i;if(f.settings.moveSlides>0)if(f.settings.infiniteLoop)n=Math.ceil(f.children.length/c());else for(t=0,i=0;t<f.children.length;)++n,t=i+h(),i+=f.settings.moveSlides<=h()?f.settings.moveSlides:h();else n=Math.ceil(f.children.length/h());return n},c=function(){return f.settings.moveSlides>0&&f.settings.moveSlides<=h()?f.settings.moveSlides:h()},g=function(){var t,i,n;f.children.length>f.settings.maxSlides&&f.active.last&&!f.settings.infiniteLoop?f.settings.mode=="horizontal"?(t=f.children.last(),n=t.position(),s(-(n.left-(f.viewport.width()-t.outerWidth())),"reset",0)):f.settings.mode=="vertical"&&(i=f.children.length-f.settings.minSlides,n=f.children.eq(i).position(),s(-n.top,"reset",0)):(n=f.children.eq(f.active.index*c()).position(),f.active.index==o()-1&&(f.active.last=!0),n!=undefined&&(f.settings.mode=="horizontal"?s(-n.left,"reset",0):f.settings.mode=="vertical"&&s(-n.top,"reset",0)))},s=function(n,t,i,r){var u,o;f.usingCSS?(u=f.settings.mode=="vertical"?"translate3d(0, "+n+"px, 0)":"translate3d("+n+"px, 0, 0)",e.css("-"+f.cssPrefix+"-transition-duration",i/1e3+"s"),t=="slide"?(e.css(f.animProp,u),e.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){e.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd");y()})):t=="reset"?e.css(f.animProp,u):t=="ticker"&&(e.css("-"+f.cssPrefix+"-transition-timing-function","linear"),e.css(f.animProp,u),e.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){e.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd");s(r.resetValue,"reset",0);a()}))):(o={},o[f.animProp]=n,t=="slide"?e.animate(o,i,f.settings.easing,function(){y()}):t=="reset"?e.css(f.animProp,n):t=="ticker"&&e.animate(o,speed,"linear",function(){s(r.resetValue,"reset",0);a()}))},nt=function(){for(var r="",u=o(),i,t=0;t<u;t++)i="",f.settings.buildPager&&n.isFunction(f.settings.buildPager)?(i=f.settings.buildPager(t),f.pagerEl.addClass("bx-custom-pager")):(i=t+1,f.pagerEl.addClass("bx-default-pager")),r+='<div class="bx-pager-item"><a href="" data-slide-index="'+t+'" class="bx-pager-link">'+i+"<\/a><\/div>";f.pagerEl.html(r)},ht=function(){f.settings.pagerCustom?f.pagerEl=n(f.settings.pagerCustom):(f.pagerEl=n('<div class="bx-pager" />'),f.settings.pagerSelector?n(f.settings.pagerSelector).html(f.pagerEl):f.controls.el.addClass("bx-has-pager").append(f.pagerEl),nt());f.pagerEl.on("click","a",bt)},ct=function(){f.controls.next=n('<a class="bx-next" href="">'+f.settings.nextText+"<\/a>");f.controls.prev=n('<a class="bx-prev" href="">'+f.settings.prevText+"<\/a>");f.controls.next.bind("click",vt);f.controls.prev.bind("click",yt);f.settings.nextSelector&&n(f.settings.nextSelector).append(f.controls.next);f.settings.prevSelector&&n(f.settings.prevSelector).append(f.controls.prev);f.settings.nextSelector||f.settings.prevSelector||(f.controls.directionEl=n('<div class="bx-controls-direction" />'),f.controls.directionEl.append(f.controls.prev).append(f.controls.next),f.controls.el.addClass("bx-has-controls-direction").append(f.controls.directionEl))},lt=function(){f.controls.start=n('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+f.settings.startText+"<\/a><\/div>");f.controls.stop=n('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+f.settings.stopText+"<\/a><\/div>");f.controls.autoEl=n('<div class="bx-controls-auto" />');f.controls.autoEl.on("click",".bx-start",pt);f.controls.autoEl.on("click",".bx-stop",wt);f.settings.autoControlsCombine?f.controls.autoEl.append(f.controls.start):f.controls.autoEl.append(f.controls.start).append(f.controls.stop);f.settings.autoControlsSelector?n(f.settings.autoControlsSelector).html(f.controls.autoEl):f.controls.el.addClass("bx-has-controls-auto").append(f.controls.autoEl);p(f.settings.autoStart?"stop":"start")},at=function(){f.children.each(function(){var t=n(this).find("img:first").attr("title");t!=undefined&&(""+t).length&&n(this).append('<div class="bx-caption"><span>'+t+"<\/span><\/div>")})},vt=function(n){f.settings.auto&&e.stopAuto();e.goToNextSlide();n.preventDefault()},yt=function(n){f.settings.auto&&e.stopAuto();e.goToPrevSlide();n.preventDefault()},pt=function(n){e.startAuto();n.preventDefault()},wt=function(n){e.stopAuto();n.preventDefault()},bt=function(t){var i,r;f.settings.auto&&e.stopAuto();i=n(t.currentTarget);i.attr("data-slide-index")!==undefined&&(r=parseInt(i.attr("data-slide-index")),r!=f.active.index&&e.goToSlide(r),t.preventDefault())},v=function(t){var i=f.children.length;if(f.settings.pagerType=="short"){f.settings.maxSlides>1&&(i=Math.ceil(f.children.length/f.settings.maxSlides));f.pagerEl.html(t+1+f.settings.pagerShortSeparator+i);return}f.pagerEl.find("a").removeClass("active");f.pagerEl.each(function(i,r){n(r).find("a").eq(t).addClass("active")})},y=function(){if(f.settings.infiniteLoop){var n="";f.active.index==0?n=f.children.eq(0).position():f.active.index==o()-1&&f.carousel?n=f.children.eq((o()-1)*c()).position():f.active.index==f.children.length-1&&(n=f.children.eq(f.children.length-1).position());n&&(f.settings.mode=="horizontal"?s(-n.left,"reset",0):f.settings.mode=="vertical"&&s(-n.top,"reset",0))}f.working=!1;f.settings.onSlideAfter(f.children.eq(f.active.index),f.oldIndex,f.active.index)},p=function(n){f.settings.autoControlsCombine?f.controls.autoEl.html(f.controls[n]):(f.controls.autoEl.find("a").removeClass("active"),f.controls.autoEl.find("a:not(.bx-"+n+")").addClass("active"))},tt=function(){o()==1?(f.controls.prev.addClass("disabled"),f.controls.next.addClass("disabled")):!f.settings.infiniteLoop&&f.settings.hideControlOnEnd&&(f.active.index==0?(f.controls.prev.addClass("disabled"),f.controls.next.removeClass("disabled")):f.active.index==o()-1?(f.controls.next.addClass("disabled"),f.controls.prev.removeClass("disabled")):(f.controls.prev.removeClass("disabled"),f.controls.next.removeClass("disabled")))},kt=function(){if(f.settings.autoDelay>0)var n=setTimeout(e.startAuto,f.settings.autoDelay);else e.startAuto();f.settings.autoHover&&e.hover(function(){f.interval&&(e.stopAuto(!0),f.autoPaused=!0)},function(){f.autoPaused&&(e.startAuto(!0),f.autoPaused=null)})},dt=function(){var i=0,t;f.settings.autoDirection=="next"?e.append(f.children.clone().addClass("bx-clone")):(e.prepend(f.children.clone().addClass("bx-clone")),t=f.children.first().position(),i=f.settings.mode=="horizontal"?-t.left:-t.top);s(i,"reset",0);f.settings.pager=!1;f.settings.controls=!1;f.settings.autoControls=!1;f.settings.tickerHover&&!f.usingCSS&&f.viewport.hover(function(){e.stop()},function(){var t=0;f.children.each(function(){t+=f.settings.mode=="horizontal"?n(this).outerWidth(!0):n(this).outerHeight(!0)});var i=f.settings.speed/t,r=f.settings.mode=="horizontal"?"left":"top",u=i*(t-Math.abs(parseInt(e.css(r))));a(u)});a()},a=function(n){var t,i;speed=n?n:f.settings.speed;t={left:0,top:0};i={left:0,top:0};f.settings.autoDirection=="next"?t=e.find(".bx-clone").first().position():i=f.children.first().position();var r=f.settings.mode=="horizontal"?-t.left:-t.top,u=f.settings.mode=="horizontal"?-i.left:-i.top,o={resetValue:u};s(r,"ticker",speed,o)},gt=function(){f.touch={start:{x:0,y:0},end:{x:0,y:0}};f.viewport.bind("touchstart",ni)},ni=function(n){if(f.working)n.preventDefault();else{f.touch.originalPos=e.position();var t=n.originalEvent;f.touch.start.x=t.changedTouches[0].pageX;f.touch.start.y=t.changedTouches[0].pageY;f.viewport.bind("touchmove",it);f.viewport.bind("touchend",rt)}},it=function(n){var i=n.originalEvent,u=Math.abs(i.changedTouches[0].pageX-f.touch.start.x),e=Math.abs(i.changedTouches[0].pageY-f.touch.start.y),r,t;u*3>e&&f.settings.preventDefaultSwipeX?n.preventDefault():e*3>u&&f.settings.preventDefaultSwipeY&&n.preventDefault();f.settings.mode!="fade"&&f.settings.oneToOneTouch&&(r=0,f.settings.mode=="horizontal"?(t=i.changedTouches[0].pageX-f.touch.start.x,r=f.touch.originalPos.left+t):(t=i.changedTouches[0].pageY-f.touch.start.y,r=f.touch.originalPos.top+t),s(r,"reset",0))},rt=function(n){var r,i,t;f.viewport.unbind("touchmove",it);r=n.originalEvent;i=0;f.touch.end.x=r.changedTouches[0].pageX;f.touch.end.y=r.changedTouches[0].pageY;f.settings.mode=="fade"?(t=Math.abs(f.touch.start.x-f.touch.end.x),t>=f.settings.swipeThreshold&&(f.touch.start.x>f.touch.end.x?e.goToNextSlide():e.goToPrevSlide(),e.stopAuto())):(t=0,f.settings.mode=="horizontal"?(t=f.touch.end.x-f.touch.start.x,i=f.touch.originalPos.left):(t=f.touch.end.y-f.touch.start.y,i=f.touch.originalPos.top),!f.settings.infiniteLoop&&(f.active.index==0&&t>0||f.active.last&&t<0)?s(i,"reset",200):Math.abs(t)>=f.settings.swipeThreshold?(t<0?e.goToNextSlide():e.goToPrevSlide(),e.stopAuto()):s(i,"reset",200));f.viewport.unbind("touchend",rt)},ut=function(){if(f.initialized){var t=n(window).width(),i=n(window).height();(w!=t||b!=i)&&(w=t,b=i,e.redrawSlider(),f.settings.onSliderResize.call(e,f.active.index))}};return e.goToSlide=function(t,i){var h,r,a,p,u,w,b;if(!f.working&&f.active.index!=t){f.working=!0;f.oldIndex=f.active.index;f.active.index=t<0?o()-1:t>=o()?0:t;f.settings.onSlideBefore(f.children.eq(f.active.index),f.oldIndex,f.active.index);if(i=="next")f.settings.onSlideNext(f.children.eq(f.active.index),f.oldIndex,f.active.index);else if(i=="prev")f.settings.onSlidePrev(f.children.eq(f.active.index),f.oldIndex,f.active.index);f.active.last=f.active.index>=o()-1;f.settings.pager&&v(f.active.index);f.settings.controls&&tt();f.settings.mode=="fade"?(f.settings.adaptiveHeight&&f.viewport.height()!=l()&&f.viewport.animate({height:l()},f.settings.adaptiveHeightSpeed),f.children.filter(":visible").fadeOut(f.settings.speed).css({zIndex:0}),f.children.eq(f.active.index).css("zIndex",f.settings.slideZIndex+1).fadeIn(f.settings.speed,function(){n(this).css("zIndex",f.settings.slideZIndex);y()})):(f.settings.adaptiveHeight&&f.viewport.height()!=l()&&f.viewport.animate({height:l()},f.settings.adaptiveHeightSpeed),h=0,r={left:0,top:0},!f.settings.infiniteLoop&&f.carousel&&f.active.last?f.settings.mode=="horizontal"?(u=f.children.eq(f.children.length-1),r=u.position(),h=f.viewport.width()-u.outerWidth()):(a=f.children.length-f.settings.minSlides,r=f.children.eq(a).position()):f.carousel&&f.active.last&&i=="prev"?(p=f.settings.moveSlides==1?f.settings.maxSlides-c():(o()-1)*c()-(f.children.length-f.settings.maxSlides),u=e.children(".bx-clone").eq(p),r=u.position()):i=="next"&&f.active.index==0?(r=e.find("> .bx-clone").eq(f.settings.maxSlides).position(),f.active.last=!1):t>=0&&(w=t*c(),r=f.children.eq(w).position()),"undefined"!=typeof r&&(b=f.settings.mode=="horizontal"?-(r.left-h):-r.top,s(b,"slide",f.settings.speed)))}},e.goToNextSlide=function(){if(f.settings.infiniteLoop||!f.active.last){var n=parseInt(f.active.index)+1;e.goToSlide(n,"next")}},e.goToPrevSlide=function(){if(f.settings.infiniteLoop||f.active.index!=0){var n=parseInt(f.active.index)-1;e.goToSlide(n,"prev")}},e.startAuto=function(n){f.interval||(f.interval=setInterval(function(){f.settings.autoDirection=="next"?e.goToNextSlide():e.goToPrevSlide()},f.settings.pause),f.settings.autoControls&&n!=!0&&p("stop"))},e.stopAuto=function(n){f.interval&&(clearInterval(f.interval),f.interval=null,f.settings.autoControls&&n!=!0&&p("start"))},e.getCurrentSlide=function(){return f.active.index},e.getCurrentSlideElement=function(){return f.children.eq(f.active.index)},e.getSlideCount=function(){return f.children.length},e.redrawSlider=function(){f.children.add(e.find(".bx-clone")).width(d());f.viewport.css("height",l());f.settings.ticker||g();f.active.last&&(f.active.index=o()-1);f.active.index>=o()&&(f.active.last=!0);f.settings.pager&&!f.settings.pagerCustom&&(nt(),v(f.active.index))},e.destroySlider=function(){f.initialized&&(f.initialized=!1,n(".bx-clone",this).remove(),f.children.each(function(){n(this).data("origStyle")!=undefined?n(this).attr("style",n(this).data("origStyle")):n(this).removeAttr("style")}),n(this).data("origStyle")!=undefined?this.attr("style",n(this).data("origStyle")):n(this).removeAttr("style"),n(this).unwrap().unwrap(),f.controls.el&&f.controls.el.remove(),f.controls.next&&f.controls.next.remove(),f.controls.prev&&f.controls.prev.remove(),f.pagerEl&&f.settings.controls&&f.pagerEl.remove(),n(".bx-caption",this).remove(),f.controls.autoEl&&f.controls.autoEl.remove(),clearInterval(f.interval),f.settings.responsive&&n(window).unbind("resize",ut))},e.reloadSlider=function(n){n!=undefined&&(u=n);e.destroySlider();k()},k(),this}}(jQuery),function(n){var t=function(n){var t=n.clone(),i=n.find("canvas"),r;return i.length&&(r=t.find("canvas"),r.each(function(n){var t=this.getContext("2d");t.drawImage(i.get(n),0,0)})),t};n.fn.quicksand=function(i,r){var u={duration:750,easing:"swing",attribute:"data-id",adjustHeight:"auto",adjustWidth:"auto",useScaling:!1,enhancement:function(){},selector:"> *",atomic:!1,dx:0,dy:0,maxWidth:0,retainExisting:!0},e=function(){for(var t="transform WebkitTransform MozTransform OTransform msTransform".split(" "),i=document.createElement("div"),n=0;n<t.length;n++)if(typeof i.style[t[n]]!="undefined")return!0;return!1}(),f;return n.extend(u,r),e&&typeof n.fn.scale!="undefined"||(u.useScaling=!1),typeof arguments[1]=="function"?f=arguments[1]:typeof(arguments[2]=="function")&&(f=arguments[2]),this.each(function(r){var y,s=[],a,b,k,h,c,d,tt;a=typeof u.attribute=="function"?n(i):t(n(i).filter("["+u.attribute+"]"));var e=n(this),st=n(this).css("height"),it=n(this).css("width"),p,g,rt=!1,ut=!1,ft=n(e).offset(),w=[],v=n(this).find(u.selector),et=n(v).innerWidth();if(navigator.userAgent.match(/msie [6]/i)){e.html("").append(a);return}var ot=0,nt=function(){var t,i;n(this).css("margin","").css("position","").css("top","").css("left","").css("opacity","");ot||(ot=1,u.atomic||(t=e.find(u.selector),u.retainExisting?(i=n([]),h.find(u.selector).each(function(r){var f=n([]),o;typeof u.attribute=="function"?(o=u.attribute(n(this)),t.each(function(){if(u.attribute(this)==o)return f=n(this),!1})):f=t.filter("["+u.attribute+'="'+n(this).attr(u.attribute)+'"]');f.length>0&&(i=i.add(f),r===0?e.prepend(f):f.insertAfter(e.find(u.selector).get(r-1)))}),t.not(i).remove()):(e.prepend(h.find(u.selector)),t.remove()),rt&&e.css("height",p),ut&&e.css("width",it)),u.enhancement(e),typeof f=="function"&&f.call(this));!1===u.adjustHeight&&e.css("height","auto");!1===u.adjustWidth&&e.css("width","auto")},l=e.offsetParent(),o=l.offset();if(l.css("position")=="relative"?l.get(0).nodeName.toLowerCase()!="body"&&(o.top+=parseFloat(l.css("border-top-width"))||0,o.left+=parseFloat(l.css("border-left-width"))||0):(o.top-=parseFloat(l.css("border-top-width"))||0,o.left-=parseFloat(l.css("border-left-width"))||0,o.top-=parseFloat(l.css("margin-top"))||0,o.left-=parseFloat(l.css("margin-left"))||0),isNaN(o.left)&&(o.left=0),isNaN(o.top)&&(o.top=0),o.left-=u.dx,o.top-=u.dy,e.css("height",n(this).height()),e.css("width",n(this).width()),v.each(function(t){w[t]=n(this).offset()}),n(this).stop(),b=0,k=0,v.each(function(t){n(this).stop();var i=n(this).get(0);i.style.position=="absolute"?(b=-u.dx,k=-u.dy):(b=u.dx,k=u.dy);i.style.position="absolute";i.style.margin="0";u.adjustWidth||(i.style.width=et+"px");i.style.top=w[t].top-parseFloat(i.style.marginTop)-o.top+k+"px";i.style.left=w[t].left-parseFloat(i.style.marginLeft)-o.left+b+"px";u.maxWidth>0&&w[t].left>u.maxWidth&&(i.style.display="none")}),h=t(n(e)),c=h.get(0),c.innerHTML="",c.setAttribute("id",""),c.style.height="auto",c.style.width=e.width()+"px",h.append(a),h.insertBefore(e),h.css("opacity",0),c.style.zIndex=-1,c.style.margin="0",c.style.position="absolute",c.style.top=ft.top-o.top+"px",c.style.left=ft.left-o.left+"px",u.adjustHeight==="dynamic"?e.animate({height:h.height()},u.duration,u.easing):u.adjustHeight==="auto"&&(p=h.height(),parseFloat(st)<parseFloat(p)?e.css("height",p):rt=!0),u.adjustWidth==="dynamic"?e.animate({width:h.width()},u.duration,u.easing):u.adjustWidth==="auto"&&(g=h.width(),parseFloat(it)<parseFloat(g)?e.css("width",g):ut=!0),v.each(function(){var t=[];typeof u.attribute=="function"?(y=u.attribute(n(this)),a.each(function(){if(u.attribute(this)==y)return t=n(this),!1})):t=a.filter("["+u.attribute+'="'+n(this).attr(u.attribute)+'"]');t.length?u.useScaling?s.push({element:n(this),dest:t,style:{top:n(this).offset().top,left:n(this).offset().left,opacity:""},animation:{top:t.offset().top-o.top,left:t.offset().left-o.left,opacity:1,scale:"1.0"}}):s.push({element:n(this),dest:t,style:{top:n(this).offset().top,left:n(this).offset().left,opacity:""},animation:{top:t.offset().top-o.top,left:t.offset().left-o.left,opacity:1}}):u.useScaling?s.push({element:n(this),animation:{opacity:"0.0",style:{top:n(this).offset().top,left:n(this).offset().left,opacity:""},scale:"0.0"}}):s.push({element:n(this),style:{top:n(this).offset().top,left:n(this).offset().left,opacity:""},animation:{opacity:"0.0"}})}),a.each(function(){var h=[],i=[],c,r,f;typeof u.attribute=="function"?(y=u.attribute(n(this)),v.each(function(){if(u.attribute(this)==y)return h=n(this),!1}),a.each(function(){if(u.attribute(this)==y)return i=n(this),!1})):(h=v.filter("["+u.attribute+'="'+n(this).attr(u.attribute)+'"]'),i=a.filter("["+u.attribute+'="'+n(this).attr(u.attribute)+'"]'));h.length===0&&i.length>0&&(c=u.useScaling?{opacity:"1.0",scale:"1.0"}:{opacity:"1.0"},r=t(i),f=r.get(0),f.style.position="absolute",f.style.margin="0",u.adjustWidth||(f.style.width=et+"px"),f.style.top=i.offset().top-o.top+"px",f.style.left=i.offset().left-o.left+"px",r.css("opacity",0),u.useScaling&&r.scale(0),r.appendTo(e),(u.maxWidth===0||i.offset().left<u.maxWidth)&&s.push({element:n(r),dest:i,animation:c}))}),h.remove(),u.atomic){for($toDelete=e.find(u.selector),e.prepend(h.find(u.selector)),r=0;r<s.length;r++)s[r].dest&&s[r].style?(d=s[r].dest,tt=d.offset(),d.css({position:"relative",top:s[r].style.top-tt.top,left:s[r].style.left-tt.left}),d.animate({top:"0",left:"0"},u.duration,u.easing,nt)):s[r].element.animate(s[r].animation,u.duration,u.easing,nt);$toDelete.remove()}else for(u.enhancement(e),r=0;r<s.length;r++)s[r].element.animate(s[r].animation,u.duration,u.easing,nt)})}}(jQuery),function(n){function i(){return url=location.href,hashtag=url.indexOf("#prettyPhoto")!==-1?decodeURI(url.substring(url.indexOf("#prettyPhoto")+1,url.length)):!1}function r(){typeof theRel!="undefined"&&(location.hash=theRel+"/"+rel_index+"/")}function u(){location.href.indexOf("#prettyPhoto")!==-1&&(location.hash="prettyPhoto")}function t(n,t){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var r="[\\?&]"+n+"=([^&#]*)",u=new RegExp(r),i=u.exec(t);return i==null?"":i[1]}n.prettyPhoto={version:"3.1.4"};n.fn.prettyPhoto=function(f){function b(){n(".pp_loaderIcon").hide();projectedTop=scroll_pos.scrollTop+(h/2-e.containerHeight/2);projectedTop<0&&(projectedTop=0);$ppt.fadeTo(settings.animation_speed,1);$pp_pic_holder.find(".pp_content").animate({height:e.contentHeight,width:e.contentWidth},settings.animation_speed);$pp_pic_holder.animate({top:projectedTop,left:s/2-e.containerWidth/2<0?0:s/2-e.containerWidth/2,width:e.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(e.height).width(e.width);$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);isSet&&k(pp_images[set_position])=="image"?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide();settings.allow_expand&&(e.resized?n("a.pp_expand,a.pp_contract").show():n("a.pp_expand").hide());!settings.autoplay_slideshow||a||p||n.prettyPhoto.startSlideshow();settings.changepicturecallback();p=!0});et();f.ajaxcallback()}function nt(t){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden");$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){n(".pp_loaderIcon").show();t()})}function ut(t){t>1?n(".pp_nav").show():n(".pp_nav").hide()}function o(n,t){if(resized=!1,tt(n,t),imageWidth=n,imageHeight=t,(l>s||c>h)&&doresize&&settings.allow_resize&&!v){for(resized=!0,fitting=!1;!fitting;)l>s?(imageWidth=s-200,imageHeight=t/n*imageWidth):c>h?(imageHeight=h-200,imageWidth=n/t*imageHeight):fitting=!0,c=imageHeight,l=imageWidth;tt(imageWidth,imageHeight);(l>s||c>h)&&o(l,c)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(c),containerWidth:Math.floor(l)+settings.horizontal_padding*2,contentHeight:Math.floor(w),contentWidth:Math.floor(g),resized:resized}}function tt(t,i){t=parseFloat(t);i=parseFloat(i);$pp_details=$pp_pic_holder.find(".pp_details");$pp_details.width(t);detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom"));$pp_details=$pp_details.clone().addClass(settings.theme).width(t).appendTo(n("body")).css({position:"absolute",top:-1e4});detailsHeight+=$pp_details.height();detailsHeight=detailsHeight<=34?36:detailsHeight;n.browser.msie&&n.browser.version==7&&(detailsHeight+=8);$pp_details.remove();$pp_title=$pp_pic_holder.find(".ppt");$pp_title.width(t);titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom"));$pp_title=$pp_title.clone().appendTo(n("body")).css({position:"absolute",top:-1e4});titleHeight+=$pp_title.height();$pp_title.remove();w=i+detailsHeight;g=t;c=w+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height();l=t}function k(n){return n.match(/youtube\.com\/watch/i)||n.match(/youtu\.be/i)?"youtube":n.match(/vimeo\.com/i)?"vimeo":n.match(/\b.mov\b/i)?"quicktime":n.match(/\b.swf\b/i)?"flash":n.match(/\biframe=true\b/i)?"iframe":n.match(/\bajax=true\b/i)?"ajax":n.match(/\bcustom=true\b/i)?"custom":n.substr(0,1)=="#"?"inline":"image"}function d(){if(doresize&&typeof $pp_pic_holder!="undefined"){if(scroll_pos=it(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=h/2+scroll_pos.scrollTop-contentHeight/2,projectedTop<0&&(projectedTop=0),contentHeight>h)return;$pp_pic_holder.css({top:projectedTop,left:s/2+scroll_pos.scrollLeft-contentwidth/2})}}function it(){return self.pageYOffset?{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}:document.documentElement&&document.documentElement.scrollTop?{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}:document.body?{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}:void 0}function ft(){h=n(window).height();s=n(window).width();typeof $pp_overlay!="undefined"&&$pp_overlay.height(n(document).height()).width(s)}function et(){isSet&&settings.overlay_gallery&&k(pp_images[set_position])=="image"&&settings.ie6_fallback&&!(n.browser.msie&&parseInt(n.browser.version)==6)?(itemWidth=57,navWidth=settings.theme=="facebook"||settings.theme=="pp_default"?50:30,itemsPerPage=Math.floor((e.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length,totalPage=Math.ceil(pp_images.length/itemsPerPage)-1,totalPage==0?(navWidth=0,$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()):$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show(),galleryWidth=itemsPerPage*itemWidth,fullGalleryWidth=pp_images.length*itemWidth,$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div:first").width(galleryWidth+5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected"),goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage,n.prettyPhoto.changeGalleryPage(goToPage),$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")):$pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave")}function rt(){if(settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href))),settings.markup=settings.markup.replace("{pp_social}",""),n("body").append(settings.markup),$pp_pic_holder=n(".pp_pic_holder"),$ppt=n(".ppt"),$pp_overlay=n("div.pp_overlay"),isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var t=0;t<pp_images.length;t++)pp_images[t].match(/\b(jpg|jpeg|png|gif)\b/gi)?(classname="",img_src=pp_images[t]):(classname="default",img_src=""),toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /><\/a><\/li>";toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find("#pp_full_res").after(toInject);$pp_gallery=n(".pp_pic_holder .pp_gallery");$pp_gallery_li=$pp_gallery.find("li");$pp_gallery.find(".pp_arrow_next").click(function(){return n.prettyPhoto.changeGalleryPage("next"),n.prettyPhoto.stopSlideshow(),!1});$pp_gallery.find(".pp_arrow_previous").click(function(){return n.prettyPhoto.changeGalleryPage("previous"),n.prettyPhoto.stopSlideshow(),!1});$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()});itemWidth=57;$pp_gallery_li.each(function(t){n(this).find("a").click(function(){return n.prettyPhoto.changePage(t),n.prettyPhoto.stopSlideshow(),!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play<\/a>'),$pp_pic_holder.find(".pp_nav .pp_play").click(function(){return n.prettyPhoto.startSlideshow(),!1}));$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme);$pp_overlay.css({opacity:0,height:n(document).height(),width:n(window).width()}).bind("click",function(){settings.modal||n.prettyPhoto.close()});n("a.pp_close").bind("click",function(){return n.prettyPhoto.close(),!1});settings.allow_expand&&n("a.pp_expand").bind("click",function(){return n(this).hasClass("pp_expand")?(n(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(n(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0),nt(function(){n.prettyPhoto.open()}),!1});$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){return n.prettyPhoto.changePage("previous"),n.prettyPhoto.stopSlideshow(),!1});$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){return n.prettyPhoto.changePage("next"),n.prettyPhoto.stopSlideshow(),!1});d()}f=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'<div class="pp_pic_holder">       <div class="ppt">&nbsp;<\/div>       <div class="pp_top">        <div class="pp_left"><\/div>        <div class="pp_middle"><\/div>        <div class="pp_right"><\/div>       <\/div>       <div class="pp_content_container">        <div class="pp_left">        <div class="pp_right">         <div class="pp_content">          <div class="pp_loaderIcon"><\/div>          <div class="pp_fade">           <a href="#" class="pp_expand" title="Expand the image">Expand<\/a>           <div class="pp_hoverContainer">            <a class="pp_next" href="#">next<\/a>            <a class="pp_previous" href="#">previous<\/a>           <\/div>           <div id="pp_full_res"><\/div>           <div class="pp_details">            <div class="pp_nav">             <a href="#" class="pp_arrow_previous">Previous<\/a>             <p class="currentTextHolder">0/0<\/p>             <a href="#" class="pp_arrow_next">Next<\/a>            <\/div>            <p class="pp_description"><\/p>            <div class="pp_social">{pp_social}<\/div>            <a class="pp_close" href="#">Close<\/a>           <\/div>          <\/div>         <\/div>        <\/div>        <\/div>       <\/div>       <div class="pp_bottom">        <div class="pp_left"><\/div>        <div class="pp_middle"><\/div>        <div class="pp_right"><\/div>       <\/div>      <\/div>      <div class="pp_overlay"><\/div>',gallery_markup:'<div class="pp_gallery">         <a href="#" class="pp_arrow_previous">Previous<\/a>         <div>          <ul>           {gallery}          <\/ul>         <\/div>         <a href="#" class="pp_arrow_next">Next<\/a>        <\/div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"><\/embed><\/object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"><\/embed><\/object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"><\/iframe>',inline_markup:'<div class="pp_inline">{content}<\/div>',custom_markup:"",social_tools:'<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet<\/a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"><\/script><\/div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"><\/iframe><\/div>'},f);var y=this,v=!1,e,p,w,g,c,l,h=n(window).height(),s=n(window).width(),a;return doresize=!0,scroll_pos=it(),n(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){d();ft()}),f.keyboard_shortcuts&&n(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(t){if(typeof $pp_pic_holder!="undefined"&&$pp_pic_holder.is(":visible"))switch(t.keyCode){case 37:n.prettyPhoto.changePage("previous");t.preventDefault();break;case 39:n.prettyPhoto.changePage("next");t.preventDefault();break;case 27:settings.modal||n.prettyPhoto.close();t.preventDefault()}}),n.prettyPhoto.initialize=function(){return settings=f,settings.theme=="pp_default"&&(settings.horizontal_padding=16),settings.ie6_fallback&&n.browser.msie&&parseInt(n.browser.version)==6&&(settings.theme="light_square"),theRel=n(this).attr(settings.hook),galleryRegExp=/\[(?:.*)\]/,isSet=galleryRegExp.exec(theRel)?!0:!1,pp_images=isSet?jQuery.map(y,function(t){if(n(t).attr(settings.hook).indexOf(theRel)!=-1)return n(t).attr("href")}):n.makeArray(n(this).attr("href")),pp_titles=isSet?jQuery.map(y,function(t){if(n(t).attr(settings.hook).indexOf(theRel)!=-1)return n(t).find("img").attr("alt")?n(t).find("img").attr("alt"):""}):n.makeArray(n(this).find("img").attr("alt")),pp_descriptions=isSet?jQuery.map(y,function(t){if(n(t).attr(settings.hook).indexOf(theRel)!=-1)return n(t).attr("title")?n(t).attr("title"):""}):n.makeArray(n(this).attr("title")),pp_images.length>settings.overlay_gallery_max&&(settings.overlay_gallery=!1),set_position=jQuery.inArray(n(this).attr("href"),pp_images),rel_index=isSet?set_position:n("a["+settings.hook+"^='"+theRel+"']").index(n(this)),rt(this),settings.allow_resize&&n(window).bind("scroll.prettyphoto",function(){d()}),n.prettyPhoto.open(),!1},n.prettyPhoto.open=function(i){return typeof settings=="undefined"&&(settings=f,n.browser.msie&&n.browser.version==6&&(settings.theme="light_square"),pp_images=n.makeArray(arguments[0]),pp_titles=arguments[1]?n.makeArray(arguments[1]):n.makeArray(""),pp_descriptions=arguments[2]?n.makeArray(arguments[2]):n.makeArray(""),isSet=pp_images.length>1?!0:!1,set_position=arguments[3]?arguments[3]:0,rt(i.target)),n.browser.msie&&n.browser.version==6&&n("select").css("visibility","hidden"),settings.hideflash&&n("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden"),ut(n(pp_images).size()),n(".pp_loaderIcon").show(),settings.deeplinking&&r(),settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href)),$pp_pic_holder.find(".pp_social").html(facebook_like_link)),$ppt.is(":hidden")&&$ppt.css("opacity",0).show(),$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity),$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+n(pp_images).size()),typeof pp_descriptions[set_position]!="undefined"&&pp_descriptions[set_position]!=""?$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])):$pp_pic_holder.find(".pp_description").hide(),movie_width=parseFloat(t("width",pp_images[set_position]))?t("width",pp_images[set_position]):settings.default_width.toString(),movie_height=parseFloat(t("height",pp_images[set_position]))?t("height",pp_images[set_position]):settings.default_height.toString(),v=!1,movie_height.indexOf("%")!=-1&&(movie_height=parseFloat(n(window).height()*parseFloat(movie_height)/100-150),v=!0),movie_width.indexOf("%")!=-1&&(movie_width=parseFloat(n(window).width()*parseFloat(movie_width)/100-150),v=!0),$pp_pic_holder.fadeIn(function(){settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined"?$ppt.html(unescape(pp_titles[set_position])):$ppt.html("&nbsp;");imgPreloader="";skipInjection=!1;switch(k(pp_images[set_position])){case"image":imgPreloader=new Image;nextImage=new Image;isSet&&set_position<n(pp_images).size()-1&&(nextImage.src=pp_images[set_position+1]);prevImage=new Image;isSet&&pp_images[set_position-1]&&(prevImage.src=pp_images[set_position-1]);$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);imgPreloader.onload=function(){e=o(imgPreloader.width,imgPreloader.height);b()};imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist.");n.prettyPhoto.close()};imgPreloader.src=pp_images[set_position];break;case"youtube":e=o(movie_width,movie_height);movie_id=t("v",pp_images[set_position]);movie_id==""&&(movie_id=pp_images[set_position].split("youtu.be/"),movie_id=movie_id[1],movie_id.indexOf("?")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("?"))),movie_id.indexOf("&")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("&"))));movie="http://www.youtube.com/embed/"+movie_id;movie+=t("rel",pp_images[set_position])?"?rel="+t("rel",pp_images[set_position]):"?rel=1";settings.autoplay&&(movie+="&autoplay=1");toInject=settings.iframe_markup.replace(/{width}/g,e.width).replace(/{height}/g,e.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":e=o(movie_width,movie_height);movie_id=pp_images[set_position];var i=movie_id.match(/http:\/\/(www\.)?vimeo.com\/(\d+)/);movie="http://player.vimeo.com/video/"+i[2]+"?title=0&amp;byline=0&amp;portrait=0";settings.autoplay&&(movie+="&autoplay=1;");vimeo_width=e.width+"/embed/?moog_width="+e.width;toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,e.height).replace(/{path}/g,movie);break;case"quicktime":e=o(movie_width,movie_height);e.height+=15;e.contentHeight+=15;e.containerHeight+=15;toInject=settings.quicktime_markup.replace(/{width}/g,e.width).replace(/{height}/g,e.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":e=o(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length);filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf("?"));toInject=settings.flash_markup.replace(/{width}/g,e.width).replace(/{height}/g,e.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":e=o(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1);toInject=settings.iframe_markup.replace(/{width}/g,e.width).replace(/{height}/g,e.height).replace(/{path}/g,frame_url);break;case"ajax":doresize=!1;e=o(movie_width,movie_height);doresize=!0;skipInjection=!0;n.get(pp_images[set_position],function(n){toInject=settings.inline_markup.replace(/{content}/g,n);$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;b()});break;case"custom":e=o(movie_width,movie_height);toInject=settings.custom_markup;break;case"inline":myClone=n(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"><\/div><\/div>').appendTo(n("body")).show();doresize=!1;e=o(n(myClone).width(),n(myClone).height());doresize=!0;n(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,n(pp_images[set_position]).html())}imgPreloader||skipInjection||($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,b())}),!1},n.prettyPhoto.changePage=function(t){currentGalleryPage=0;t=="previous"?(set_position--,set_position<0&&(set_position=n(pp_images).size()-1)):t=="next"?(set_position++,set_position>n(pp_images).size()-1&&(set_position=0)):set_position=t;rel_index=set_position;doresize||(doresize=!0);settings.allow_expand&&n(".pp_contract").removeClass("pp_contract").addClass("pp_expand");nt(function(){n.prettyPhoto.open()})},n.prettyPhoto.changeGalleryPage=function(n){n=="next"?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=0)):n=="previous"?(currentGalleryPage--,currentGalleryPage<0&&(currentGalleryPage=totalPage)):currentGalleryPage=n;slide_speed=n=="next"||n=="previous"?settings.animation_speed:0;slide_to=currentGalleryPage*itemsPerPage*itemWidth;$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)},n.prettyPhoto.startSlideshow=function(){typeof a=="undefined"?($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){return n.prettyPhoto.stopSlideshow(),!1}),a=setInterval(n.prettyPhoto.startSlideshow,settings.slideshow)):n.prettyPhoto.changePage("next")},n.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){return n.prettyPhoto.startSlideshow(),!1});clearInterval(a);a=undefined},n.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(n.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),n("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){n(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){n.browser.msie&&n.browser.version==6&&n("select").css("visibility","visible");settings.hideflash&&n("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible");n(this).remove();n(window).unbind("scroll.prettyphoto");u();settings.callback();doresize=!0;p=!1;delete settings}))},!pp_alreadyInitialized&&i()&&(pp_alreadyInitialized=!0,hashIndex=i(),hashRel=hashIndex,hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1),hashRel=hashRel.substring(0,hashRel.indexOf("/")),setTimeout(function(){n("a["+f.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)),this.unbind("click.prettyphoto").bind("click.prettyphoto",n.prettyPhoto.initialize)}}(jQuery);pp_alreadyInitialized=!1,function(n,t){var i=t.document;n.fn.share=function(r){var u={init:function(r){this.share.settings=n.extend({},this.share.defaults,r);var v=this.share.settings,o=this.share.settings.networks,e=this.share.settings.theme,h=this.share.settings.orientation,u=this.share.settings.affix,c=this.share.settings.margin,l=this.share.settings.title||n(i).attr("title"),a=this.share.settings.urlToShare||n(location).attr("href"),s="";return n.each(n(i).find('meta[name="description"]'),function(t,i){s=n(i).attr("content")}),this.each(function(){var i=n(this),y=i.attr("id"),w=encodeURIComponent(a),p=encodeURIComponent(l),b=s.substring(0,250),v,r;for(r in o)r=o[r],v=f.networkDefs[r].url,v=v.replace("|u|",w).replace("|t|",p).replace("|d|",b).replace("|140|",p.substring(0,130)),n("<a href='"+v+"' title='Share this page on "+r+"' class='pop share-"+e+" share-"+e+"-"+r+"'><\/a>").appendTo(i);n("#"+y+".share-"+e).css("margin",c);h!="horizontal"?n("#"+y+" a.share-"+e).css("display","block"):n("#"+y+" a.share-"+e).css("display","inline-block");typeof u!="undefined"&&(i.addClass("share-affix"),u.indexOf("right")!=-1?(i.css("left","auto"),i.css("right","0px"),u.indexOf("center")!=-1&&i.css("top","40%")):u.indexOf("left center")!=-1&&i.css("top","40%"),u.indexOf("bottom")!=-1&&(i.css("bottom","0px"),i.css("top","auto"),u.indexOf("center")!=-1&&i.css("left","40%")));n(".pop").click(function(){return t.open(n(this).attr("href"),"t","toolbar=0,resizable=1,status=0,width=640,height=528"),!1})})}},f={networkDefs:{facebook:{url:"http://www.facebook.com/share.php?u=|u|"},twitter:{url:"https://twitter.com/share?url=|u|&text=|140|"},linkedin:{url:"http://www.linkedin.com/shareArticle?mini=true&url=|u|&title=|t|&summary=|d|&source=in1.com"},in1:{url:"http://www.in1.com/cast?u=|u|",w:"490",h:"529"},tumblr:{url:"http://www.tumblr.com/share?v=3&u=|u|"},digg:{url:"http://digg.com/submit?url=|u|&title=|t|"},googleplus:{url:"https://plusone.google.com/_/+1/confirm?hl=en&url=|u|"},reddit:{url:"http://reddit.com/submit?url=|u|"},pinterest:{url:"http://pinterest.com/pin/create/button/?url=|u|&media=&description=|d|"},posterous:{url:"http://posterous.com/share?linkto=|u|&title=|t|"},stumbleupon:{url:"http://www.stumbleupon.com/submit?url=|u|&title=|t|"},email:{url:"mailto:?subject=|t|"}}};if(u[r])return u[r].apply(this,Array.prototype.slice.call(arguments,1));if(typeof r!="object"&&r)n.error('Method "'+r+'" does not exist in social plugin');else return u.init.apply(this,arguments)};n.fn.share.defaults={networks:["facebook","twitter","linkedin"],theme:"icon",autoShow:!0,margin:"3px",orientation:"horizontal",useIn1:!1};n.fn.share.settings={}}(jQuery,window),function(n){function s(){if(!f){f=!0;for(var i in t)n(i).each(function(){var r,u;r=n(this);u=r.data("jqae");(u.containerWidth!=r.width()||u.containerHeight!=r.height())&&o(r,t[i])});f=!1}}function h(n){t[n]&&(delete t[n],t.length||i&&(window.clearInterval(i),i=undefined))}function c(n,r){t[n]=r;i||(i=window.setInterval(function(){s()},200))}function e(){return this.nodeType===3}function u(t){var f,i,r;if(t.contents().length){if(f=t.contents(),i=f.eq(f.length-1),i.filter(e).length)return(r=i.get(0).nodeValue,r=n.trim(r),r=="")?(i.remove(),!0):!1;while(u(i));return i.contents().length?!1:(i.remove(),!0)}return!1}function r(n){var i,t;return n.contents().length?(t=n.contents(),i=t.eq(t.length-1),i.filter(e).length?i:r(i)):(n.append(""),t=n.contents(),t.eq(t.length-1))}function l(t){var u=r(t),i,f;return u.length?(i=u.get(0).nodeValue,f=i.lastIndexOf(" "),f>-1?(i=n.trim(i.substring(0,f)),u.get(0).nodeValue=i):u.get(0).nodeValue="",!0):!1}function o(t,i){var s=t.data("jqae"),f,e,h;s||(s={});f=s.wrapperElement;f||(f=t.wrapInner("<div/>").find(">div"),f.css({margin:0,padding:0,border:0}));e=f.data("jqae");e||(e={});h=e.originalContent;h?f=e.originalContent.clone(!0).data("jqae",{originalContent:h}).replaceAll(f):f.data("jqae",{originalContent:f.clone(!0)});t.data("jqae",{wrapperElement:f,containerWidth:t.width(),containerHeight:t.height()});var c=t.height(),a=(parseInt(t.css("padding-top"),10)||0)+(parseInt(t.css("border-top-width"),10)||0)-(f.offset().top-t.offset().top),o=!1,v=f;i.selector&&(v=n(f.find(i.selector).get().reverse()));v.each(function(){var t=n(this),s=t.text(),e=!1;if(f.innerHeight()-t.innerHeight()>c+a)t.remove();else if(u(t),t.contents().length){for(o&&(r(t).get(0).nodeValue+=i.ellipsis,o=!1);f.innerHeight()>c+a;){if(e=l(t),!e){o=!0;t.remove();break}if(u(t),t.contents().length)r(t).get(0).nodeValue+=i.ellipsis;else{o=!0;t.remove();break}}i.setTitle=="onEllipsis"&&e||i.setTitle=="always"?t.attr("title",s):i.setTitle!="never"&&t.removeAttr("title")}})}var t={},i,f=!1,a={ellipsis:"...",setTitle:"never",live:!1};n.fn.ellipsis=function(t,i){var u,r;return u=n(this),typeof t!="string"&&(i=t,t=undefined),r=n.extend({},a,i),r.selector=t,u.each(function(){var t=n(this);o(t,r)}),r.live?c(u.selector,r):h(u.selector),this}}(jQuery);!function(){"use strict";function n(){function r(){function u(n){function i(n){return n*f[1==(t=1-t)?"width":"height"]}var t=0;return n.split(",").map(Number).map(i).map(Math.floor).join(",")}for(var f={width:t.width/n.width,height:t.height/n.height},r=0;s>r;r++)i[r].coords=u(h[r])}function e(){n.onload=function(){(t.width!==n.width||t.height!==n.height)&&r()};n.src=t.src}function o(){function n(){clearTimeout(f);f=setTimeout(r,250)}window.addEventListener?window.addEventListener("resize",n,!1):window.attachEvent&&window.attachEvent("onresize",n)}var u=this,i=u.getElementsByTagName("area"),s=i.length,h=Array.prototype.map.call(i,function(n){return n.coords}),t=document.querySelector('img[usemap="#'+u.name+'"]'),n=new Image,f=null;e();o()}window.imageMapResize=function(t){function i(t){if("MAP"!==t.tagName)throw new TypeError("Expected <MAP> tag, found <"+t.tagName+">.");n.call(t)}Array.prototype.forEach.call(document.querySelectorAll(t||"map"),i)};"jQuery"in window&&(jQuery.fn.imageMapResize=function(){return this.filter("map").each(n)})}();jQuery.extend({Enumerable:function(){var n=function(n){this.GetEnumerator=n},s,u;n.Choice=function(){var t=arguments[0]instanceof Array?arguments[0]:arguments;return new n(function(){return new i(r.Blank,function(){return this.Yield(t[Math.floor(Math.random()*t.length)])},r.Blank)})};n.Cycle=function(){var t=arguments[0]instanceof Array?arguments[0]:arguments;return new n(function(){var n=0;return new i(r.Blank,function(){return n>=t.length&&(n=0),this.Yield(t[n++])},r.Blank)})};n.Empty=function(){return new n(function(){return new i(r.Blank,function(){return!1},r.Blank)})};n.From=function(e){if(e==null)return n.Empty();if(e instanceof n)return e;if(typeof e==f.Number||typeof e==f.Boolean)return n.Repeat(e,1);if(typeof e==f.String)return new n(function(){var n=0;return new i(r.Blank,function(){return n<e.length?this.Yield(e.charAt(n++)):!1},r.Blank)});if(typeof e!=f.Function){if(typeof e.length==f.Number)return new u(e);if(!(e instanceof Object)&&t.IsIEnumerable(e))return new n(function(){var t=!0,n;return new i(function(){n=new Enumerator(e)},function(){return t?t=!1:n.moveNext(),n.atEnd()?!1:this.Yield(n.item())},r.Blank)})}return new n(function(){var n=[],t=0;return new i(function(){for(var t in e)e[t]instanceof Function||n.push({Key:t,Value:e[t]})},function(){return t<n.length?this.Yield(n[t++]):!1},r.Blank)})};n.Return=function(t){return n.Repeat(t,1)};n.Matches=function(t,u,f){return f==null&&(f=""),u instanceof RegExp&&(f+=u.ignoreCase?"i":"",f+=u.multiline?"m":"",u=u.source),f.indexOf("g")===-1&&(f+="g"),new n(function(){var n;return new i(function(){n=new RegExp(u,f)},function(){var i=n.exec(t);return i?this.Yield(i):!1},r.Blank)})};n.Range=function(t,i,r){return r==null&&(r=1),n.ToInfinity(t,r).Take(i)};n.RangeDown=function(t,i,r){return r==null&&(r=1),n.ToNegativeInfinity(t,r).Take(i)};n.RangeTo=function(t,i,r){return r==null&&(r=1),t<i?n.ToInfinity(t,r).TakeWhile(function(n){return n<=i}):n.ToNegativeInfinity(t,r).TakeWhile(function(n){return n>=i})};n.Repeat=function(t,u){return u!=null?n.Repeat(t).Take(u):new n(function(){return new i(r.Blank,function(){return this.Yield(t)},r.Blank)})};n.RepeatWithFinalize=function(r,u){return r=t.CreateLambda(r),u=t.CreateLambda(u),new n(function(){var n;return new i(function(){n=r()},function(){return this.Yield(n)},function(){n!=null&&(u(n),n=null)})})};n.Generate=function(u,f){return f!=null?n.Generate(u).Take(f):(u=t.CreateLambda(u),new n(function(){return new i(r.Blank,function(){return this.Yield(u())},r.Blank)}))};n.ToInfinity=function(t,u){return t==null&&(t=0),u==null&&(u=1),new n(function(){var n;return new i(function(){n=t-u},function(){return this.Yield(n+=u)},r.Blank)})};n.ToNegativeInfinity=function(t,u){return t==null&&(t=0),u==null&&(u=1),new n(function(){var n;return new i(function(){n=t+u},function(){return this.Yield(n-=u)},r.Blank)})};n.Unfold=function(u,f){return f=t.CreateLambda(f),new n(function(){var t=!0,n;return new i(r.Blank,function(){return t?(t=!1,n=u,this.Yield(n)):(n=f(n),this.Yield(n))},r.Blank)})};n.prototype={CascadeBreadthFirst:function(r,u){var f=this;return r=t.CreateLambda(r),u=t.CreateLambda(u),new n(function(){var e,s=0,o=[];return new i(function(){e=f.GetEnumerator()},function(){for(;;){if(e.MoveNext())return o.push(e.Current()),this.Yield(u(e.Current(),s));var i=n.From(o).SelectMany(function(n){return r(n)});if(i.Any())s++,o=[],t.Dispose(e),e=i.GetEnumerator();else return!1}},function(){t.Dispose(e)})})},CascadeDepthFirst:function(r,u){var f=this;return r=t.CreateLambda(r),u=t.CreateLambda(u),new n(function(){var o=[],e;return new i(function(){e=f.GetEnumerator()},function(){for(;;){if(e.MoveNext()){var i=u(e.Current(),o.length);return o.push(e),e=n.From(r(e.Current())).GetEnumerator(),this.Yield(i)}if(o.length<=0)return!1;t.Dispose(e);e=o.pop()}},function(){try{t.Dispose(e)}finally{n.From(o).ForEach(function(n){n.Dispose()})}})})},Flatten:function(){var u=this;return new n(function(){var e,f=null;return new i(function(){e=u.GetEnumerator()},function(){for(;;){if(f!=null){if(f.MoveNext())return this.Yield(f.Current());f=null}if(e.MoveNext())if(e.Current()instanceof Array){t.Dispose(f);f=n.From(e.Current()).SelectMany(r.Identity).Flatten().GetEnumerator();continue}else return this.Yield(e.Current());return!1}},function(){try{t.Dispose(e)}finally{t.Dispose(f)}})})},Pairwise:function(r){var u=this;return r=t.CreateLambda(r),new n(function(){var n;return new i(function(){n=u.GetEnumerator();n.MoveNext()},function(){var t=n.Current();return n.MoveNext()?this.Yield(r(t,n.Current())):!1},function(){t.Dispose(n)})})},Scan:function(r,u,f){var e,o;return f!=null?this.Scan(r,u).Select(f):(u==null?(u=t.CreateLambda(r),e=!1):(u=t.CreateLambda(u),e=!0),o=this,new n(function(){var n,f,s=!0;return new i(function(){n=o.GetEnumerator()},function(){if(s){if(s=!1,e)return this.Yield(f=r);if(n.MoveNext())return this.Yield(f=n.Current())}return n.MoveNext()?this.Yield(f=u(f,n.Current())):!1},function(){t.Dispose(n)})}))},Select:function(r){var u=this;return r=t.CreateLambda(r),new n(function(){var n,f=0;return new i(function(){n=u.GetEnumerator()},function(){return n.MoveNext()?this.Yield(r(n.Current(),f++)):!1},function(){t.Dispose(n)})})},SelectMany:function(r,u){var f=this;return r=t.CreateLambda(r),u==null&&(u=function(n,t){return t}),u=t.CreateLambda(u),new n(function(){var o,e=undefined,s=0;return new i(function(){o=f.GetEnumerator()},function(){if(e===undefined&&!o.MoveNext())return!1;do{if(e==null){var i=r(o.Current(),s++);e=n.From(i).GetEnumerator()}if(e.MoveNext())return this.Yield(u(o.Current(),e.Current()));t.Dispose(e);e=null}while(o.MoveNext());return!1},function(){try{t.Dispose(o)}finally{t.Dispose(e)}})})},Where:function(r){r=t.CreateLambda(r);var u=this;return new n(function(){var n,f=0;return new i(function(){n=u.GetEnumerator()},function(){while(n.MoveNext())if(r(n.Current(),f++))return this.Yield(n.Current());return!1},function(){t.Dispose(n)})})},OfType:function(n){var t;switch(n){case Number:t=f.Number;break;case String:t=f.String;break;case Boolean:t=f.Boolean;break;case Function:t=f.Function;break;default:t=null}return t===null?this.Where(function(t){return t instanceof n}):this.Where(function(n){return typeof n===t})},Zip:function(r,u){u=t.CreateLambda(u);var f=this;return new n(function(){var e,o,s=0;return new i(function(){e=f.GetEnumerator();o=n.From(r).GetEnumerator()},function(){return e.MoveNext()&&o.MoveNext()?this.Yield(u(e.Current(),o.Current(),s++)):!1},function(){try{t.Dispose(e)}finally{t.Dispose(o)}})})},Join:function(u,f,e,o,s){f=t.CreateLambda(f);e=t.CreateLambda(e);o=t.CreateLambda(o);s=t.CreateLambda(s);var h=this;return new n(function(){var c,a,l=null,v=0;return new i(function(){c=h.GetEnumerator();a=n.From(u).ToLookup(e,r.Identity,s)},function(){for(var n,t;;){if(l!=null){if(n=l[v++],n!==undefined)return this.Yield(o(c.Current(),n));n=null;v=0}if(c.MoveNext())t=f(c.Current()),l=a.Get(t).ToArray();else return!1}},function(){t.Dispose(c)})})},GroupJoin:function(u,f,e,o,s){f=t.CreateLambda(f);e=t.CreateLambda(e);o=t.CreateLambda(o);s=t.CreateLambda(s);var h=this;return new n(function(){var c=h.GetEnumerator(),l=null;return new i(function(){c=h.GetEnumerator();l=n.From(u).ToLookup(e,r.Identity,s)},function(){if(c.MoveNext()){var n=l.Get(f(c.Current()));return this.Yield(o(c.Current(),n))}return!1},function(){t.Dispose(c)})})},All:function(n){n=t.CreateLambda(n);var i=!0;return this.ForEach(function(t){if(!n(t))return i=!1,!1}),i},Any:function(n){n=t.CreateLambda(n);var i=this.GetEnumerator();try{if(arguments.length==0)return i.MoveNext();while(i.MoveNext())if(n(i.Current()))return!0;return!1}finally{t.Dispose(i)}},Concat:function(r){var u=this;return new n(function(){var e,f;return new i(function(){e=u.GetEnumerator()},function(){if(f==null){if(e.MoveNext())return this.Yield(e.Current());f=n.From(r).GetEnumerator()}return f.MoveNext()?this.Yield(f.Current()):!1},function(){try{t.Dispose(e)}finally{t.Dispose(f)}})})},Insert:function(r,u){var f=this;return new n(function(){var o,e,s=0,h=!1;return new i(function(){o=f.GetEnumerator();e=n.From(u).GetEnumerator()},function(){return s==r&&e.MoveNext()?(h=!0,this.Yield(e.Current())):o.MoveNext()?(s++,this.Yield(o.Current())):!h&&e.MoveNext()?this.Yield(e.Current()):!1},function(){try{t.Dispose(o)}finally{t.Dispose(e)}})})},Alternate:function(t){return t=n.Return(t),this.SelectMany(function(i){return n.Return(i).Concat(t)}).TakeExceptLast()},Contains:function(n,i){i=t.CreateLambda(i);var r=this.GetEnumerator();try{while(r.MoveNext())if(i(r.Current())===n)return!0;return!1}finally{t.Dispose(r)}},DefaultIfEmpty:function(r){var u=this;return new n(function(){var n,f=!0;return new i(function(){n=u.GetEnumerator()},function(){return n.MoveNext()?(f=!1,this.Yield(n.Current())):f?(f=!1,this.Yield(r)):!1},function(){t.Dispose(n)})})},Distinct:function(t){return this.Except(n.Empty(),t)},Except:function(r,u){u=t.CreateLambda(u);var f=this;return new n(function(){var e,o;return new i(function(){e=f.GetEnumerator();o=new h(u);n.From(r).ForEach(function(n){o.Add(n)})},function(){while(e.MoveNext()){var n=e.Current();if(!o.Contains(n))return o.Add(n),this.Yield(n)}return!1},function(){t.Dispose(e)})})},Intersect:function(r,u){u=t.CreateLambda(u);var f=this;return new n(function(){var e,o,s;return new i(function(){e=f.GetEnumerator();o=new h(u);n.From(r).ForEach(function(n){o.Add(n)});s=new h(u)},function(){while(e.MoveNext()){var n=e.Current();if(!s.Contains(n)&&o.Contains(n))return s.Add(n),this.Yield(n)}return!1},function(){t.Dispose(e)})})},SequenceEqual:function(i,r){var f,u;r=t.CreateLambda(r);f=this.GetEnumerator();try{u=n.From(i).GetEnumerator();try{while(f.MoveNext())if(!u.MoveNext()||r(f.Current())!==r(u.Current()))return!1;return u.MoveNext()?!1:!0}finally{t.Dispose(u)}}finally{t.Dispose(f)}},Union:function(r,u){u=t.CreateLambda(u);var f=this;return new n(function(){var s,e,o;return new i(function(){s=f.GetEnumerator();o=new h(u)},function(){var t;if(e===undefined){while(s.MoveNext())if(t=s.Current(),!o.Contains(t))return o.Add(t),this.Yield(t);e=n.From(r).GetEnumerator()}while(e.MoveNext())if(t=e.Current(),!o.Contains(t))return o.Add(t),this.Yield(t);return!1},function(){try{t.Dispose(s)}finally{t.Dispose(e)}})})},OrderBy:function(n){return new e(this,n,!1)},OrderByDescending:function(n){return new e(this,n,!0)},Reverse:function(){var t=this;return new n(function(){var n,u;return new i(function(){n=t.ToArray();u=n.length},function(){return u>0?this.Yield(n[--u]):!1},r.Blank)})},Shuffle:function(){var t=this;return new n(function(){var n;return new i(function(){n=t.ToArray()},function(){if(n.length>0){var t=Math.floor(Math.random()*n.length);return this.Yield(n.splice(t,1)[0])}return!1},r.Blank)})},GroupBy:function(r,u,f,e){var o=this;return r=t.CreateLambda(r),u=t.CreateLambda(u),f!=null&&(f=t.CreateLambda(f)),e=t.CreateLambda(e),new n(function(){var n;return new i(function(){n=o.ToLookup(r,u,e).ToEnumerable().GetEnumerator()},function(){while(n.MoveNext())return f==null?this.Yield(n.Current()):this.Yield(f(n.Current().Key(),n.Current()));return!1},function(){t.Dispose(n)})})},PartitionBy:function(r,u,f,e){var s=this,o;return r=t.CreateLambda(r),u=t.CreateLambda(u),e=t.CreateLambda(e),f==null?(o=!1,f=function(n,t){return new c(n,t)}):(o=!0,f=t.CreateLambda(f)),new n(function(){var h,l,a,c=[];return new i(function(){h=s.GetEnumerator();h.MoveNext()&&(l=r(h.Current()),a=e(l),c.push(u(h.Current())))},function(){for(var t,i;(t=h.MoveNext())==!0;)if(a===e(r(h.Current())))c.push(u(h.Current()));else break;return c.length>0?(i=o?f(l,n.From(c)):f(l,c),t?(l=r(h.Current()),a=e(l),c=[u(h.Current())]):c=[],this.Yield(i)):!1},function(){t.Dispose(h)})})},BufferWithCount:function(r){var u=this;return new n(function(){var n;return new i(function(){n=u.GetEnumerator()},function(){for(var t=[],i=0;n.MoveNext();)if(t.push(n.Current()),++i>=r)return this.Yield(t);return t.length>0?this.Yield(t):!1},function(){t.Dispose(n)})})},Aggregate:function(n,t,i){return this.Scan(n,t,i).Last()},Average:function(n){n=t.CreateLambda(n);var i=0,r=0;return this.ForEach(function(t){i+=n(t);++r}),i/r},Count:function(n){n=n==null?r.True:t.CreateLambda(n);var i=0;return this.ForEach(function(t,r){n(t,r)&&++i}),i},Max:function(n){return n==null&&(n=r.Identity),this.Select(n).Aggregate(function(n,t){return n>t?n:t})},Min:function(n){return n==null&&(n=r.Identity),this.Select(n).Aggregate(function(n,t){return n<t?n:t})},MaxBy:function(n){return n=t.CreateLambda(n),this.Aggregate(function(t,i){return n(t)>n(i)?t:i})},MinBy:function(n){return n=t.CreateLambda(n),this.Aggregate(function(t,i){return n(t)<n(i)?t:i})},Sum:function(n){return n==null&&(n=r.Identity),this.Select(n).Aggregate(0,function(n,t){return n+t})},ElementAt:function(n){var t,i=!1;if(this.ForEach(function(r,u){if(u==n)return t=r,i=!0,!1}),!i)throw new Error("index is less than 0 or greater than or equal to the number of elements in source.");return t},ElementAtOrDefault:function(n,t){var i,r=!1;return this.ForEach(function(t,u){if(u==n)return i=t,r=!0,!1}),r?i:t},First:function(n){if(n!=null)return this.Where(n).First();var t,i=!1;if(this.ForEach(function(n){return t=n,i=!0,!1}),!i)throw new Error("First:No element satisfies the condition.");return t},FirstOrDefault:function(n,t){if(t!=null)return this.Where(t).FirstOrDefault(n);var i,r=!1;return this.ForEach(function(n){return i=n,r=!0,!1}),r?i:n},Last:function(n){if(n!=null)return this.Where(n).Last();var t,i=!1;if(this.ForEach(function(n){i=!0;t=n}),!i)throw new Error("Last:No element satisfies the condition.");return t},LastOrDefault:function(n,t){if(t!=null)return this.Where(t).LastOrDefault(n);var i,r=!1;return this.ForEach(function(n){r=!0;i=n}),r?i:n},Single:function(n){if(n!=null)return this.Where(n).Single();var i,t=!1;if(this.ForEach(function(n){if(t)throw new Error("Single:sequence contains more than one element.");else t=!0,i=n}),!t)throw new Error("Single:No element satisfies the condition.");return i},SingleOrDefault:function(n,t){if(t!=null)return this.Where(t).SingleOrDefault(n);var r,i=!1;return this.ForEach(function(n){if(i)throw new Error("Single:sequence contains more than one element.");else i=!0,r=n}),i?r:n},Skip:function(r){var u=this;return new n(function(){var n,f=0;return new i(function(){for(n=u.GetEnumerator();f++<r&&n.MoveNext(););},function(){return n.MoveNext()?this.Yield(n.Current()):!1},function(){t.Dispose(n)})})},SkipWhile:function(r){r=t.CreateLambda(r);var u=this;return new n(function(){var n,e=0,f=!1;return new i(function(){n=u.GetEnumerator()},function(){while(!f)if(n.MoveNext()){if(!r(n.Current(),e++))return f=!0,this.Yield(n.Current());continue}else return!1;return n.MoveNext()?this.Yield(n.Current()):!1},function(){t.Dispose(n)})})},Take:function(r){var u=this;return new n(function(){var n,f=0;return new i(function(){n=u.GetEnumerator()},function(){return f++<r&&n.MoveNext()?this.Yield(n.Current()):!1},function(){t.Dispose(n)})})},TakeWhile:function(r){r=t.CreateLambda(r);var u=this;return new n(function(){var n,f=0;return new i(function(){n=u.GetEnumerator()},function(){return n.MoveNext()&&r(n.Current(),f++)?this.Yield(n.Current()):!1},function(){t.Dispose(n)})})},TakeExceptLast:function(r){r==null&&(r=1);var u=this;return new n(function(){if(r<=0)return u.GetEnumerator();var n,f=[];return new i(function(){n=u.GetEnumerator()},function(){while(n.MoveNext()){if(f.length==r)return f.push(n.Current()),this.Yield(f.shift());f.push(n.Current())}return!1},function(){t.Dispose(n)})})},TakeFromLast:function(r){if(r<=0||r==null)return n.Empty();var u=this;return new n(function(){var o,f,e=[];return new i(function(){o=u.GetEnumerator()},function(){while(o.MoveNext())e.length==r&&e.shift(),e.push(o.Current());return f==null&&(f=n.From(e).GetEnumerator()),f.MoveNext()?this.Yield(f.Current()):!1},function(){t.Dispose(f)})})},IndexOf:function(n){var t=null;return this.ForEach(function(i,r){if(i===n)return t=r,!0}),t!==null?t:-1},LastIndexOf:function(n){var t=-1;return this.ForEach(function(i,r){i===n&&(t=r)}),t},ToArray:function(){var n=[];return this.ForEach(function(t){n.push(t)}),n},ToLookup:function(n,i,r){n=t.CreateLambda(n);i=t.CreateLambda(i);r=t.CreateLambda(r);var u=new h(r);return this.ForEach(function(t){var r=n(t),f=i(t),e=u.Get(r);e!==undefined?e.push(f):u.Add(r,[f])}),new a(u)},ToObject:function(n,i){n=t.CreateLambda(n);i=t.CreateLambda(i);var r={};return this.ForEach(function(t){r[n(t)]=i(t)}),r},ToDictionary:function(n,i,r){n=t.CreateLambda(n);i=t.CreateLambda(i);r=t.CreateLambda(r);var u=new h(r);return this.ForEach(function(t){u.Add(n(t),i(t))}),u},ToJSON:function(n,t){return JSON.stringify(this.ToArray(),n,t)},ToString:function(n,t){return n==null&&(n=""),t==null&&(t=r.Identity),this.Select(t).ToArray().join(n)},Do:function(r){var u=this;return r=t.CreateLambda(r),new n(function(){var n,f=0;return new i(function(){n=u.GetEnumerator()},function(){return n.MoveNext()?(r(n.Current(),f++),this.Yield(n.Current())):!1},function(){t.Dispose(n)})})},ForEach:function(n){n=t.CreateLambda(n);var r=0,i=this.GetEnumerator();try{while(i.MoveNext())if(n(i.Current(),r++)===!1)break}finally{t.Dispose(i)}},Write:function(n,i){n==null&&(n="");i=t.CreateLambda(i);var r=!0;this.ForEach(function(t){r?r=!1:document.write(n);document.write(i(t))})},WriteLine:function(n){n=t.CreateLambda(n);this.ForEach(function(t){document.write(n(t));document.write("<br />")})},Force:function(){var n=this.GetEnumerator();try{while(n.MoveNext());}finally{t.Dispose(n)}},Let:function(r){r=t.CreateLambda(r);var u=this;return new n(function(){var f;return new i(function(){f=n.From(r(u)).GetEnumerator()},function(){return f.MoveNext()?this.Yield(f.Current()):!1},function(){t.Dispose(f)})})},Share:function(){var u=this,t;return new n(function(){return new i(function(){t==null&&(t=u.GetEnumerator())},function(){return t.MoveNext()?this.Yield(t.Current()):!1},r.Blank)})},MemoizeAll:function(){var f=this,t,u;return new n(function(){var n=-1;return new i(function(){u==null&&(u=f.GetEnumerator(),t=[])},function(){return(n++,t.length<=n)?u.MoveNext()?this.Yield(t[n]=u.Current()):!1:this.Yield(t[n])},r.Blank)})},Catch:function(r){r=t.CreateLambda(r);var u=this;return new n(function(){var n;return new i(function(){n=u.GetEnumerator()},function(){try{return n.MoveNext()?this.Yield(n.Current()):!1}catch(t){return r(t),!1}},function(){t.Dispose(n)})})},Finally:function(r){r=t.CreateLambda(r);var u=this;return new n(function(){var n;return new i(function(){n=u.GetEnumerator()},function(){return n.MoveNext()?this.Yield(n.Current()):!1},function(){try{t.Dispose(n)}finally{r()}})})},Trace:function(n,i){return n==null&&(n="Trace"),i=t.CreateLambda(i),this.Do(function(t){console.log(n,":",i(t))})}};var r={Identity:function(n){return n},True:function(){return!0},Blank:function(){}},f={Boolean:"boolean",Number:"number",String:"string",Object:"object",Undefined:typeof undefined,Function:typeof function(){}},t={CreateLambda:function(n){if(n==null)return r.Identity;if(typeof n==f.String){if(n=="")return r.Identity;if(n.indexOf("=>")==-1)return new Function("$,$$,$$$,$$$$","return "+n);var t=n.match(/^[(\s]*([^()]*?)[)\s]*=>(.*)/);return new Function(t[1],"return "+t[2])}return n},IsIEnumerable:function(n){if(typeof Enumerator!=f.Undefined)try{return new Enumerator(n),!0}catch(t){}return!1},Compare:function(n,t){return n===t?0:n>t?1:-1},Dispose:function(n){n!=null&&n.Dispose()}},o={Before:0,Running:1,After:2},i=function(n,t,i){var u=new l,r=o.Before;this.Current=u.Current;this.MoveNext=function(){try{switch(r){case o.Before:r=o.Running;n();case o.Running:return t.apply(u)?!0:(this.Dispose(),!1);case o.After:return!1}}catch(i){this.Dispose();throw i;}};this.Dispose=function(){if(r==o.Running)try{i()}finally{r=o.After}}},l=function(){var n=null;this.Current=function(){return n};this.Yield=function(t){return n=t,!0}},e=function(n,i,r,u){this.source=n;this.keySelector=t.CreateLambda(i);this.descending=r;this.parent=u};e.prototype=new n;e.prototype.CreateOrderedEnumerable=function(n,t){return new e(this.source,n,t,this)};e.prototype.ThenBy=function(n){return this.CreateOrderedEnumerable(n,!1)};e.prototype.ThenByDescending=function(n){return this.CreateOrderedEnumerable(n,!0)};e.prototype.GetEnumerator=function(){var u=this,t,n,f=0;return new i(function(){t=[];n=[];u.source.ForEach(function(i,r){t.push(i);n.push(r)});var i=s.Create(u,null);i.GenerateKeys(t);n.sort(function(n,t){return i.Compare(n,t)})},function(){return f<n.length?this.Yield(t[n[f++]]):!1},r.Blank)};s=function(n,t,i){this.keySelector=n;this.descending=t;this.child=i;this.keys=null};s.Create=function(n,t){var i=new s(n.keySelector,n.descending,t);return n.parent!=null?s.Create(n.parent,i):i};s.prototype.GenerateKeys=function(n){for(var i=n.length,u=this.keySelector,r=new Array(i),t=0;t<i;t++)r[t]=u(n[t]);this.keys=r;this.child!=null&&this.child.GenerateKeys(n)};s.prototype.Compare=function(n,i){var r=t.Compare(this.keys[n],this.keys[i]);if(r==0){if(this.child!=null)return this.child.Compare(n,i);r=t.Compare(n,i)}return this.descending?-r:r};u=function(n){this.source=n};u.prototype=new n;u.prototype.Any=function(t){return t==null?this.source.length>0:n.prototype.Any.apply(this,arguments)};u.prototype.Count=function(t){return t==null?this.source.length:n.prototype.Count.apply(this,arguments)};u.prototype.ElementAt=function(t){return 0<=t&&t<this.source.length?this.source[t]:n.prototype.ElementAt.apply(this,arguments)};u.prototype.ElementAtOrDefault=function(n,t){return 0<=n&&n<this.source.length?this.source[n]:t};u.prototype.First=function(t){return t==null&&this.source.length>0?this.source[0]:n.prototype.First.apply(this,arguments)};u.prototype.FirstOrDefault=function(t,i){return i!=null?n.prototype.FirstOrDefault.apply(this,arguments):this.source.length>0?this.source[0]:t};u.prototype.Last=function(t){return t==null&&this.source.length>0?this.source[this.source.length-1]:n.prototype.Last.apply(this,arguments)};u.prototype.LastOrDefault=function(t,i){return i!=null?n.prototype.LastOrDefault.apply(this,arguments):this.source.length>0?this.source[this.source.length-1]:t};u.prototype.Skip=function(t){var u=this.source;return new n(function(){var n;return new i(function(){n=t<0?0:t},function(){return n<u.length?this.Yield(u[n++]):!1},r.Blank)})};u.prototype.TakeExceptLast=function(n){return n==null&&(n=1),this.Take(this.source.length-n)};u.prototype.TakeFromLast=function(n){return this.Skip(this.source.length-n)};u.prototype.Reverse=function(){var t=this.source;return new n(function(){var n;return new i(function(){n=t.length},function(){return n>0?this.Yield(t[--n]):!1},r.Blank)})};u.prototype.SequenceEqual=function(t,i){return(t instanceof u||t instanceof Array)&&i==null&&n.From(t).Count()!=this.Count()?!1:n.prototype.SequenceEqual.apply(this,arguments)};u.prototype.ToString=function(t,i){return i!=null||!(this.source instanceof Array)?n.prototype.ToString.apply(this,arguments):(t==null&&(t=""),this.source.join(t))};u.prototype.GetEnumerator=function(){var n=this.source,t=0;return new i(r.Blank,function(){return t<n.length?this.Yield(n[t++]):!1},r.Blank)};var h=function(){var t=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},u=function(n){return n===null?"null":n===undefined?"undefined":typeof n.toString===f.Function?n.toString():Object.prototype.toString.call(n)},s=function(n,t){this.Key=n;this.Value=t;this.Prev=null;this.Next=null},e=function(){this.First=null;this.Last=null},o;return e.prototype={AddLast:function(n){this.Last!=null?(this.Last.Next=n,n.Prev=this.Last,this.Last=n):this.First=this.Last=n},Replace:function(n,t){n.Prev!=null?(n.Prev.Next=t,t.Prev=n.Prev):this.First=t;n.Next!=null?(n.Next.Prev=t,t.Next=n.Next):this.Last=t},Remove:function(n){n.Prev!=null?n.Prev.Next=n.Next:this.First=n.Next;n.Next!=null?n.Next.Prev=n.Prev:this.Last=n.Prev}},o=function(n){this.count=0;this.entryList=new e;this.buckets={};this.compareSelector=n==null?r.Identity:n},o.prototype={Add:function(n,i){var h=this.compareSelector(n),o=u(h),e=new s(n,i),r,f;if(t(this.buckets,o)){for(r=this.buckets[o],f=0;f<r.length;f++)if(this.compareSelector(r[f].Key)===h){this.entryList.Replace(r[f],e);r[f]=e;return}r.push(e)}else this.buckets[o]=[e];this.count++;this.entryList.AddLast(e)},Get:function(n){var e=this.compareSelector(n),o=u(e),r,i,f;if(!t(this.buckets,o))return undefined;for(r=this.buckets[o],i=0;i<r.length;i++)if(f=r[i],this.compareSelector(f.Key)===e)return f.Value;return undefined},Set:function(n,i){var o=this.compareSelector(n),h=u(o),f,r,e;if(t(this.buckets,h))for(f=this.buckets[h],r=0;r<f.length;r++)if(this.compareSelector(f[r].Key)===o)return e=new s(n,i),this.entryList.Replace(f[r],e),f[r]=e,!0;return!1},Contains:function(n){var f=this.compareSelector(n),e=u(f),r,i;if(!t(this.buckets,e))return!1;for(r=this.buckets[e],i=0;i<r.length;i++)if(this.compareSelector(r[i].Key)===f)return!0;return!1},Clear:function(){this.count=0;this.buckets={};this.entryList=new e},Remove:function(n){var e=this.compareSelector(n),f=u(e),i,r;if(t(this.buckets,f))for(i=this.buckets[f],r=0;r<i.length;r++)if(this.compareSelector(i[r].Key)===e){this.entryList.Remove(i[r]);i.splice(r,1);i.length==0&&delete this.buckets[f];this.count--;return}},Count:function(){return this.count},ToEnumerable:function(){var t=this;return new n(function(){var n;return new i(function(){n=t.entryList.First},function(){if(n!=null){var t={Key:n.Key,Value:n.Value};return n=n.Next,this.Yield(t)}return!1},r.Blank)})}},o}(),a=function(t){this.Count=function(){return t.Count()};this.Get=function(i){return n.From(t.Get(i))};this.Contains=function(n){return t.Contains(n)};this.ToEnumerable=function(){return t.ToEnumerable().Select(function(n){return new c(n.Key,n.Value)})}},c=function(n,t){this.Key=function(){return n};u.call(this,t)};return c.prototype=new u,n}()}),function(n,t){n.fn.toEnumerable=function(){return t.From(this).Select(function(t){return n(t)})};t.prototype.TojQuery=function(){return n(this.ToArray())}}(jQuery,this.Enumerable||this.jQuery.Enumerable),function(n,t,i){function h(t,i){this.bodyOverflowX;this.callbacks={hide:[],show:[]};this.checkInterval=null;this.Content;this.$el=n(t);this.$elProxy;this.elProxyPosition;this.enabled=!0;this.options=n.extend({},f,i);this.mouseIsOverProxy=!1;this.namespace="tooltipster-"+Math.round(Math.random()*1e5);this.Status="hidden";this.timerHide=null;this.timerShow=null;this.$tooltip;this.options.iconTheme=this.options.iconTheme.replace(".","");this.options.theme=this.options.theme.replace(".","");this._init()}function e(t,i){var r=!0;return n.each(t,function(n){if(typeof i[n]=="undefined"||t[n]!==i[n])return r=!1,!1}),r}function s(){return!o&&r}function u(){var u=i.body||i.documentElement,r=u.style,n="transition",t;if(typeof r[n]=="string")return!0;for(v=["Moz","Webkit","Khtml","O","ms"],n=n.charAt(0).toUpperCase()+n.substr(1),t=0;t<v.length;t++)if(typeof r[v[t]+n]=="string")return!0;return!1}var f={animation:"fade",arrow:!0,arrowColor:"",autoClose:!0,content:null,contentAsHTML:!1,contentCloning:!0,debug:!0,delay:200,minWidth:0,maxWidth:null,functionInit:function(){},functionBefore:function(n,t){t()},functionReady:function(){},functionAfter:function(){},hideOnClick:!1,icon:"(?)",iconCloning:!0,iconDesktop:!1,iconTouch:!1,iconTheme:"tooltipster-icon",interactive:!1,interactiveTolerance:350,multiple:!1,offsetX:0,offsetY:0,onlyOne:!1,position:"top",positionTracker:!1,positionTrackerCallback:function(){this.option("trigger")=="hover"&&this.option("autoClose")&&this.hide()},restoration:"current",speed:350,timer:0,theme:"tooltipster-default",touchDevices:!0,trigger:"hover",updateAnimation:!0},r,o;h.prototype={_init:function(){var t=this,u,f;if(i.querySelector)if(u=null,t.$el.data("tooltipster-initialTitle")===undefined&&(u=t.$el.attr("title"),u===undefined&&(u=null),t.$el.data("tooltipster-initialTitle",u)),t.options.content!==null?t._content_set(t.options.content):t._content_set(u),f=t.options.functionInit.call(t.$el,t.$el,t.Content),typeof f!="undefined"&&t._content_set(f),t.$el.removeAttr("title").addClass("tooltipstered"),!r&&t.options.iconDesktop||r&&t.options.iconTouch?(typeof t.options.icon=="string"?(t.$elProxy=n('<span class="'+t.options.iconTheme+'"><\/span>'),t.$elProxy.text(t.options.icon)):t.$elProxy=t.options.iconCloning?t.options.icon.clone(!0):t.options.icon,t.$elProxy.insertAfter(t.$el)):t.$elProxy=t.$el,t.options.trigger=="hover"){t.$elProxy.on("mouseenter."+t.namespace,function(){(!s()||t.options.touchDevices)&&(t.mouseIsOverProxy=!0,t._show())}).on("mouseleave."+t.namespace,function(){(!s()||t.options.touchDevices)&&(t.mouseIsOverProxy=!1)});if(r&&t.options.touchDevices)t.$elProxy.on("touchstart."+t.namespace,function(){t._showNow()})}else if(t.options.trigger=="click")t.$elProxy.on("click."+t.namespace,function(){(!s()||t.options.touchDevices)&&t._show()})},_show:function(){var n=this;n.Status!="shown"&&n.Status!="appearing"&&(n.options.delay?n.timerShow=setTimeout(function(){(n.options.trigger=="click"||n.options.trigger=="hover"&&n.mouseIsOverProxy)&&n._showNow()},n.options.delay):n._showNow())},_showNow:function(i){var f=this;f.options.functionBefore.call(f.$el,f.$el,function(){var e,o,s;if(f.enabled&&f.Content!==null){if(i&&f.callbacks.show.push(i),f.callbacks.hide=[],clearTimeout(f.timerShow),f.timerShow=null,clearTimeout(f.timerHide),f.timerHide=null,f.options.onlyOne&&n(".tooltipstered").not(f.$el).each(function(t,i){var r=n(i),u=r.data("tooltipster-ns");n.each(u,function(n,t){var i=r.data(t),u=i.status(),f=i.option("autoClose");u!=="hidden"&&u!=="disappearing"&&f&&i.hide()})}),e=function(){f.Status="shown";n.each(f.callbacks.show,function(n,t){t.call(f.$el)});f.callbacks.show=[]},f.Status!=="hidden")o=0,f.Status==="disappearing"?(f.Status="appearing",u()?(f.$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-"+f.options.animation+"-show"),f.options.speed>0&&f.$tooltip.delay(f.options.speed),f.$tooltip.queue(e)):f.$tooltip.stop().fadeIn(e)):f.Status==="shown"&&e();else{f.Status="appearing";o=f.options.speed;f.bodyOverflowX=n("body").css("overflow-x");n("body").css("overflow-x","hidden");var h="tooltipster-"+f.options.animation,c="-webkit-transition-duration: "+f.options.speed+"ms; -webkit-animation-duration: "+f.options.speed+"ms; -moz-transition-duration: "+f.options.speed+"ms; -moz-animation-duration: "+f.options.speed+"ms; -o-transition-duration: "+f.options.speed+"ms; -o-animation-duration: "+f.options.speed+"ms; -ms-transition-duration: "+f.options.speed+"ms; -ms-animation-duration: "+f.options.speed+"ms; transition-duration: "+f.options.speed+"ms; animation-duration: "+f.options.speed+"ms;",l=f.options.minWidth?"min-width:"+Math.round(f.options.minWidth)+"px;":"",a=f.options.maxWidth?"max-width:"+Math.round(f.options.maxWidth)+"px;":"",v=f.options.interactive?"pointer-events: auto;":"";f.$tooltip=n('<div class="tooltipster-base '+f.options.theme+'" style="'+l+" "+a+" "+v+" "+c+'"><div class="tooltipster-content"><\/div><\/div>');u()&&f.$tooltip.addClass(h);f._content_insert();f.$tooltip.appendTo("body");f.reposition();f.options.functionReady.call(f.$el,f.$el,f.$tooltip);u()?(f.$tooltip.addClass(h+"-show"),f.options.speed>0&&f.$tooltip.delay(f.options.speed),f.$tooltip.queue(e)):f.$tooltip.css("display","none").fadeIn(f.options.speed,e);f._interval_set();n(t).on("scroll."+f.namespace+" resize."+f.namespace,function(){f.reposition()});if(f.options.autoClose)if(n("body").off("."+f.namespace),f.options.trigger=="hover"){if(r&&setTimeout(function(){n("body").on("touchstart."+f.namespace,function(){f.hide()})},0),f.options.interactive){if(r)f.$tooltip.on("touchstart."+f.namespace,function(n){n.stopPropagation()});s=null;f.$elProxy.add(f.$tooltip).on("mouseleave."+f.namespace+"-autoClose",function(){clearTimeout(s);s=setTimeout(function(){f.hide()},f.options.interactiveTolerance)}).on("mouseenter."+f.namespace+"-autoClose",function(){clearTimeout(s)})}else f.$elProxy.on("mouseleave."+f.namespace+"-autoClose",function(){f.hide()});if(f.options.hideOnClick)f.$elProxy.on("click."+f.namespace+"-autoClose",function(){f.hide()})}else if(f.options.trigger=="click"&&(setTimeout(function(){n("body").on("click."+f.namespace+" touchstart."+f.namespace,function(){f.hide()})},0),f.options.interactive))f.$tooltip.on("click."+f.namespace+" touchstart."+f.namespace,function(n){n.stopPropagation()})}f.options.timer>0&&(f.timerHide=setTimeout(function(){f.timerHide=null;f.hide()},f.options.timer+o))}})},_interval_set:function(){var t=this;t.checkInterval=setInterval(function(){if(n("body").find(t.$el).length===0||n("body").find(t.$elProxy).length===0||t.Status=="hidden"||n("body").find(t.$tooltip).length===0)(t.Status=="shown"||t.Status=="appearing")&&t.hide(),t._interval_cancel();else if(t.options.positionTracker){var i=t._repositionInfo(t.$elProxy),r=!1;e(i.dimension,t.elProxyPosition.dimension)&&(t.$elProxy.css("position")==="fixed"?e(i.position,t.elProxyPosition.position)&&(r=!0):e(i.offset,t.elProxyPosition.offset)&&(r=!0));r||(t.reposition(),t.options.positionTrackerCallback.call(t,t.$el))}},200)},_interval_cancel:function(){clearInterval(this.checkInterval);this.checkInterval=null},_content_set:function(n){typeof n=="object"&&n!==null&&this.options.contentCloning&&(n=n.clone(!0));this.Content=n},_content_insert:function(){var n=this,t=this.$tooltip.find(".tooltipster-content");typeof n.Content!="string"||n.options.contentAsHTML?t.empty().append(n.Content):t.text(n.Content)},_update:function(n){var t=this;t._content_set(n);t.Content!==null?t.Status!=="hidden"&&(t._content_insert(),t.reposition(),t.options.updateAnimation&&(u()?(t.$tooltip.css({width:"","-webkit-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-moz-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-o-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-ms-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms",transition:"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms"}).addClass("tooltipster-content-changing"),setTimeout(function(){t.Status!="hidden"&&(t.$tooltip.removeClass("tooltipster-content-changing"),setTimeout(function(){t.Status!=="hidden"&&t.$tooltip.css({"-webkit-transition":t.options.speed+"ms","-moz-transition":t.options.speed+"ms","-o-transition":t.options.speed+"ms","-ms-transition":t.options.speed+"ms",transition:t.options.speed+"ms"})},t.options.speed))},t.options.speed)):t.$tooltip.fadeTo(t.options.speed,.5,function(){t.Status!="hidden"&&t.$tooltip.fadeTo(t.options.speed,1)}))):t.hide()},_repositionInfo:function(n){return{dimension:{height:n.outerHeight(!1),width:n.outerWidth(!1)},offset:n.offset(),position:{left:parseInt(n.css("left")),top:parseInt(n.css("top"))}}},hide:function(i){var r=this,f,e;return i&&r.callbacks.hide.push(i),r.callbacks.show=[],clearTimeout(r.timerShow),r.timerShow=null,clearTimeout(r.timerHide),r.timerHide=null,f=function(){n.each(r.callbacks.hide,function(n,t){t.call(r.$el)});r.callbacks.hide=[]},r.Status=="shown"||r.Status=="appearing"?(r.Status="disappearing",e=function(){r.Status="hidden";typeof r.Content=="object"&&r.Content!==null&&r.Content.detach();r.$tooltip.remove();r.$tooltip=null;n(t).off("."+r.namespace);n("body").off("."+r.namespace).css("overflow-x",r.bodyOverflowX);n("body").off("."+r.namespace);r.$elProxy.off("."+r.namespace+"-autoClose");r.options.functionAfter.call(r.$el,r.$el);f()},u()?(r.$tooltip.clearQueue().removeClass("tooltipster-"+r.options.animation+"-show").addClass("tooltipster-dying"),r.options.speed>0&&r.$tooltip.delay(r.options.speed),r.$tooltip.queue(e)):r.$tooltip.stop().fadeOut(r.options.speed,e)):r.Status=="hidden"&&f(),r},show:function(n){return this._showNow(n),this},update:function(n){return this.content(n)},content:function(n){return typeof n=="undefined"?this.Content:(this._update(n),this)},reposition:function(){var r=this,d,p,et,w,tt,it,b,kt,e,v,dt,rt,gt,ni;if(n("body").find(r.$tooltip).length!==0){r.$tooltip.css("width","");r.elProxyPosition=r._repositionInfo(r.$elProxy);var s=null,k=n(t).width(),i=r.elProxyPosition,o=r.$tooltip.outerWidth(!1),ui=r.$tooltip.innerWidth()+1,l=r.$tooltip.outerHeight(!1);if(r.$elProxy.is("area")){var wt=r.$elProxy.attr("shape"),ti=r.$elProxy.parent().attr("name"),ot=n('img[usemap="#'+ti+'"]'),st=ot.offset().left,ht=ot.offset().top,y=r.$elProxy.attr("coords")!==undefined?r.$elProxy.attr("coords").split(","):undefined;if(wt=="circle"){var ct=parseInt(y[0]),lt=parseInt(y[1]),at=parseInt(y[2]);i.dimension.height=at*2;i.dimension.width=at*2;i.offset.top=ht+lt-at;i.offset.left=st+ct-at}else if(wt=="rect"){var ct=parseInt(y[0]),lt=parseInt(y[1]),ii=parseInt(y[2]),ri=parseInt(y[3]);i.dimension.height=ri-lt;i.dimension.width=ii-ct;i.offset.top=ht+lt;i.offset.left=st+ct}else if(wt=="poly"){var ut=0,ft=0,vt=0,yt=0,bt="even";for(d=0;d<y.length;d++)p=parseInt(y[d]),bt=="even"?(p>vt&&(vt=p,d===0&&(ut=vt)),p<ut&&(ut=p),bt="odd"):(p>yt&&(yt=p,d==1&&(ft=yt)),p<ft&&(ft=p),bt="even");i.dimension.height=yt-ft;i.dimension.width=vt-ut;i.offset.top=ht+ft;i.offset.left=st+ut}else i.dimension.height=ot.outerHeight(!1),i.dimension.width=ot.outerWidth(!1),i.offset.top=ht,i.offset.left=st}var u=0,pt=0,a=0,h=parseInt(r.options.offsetY),c=parseInt(r.options.offsetX),f=r.options.position;function g(){var i=n(t).scrollLeft();u-i<0&&(s=u-i,u=i);u+o-i>k&&(s=u-(k+i-o),u=k+i-o)}function nt(r,u){i.offset.top-n(t).scrollTop()-l-h-12<0&&u.indexOf("top")>-1&&(f=r);i.offset.top+i.dimension.height+l+12+h>n(t).scrollTop()+n(t).height()&&u.indexOf("bottom")>-1&&(f=r,a=i.offset.top-l-h-12)}f=="top"&&(et=i.offset.left+o-(i.offset.left+i.dimension.width),u=i.offset.left+c-et/2,a=i.offset.top-l-h-12,g(),nt("bottom","top"));f=="top-left"&&(u=i.offset.left+c,a=i.offset.top-l-h-12,g(),nt("bottom-left","top-left"));f=="top-right"&&(u=i.offset.left+i.dimension.width+c-o,a=i.offset.top-l-h-12,g(),nt("bottom-right","top-right"));f=="bottom"&&(et=i.offset.left+o-(i.offset.left+i.dimension.width),u=i.offset.left-et/2+c,a=i.offset.top+i.dimension.height+h+12,g(),nt("top","bottom"));f=="bottom-left"&&(u=i.offset.left+c,a=i.offset.top+i.dimension.height+h+12,g(),nt("top-left","bottom-left"));f=="bottom-right"&&(u=i.offset.left+i.dimension.width+c-o,a=i.offset.top+i.dimension.height+h+12,g(),nt("top-right","bottom-right"));f=="left"&&(u=i.offset.left-c-o-12,pt=i.offset.left+c+i.dimension.width+12,w=i.offset.top+l-(i.offset.top+i.dimension.height),a=i.offset.top-w/2-h,u<0&&pt+o>k?(tt=parseFloat(r.$tooltip.css("border-width"))*2,it=o+u-tt,r.$tooltip.css("width",it+"px"),l=r.$tooltip.outerHeight(!1),u=i.offset.left-c-it-12-tt,w=i.offset.top+l-(i.offset.top+i.dimension.height),a=i.offset.top-w/2-h):u<0&&(u=i.offset.left+c+i.dimension.width+12,s="left"));f=="right"&&(u=i.offset.left+c+i.dimension.width+12,pt=i.offset.left-c-o-12,w=i.offset.top+l-(i.offset.top+i.dimension.height),a=i.offset.top-w/2-h,u+o>k&&pt<0?(tt=parseFloat(r.$tooltip.css("border-width"))*2,it=k-u-tt,r.$tooltip.css("width",it+"px"),l=r.$tooltip.outerHeight(!1),w=i.offset.top+l-(i.offset.top+i.dimension.height),a=i.offset.top-w/2-h):u+o>k&&(u=i.offset.left-c-o-12,s="right"));r.options.arrow&&(b="tooltipster-arrow-"+f,kt=r.options.arrowColor.length<1?r.$tooltip.css("background-color"):r.options.arrowColor,s?s=="left"?(b="tooltipster-arrow-right",s=""):s=="right"?(b="tooltipster-arrow-left",s=""):s="left:"+Math.round(s)+"px;":s="",f=="top"||f=="top-left"||f=="top-right"?(e=parseFloat(r.$tooltip.css("border-bottom-width")),v=r.$tooltip.css("border-bottom-color")):f=="bottom"||f=="bottom-left"||f=="bottom-right"?(e=parseFloat(r.$tooltip.css("border-top-width")),v=r.$tooltip.css("border-top-color")):f=="left"?(e=parseFloat(r.$tooltip.css("border-right-width")),v=r.$tooltip.css("border-right-color")):f=="right"?(e=parseFloat(r.$tooltip.css("border-left-width")),v=r.$tooltip.css("border-left-color")):(e=parseFloat(r.$tooltip.css("border-bottom-width")),v=r.$tooltip.css("border-bottom-color")),e>1&&e++,dt="",e!==0&&(rt="",gt="border-color: "+v+";",b.indexOf("bottom")!==-1?rt="margin-top: -"+Math.round(e)+"px;":b.indexOf("top")!==-1?rt="margin-bottom: -"+Math.round(e)+"px;":b.indexOf("left")!==-1?rt="margin-right: -"+Math.round(e)+"px;":b.indexOf("right")!==-1&&(rt="margin-left: -"+Math.round(e)+"px;"),dt='<span class="tooltipster-arrow-border" style="'+rt+" "+gt+';"><\/span>'),r.$tooltip.find(".tooltipster-arrow").remove(),ni='<div class="'+b+' tooltipster-arrow" style="'+s+'">'+dt+'<span style="border-color:'+kt+';"><\/span><\/div>',r.$tooltip.append(ni));r.$tooltip.css({top:Math.round(a)+"px",left:Math.round(u)+"px"})}return r},enable:function(){return this.enabled=!0,this},disable:function(){return this.hide(),this.enabled=!1,this},destroy:function(){var t=this,i,r;return t.hide(),t.$el[0]!==t.$elProxy[0]&&t.$elProxy.remove(),t.$el.removeData(t.namespace).off("."+t.namespace),i=t.$el.data("tooltipster-ns"),i.length===1?(r=null,t.options.restoration==="previous"?r=t.$el.data("tooltipster-initialTitle"):t.options.restoration==="current"&&(r=typeof t.Content=="string"?t.Content:n("<div><\/div>").append(t.Content).html()),r&&t.$el.attr("title",r),t.$el.removeClass("tooltipstered").removeData("tooltipster-ns").removeData("tooltipster-initialTitle")):(i=n.grep(i,function(n){return n!==t.namespace}),t.$el.data("tooltipster-ns",i)),t},elementIcon:function(){return this.$el[0]!==this.$elProxy[0]?this.$elProxy[0]:undefined},elementTooltip:function(){return this.$tooltip?this.$tooltip[0]:undefined},option:function(n,t){return typeof t=="undefined"?this.options[n]:(this.options[n]=t,this)},status:function(){return this.Status}};n.fn["tooltipster"]=function(){var t=arguments,r,i;if(this.length===0){if(typeof t[0]=="string"){r=!0;switch(t[0]){case"setDefaults":n.extend(f,t[1]);break;default:r=!1}return r?!0:this}return this}if(typeof t[0]=="string")return i="#*$~&",this.each(function(){var f=n(this).data("tooltipster-ns"),r=f?n(this).data(f[0]):null,u;if(r){if(typeof r[t[0]]=="function")u=r[t[0]](t[1],t[2]);else throw new Error('Unknown method .tooltipster("'+t[0]+'")');if(u!==r)return i=u,!1}else throw new Error("You called Tooltipster's \""+t[0]+'" method on an uninitialized element');}),i!=="#*$~&"?i:this;var u=[],e=t[0]&&typeof t[0].multiple!="undefined",o=e&&t[0].multiple||!e&&f.multiple,s=t[0]&&typeof t[0].debug!="undefined",c=s&&t[0].debug||!s&&f.debug;return this.each(function(){var f=!1,i=n(this).data("tooltipster-ns"),r=null;i?o?f=!0:c&&console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.'):f=!0;f&&(r=new h(this,t[0]),i||(i=[]),i.push(r.namespace),n(this).data("tooltipster-ns",i),n(this).data(r.namespace,r));u.push(r)}),o?u:this};r=!!("ontouchstart"in t);o=!1;n("body").one("mousemove",function(){o=!0})}(jQuery,window,document);!function(n,t,i){!function(n){"use strict";"function"==typeof define&&define.amd?define(["jquery"],n):jQuery&&!jQuery.fn.qtip&&n(jQuery)}(function(r){"use strict";function ui(n,t,i,f){this.id=i;this.target=n;this.tooltip=s;this.elements={target:n};this._id=o+"-"+i;this.timers={img:{}};this.options=t;this.plugins={};this.cache={event:{},target:r(),disabled:u,attr:f,onTooltip:u,lastClass:""};this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=u}function ft(n){return n===s||"object"!==r.type(n)}function vi(n){return!(r.isFunction(n)||n&&n.attr||n.length||"object"===r.type(n)&&(n.jquery||n.then))}function wt(n){var t,e,i,o;return ft(n)?u:(ft(n.metadata)&&(n.metadata={type:n.metadata}),"content"in n&&(t=n.content,ft(t)||t.jquery||t.done?t=n.content={text:e=vi(t)?u:t}:e=t.text,"ajax"in t&&(i=t.ajax,o=i&&i.once!==u,delete t.ajax,t.text=function(n,t){var u=e||r(this).attr(t.options.content.attr)||"Loading...",f=r.ajax(r.extend({},i,{context:t})).then(i.success,s,i.error).then(function(n){return n&&o&&t.set("content.text",n),n},function(n,i,r){t.destroyed||0===n.status||t.set("content.text",i+": "+r)});return o?u:(t.set("content.text",u),f)}),"title"in t&&(r.isPlainObject(t.title)&&(t.button=t.title.button,t.title=t.title.text),vi(t.title||u)&&(t.title=u))),"position"in n&&ft(n.position)&&(n.position={my:n.position,at:n.position}),"show"in n&&ft(n.show)&&(n.show=n.show.jquery?{target:n.show}:n.show===f?{ready:f}:{event:n.show}),"hide"in n&&ft(n.hide)&&(n.hide=n.hide.jquery?{target:n.hide}:{event:n.hide}),"style"in n&&ft(n.style)&&(n.style={classes:n.style}),r.each(h,function(){this.sanitize&&this.sanitize(n)}),n)}function yi(n,t){for(var u,f=0,i=n,r=t.split(".");i=i[r[f++]];)f<r.length&&(u=i);return[u||n,r.pop()]}function sr(n,t){var i,r,u;for(i in this.checks)for(r in this.checks[i])(u=new RegExp(r,"i").exec(n))&&(t.push(u),("builtin"===i||this.plugins[i])&&this.checks[i][r].apply(this.plugins[i]||this,t))}function bt(n){return yr.concat("").join(n?"-"+n+" ":" ")}function kt(n,t){return t>0?setTimeout(r.proxy(n,this),t):void n.call(this)}function hr(n){this.tooltip.hasClass(a)||(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this.timers.show=kt.call(this,function(){this.toggle(f,n)},this.options.show.delay))}function cr(n){if(!this.tooltip.hasClass(a)&&!this.destroyed){var t=r(n.relatedTarget),i=t.closest(rt)[0]===this.tooltip[0],f=t[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==t[0]&&"mouse"===this.options.position.target&&i||this.options.hide.fixed&&/mouse(out|leave|move)/.test(n.type)&&(i||f))try{n.preventDefault();n.stopImmediatePropagation()}catch(e){}else this.timers.hide=kt.call(this,function(){this.toggle(u,n)},this.options.hide.delay,this)}}function fi(n){!this.tooltip.hasClass(a)&&this.options.hide.inactive&&(clearTimeout(this.timers.inactive),this.timers.inactive=kt.call(this,function(){this.hide(n)},this.options.hide.inactive))}function pi(n){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(n)}function wi(n,i,u){r(t.body).delegate(n,(i.split?i:i.join("."+o+" "))+"."+o,function(){var n=c.api[r.attr(this,ni)];n&&!n.disabled&&u.apply(n,arguments)})}function lr(n,i,e){var y,l,v,h,b,k=r(t.body),p=n[0]===t?k:n,w=n.metadata?n.metadata(e.metadata):s,d="html5"===e.metadata.type&&w?w[e.metadata.name]:s,a=n.data(e.metadata.name||"qtipopts");try{a="string"==typeof a?r.parseJSON(a):a}catch(g){}if(h=r.extend(f,{},c.defaults,e,"object"==typeof a?wt(a):s,wt(d||w)),l=h.position,h.id=i,"boolean"==typeof h.content.text){if(v=n.attr(h.content.attr),h.content.attr===u||!v)return u;h.content.text=v}if(l.container.length||(l.container=k),l.target===u&&(l.target=p),h.show.target===u&&(h.show.target=p),h.show.solo===f&&(h.show.solo=l.container.closest("body")),h.hide.target===u&&(h.hide.target=p),h.position.viewport===f&&(h.position.viewport=l.container),l.container=l.container.eq(0),l.at=new tt(l.at,f),l.my=new tt(l.my),n.data(o))if(h.overwrite)n.qtip("destroy",!0);else if(h.overwrite===u)return u;return n.attr(ei,i),h.suppress&&(b=n.attr("title"))&&n.removeAttr("title").attr(ut,b).attr("title",""),y=new ui(n,h,i,!!v),n.data(o,y),y}function at(n){return n.charAt(0).toUpperCase()+n.slice(1)}function ar(n,t){var r,u,f=t.charAt(0).toUpperCase()+t.slice(1),e=(t+" "+wr.join(f+" ")+f).split(" "),o=0;if(ci[t])return n.css(ci[t]);for(;r=e[o++];)if((u=n.css(r))!==i)return ci[t]=r,u}function ot(n,t){return Math.ceil(parseFloat(ar(n,t)))}function bi(n,t){this._ns="tip";this.options=t;this.offset=t.offset;this.size=[t.width,t.height];this.init(this.qtip=n)}function ki(n,t){this.options=t;this._ns="-modal";this.init(this.qtip=n)}function di(n){this._ns="ie6";this.init(this.qtip=n)}var c,e,tt,dt,gt,f=!0,u=!1,s=null,w="x",y="y",d="width",vt="height",b="top",p="left",it="bottom",k="right",l="center",vr="flipinvert",et="shift",h={},o="qtip",ei="data-hasqtip",ni="data-qtip-id",yr=["ui-widget","ui-tooltip"],rt="."+o,gi="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),nr=o+"-fixed",oi=o+"-default",st=o+"-focus",pr=o+"-hover",a=o+"-disabled",ht="_replacedByqTip",ut="oldtitle",v={ie:function(){for(var n=4,i=t.createElement("div");(i.innerHTML="<!--[if gt IE "+n+"]><i><\/i><![endif]-->")&&i.getElementsByTagName("i")[0];n+=1);return n>4?n:NaN}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||u},tr,ir,yt,li,ai,g,ri,nt,er,or;e=ui.prototype;e._when=function(n){return r.when.apply(r,n)};e.render=function(n){if(this.rendered||this.destroyed)return this;var w,i=this,t=this.options,s=this.cache,y=this.elements,p=t.content.text,l=t.content.title,b=t.content.button,e=t.position,v=("."+this._id+" ",[]);return r.attr(this.target[0],"aria-describedby",this._id),s.posClass=this._createPosClass((this.position={my:e.my,at:e.at}).my),this.tooltip=y.tooltip=w=r("<div/>",{id:this._id,"class":[o,oi,t.style.classes,s.posClass].join(" "),width:t.style.width||"",height:t.style.height||"",tracking:"mouse"===e.target&&e.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":u,"aria-describedby":this._id+"-content","aria-hidden":f}).toggleClass(a,this.disabled).attr(ni,this.id).data(o,this).appendTo(e.container).append(y.content=r("<div />",{"class":o+"-content",id:this._id+"-content","aria-atomic":f})),this.rendered=-1,this.positioning=f,l&&(this._createTitle(),r.isFunction(l)||v.push(this._updateTitle(l,u))),b&&this._createButton(),r.isFunction(p)||v.push(this._updateContent(p,u)),this.rendered=f,this._setWidget(),r.each(h,function(n){var t;"render"===this.initialize&&(t=this(i))&&(i.plugins[n]=t)}),this._unassignEvents(),this._assignEvents(),this._when(v).then(function(){i._trigger("render");i.positioning=u;i.hiddenDuringWait||!t.show.ready&&!n||i.toggle(f,s.event,u);i.hiddenDuringWait=u}),c.api[this.id]=this,this};e.destroy=function(n){function t(){if(!this.destroyed){this.destroyed=f;var t,n=this.target,i=n.attr(ut);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove();r.each(this.plugins,function(){this.destroy&&this.destroy()});for(t in this.timers)clearTimeout(this.timers[t]);n.removeData(o).removeAttr(ni).removeAttr(ei).removeAttr("aria-describedby");this.options.suppress&&i&&n.attr("title",i).removeAttr(ut);this._unassignEvents();this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=s;delete c.api[this.id]}}return this.destroyed?this.target:(n===f&&"hide"!==this.triggering||!this.rendered?t.call(this):(this.tooltip.one("tooltiphidden",r.proxy(t,this)),!this.triggering&&this.hide()),this.target)};dt=e.checks={builtin:{"^id$":function(n,t,i,e){var s=i===f?c.nextid:i,h=o+"-"+s;s!==u&&s.length>0&&!r("#"+h).length?(this._id=h,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):n[t]=e},"^prerender":function(n,t,i){i&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(n,t,i){this._updateContent(i)},"^content.attr$":function(n,t,i,r){this.options.content.text===this.target.attr(r)&&this._updateContent(this.target.attr(i))},"^content.title$":function(n,t,i){return i?(i&&!this.elements.title&&this._createTitle(),void this._updateTitle(i)):this._removeTitle()},"^content.button$":function(n,t,i){this._updateButton(i)},"^content.title.(text|button)$":function(n,t,i){this.set("content."+t,i)},"^position.(my|at)$":function(n,t,i){"string"==typeof i&&(this.position[t]=n[t]=new tt(i,"at"===t))},"^position.container$":function(n,t,i){this.rendered&&this.tooltip.appendTo(i)},"^show.ready$":function(n,t,i){i&&(!this.rendered&&this.render(f)||this.toggle(f))},"^style.classes$":function(n,t,i,r){this.rendered&&this.tooltip.removeClass(r).addClass(i)},"^style.(width|height)":function(n,t,i){this.rendered&&this.tooltip.css(t,i)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(n,t,i){this.rendered&&this.tooltip.toggleClass(oi,!!i)},"^events.(render|show|move|hide|focus|blur)$":function(n,t,i){this.rendered&&this.tooltip[(r.isFunction(i)?"":"un")+"bind"]("tooltip"+t,i)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var n=this.options.position;this.tooltip.attr("tracking","mouse"===n.target&&n.adjust.mouse);this._unassignEvents();this._assignEvents()}}}};e.get=function(n){if(this.destroyed)return this;var i=yi(this.options,n.toLowerCase()),t=i[0][i[1]];return t.precedance?t.string():t};tr=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i;ir=/^prerender|show\.ready/i;e.set=function(n,t){if(this.destroyed)return this;var o,h=this.rendered,i=u,e=this.options;return this.checks,"string"==typeof n?(o=n,n={},n[o]=t):n=r.extend({},n),r.each(n,function(t,u){if(h&&ir.test(t))return void delete n[t];var o,f=yi(e,t.toLowerCase());o=f[0][f[1]];f[0][f[1]]=u&&u.nodeType?r(u):u;i=tr.test(t)||i;n[t]=[f[0],f[1],u,o]}),wt(e),this.positioning=f,r.each(n,r.proxy(sr,this)),this.positioning=u,this.rendered&&this.tooltip[0].offsetWidth>0&&i&&this.reposition("mouse"===e.position.target?s:this.cache.event),this};e._update=function(n,t){var i=this,e=this.cache;return this.rendered&&n?(r.isFunction(n)&&(n=n.call(this.elements.target,e.event,this)||""),r.isFunction(n.then)?(e.waiting=f,n.then(function(n){return e.waiting=u,i._update(n,t)},s,function(n){return i._update(n,t)})):n===u||!n&&""!==n?u:(n.jquery&&n.length>0?t.empty().append(n.css({display:"block",visibility:"visible"})):t.html(n),this._waitForContent(t).then(function(n){i.rendered&&i.tooltip[0].offsetWidth>0&&i.reposition(e.event,!n.length)}))):u};e._waitForContent=function(n){var t=this.cache;return t.waiting=f,(r.fn.imagesLoaded?n.imagesLoaded():r.Deferred().resolve([])).done(function(){t.waiting=u}).promise()};e._updateContent=function(n,t){this._update(n,this.elements.content,t)};e._updateTitle=function(n,t){this._update(n,this.elements.title,t)===u&&this._removeTitle(u)};e._createTitle=function(){var n=this.elements,t=this._id+"-title";n.titlebar&&this._removeTitle();n.titlebar=r("<div />",{"class":o+"-titlebar "+(this.options.style.widget?bt("header"):"")}).append(n.title=r("<div />",{id:t,"class":o+"-title","aria-atomic":f})).insertBefore(n.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(n){r(this).toggleClass("ui-state-active ui-state-focus","down"===n.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(n){r(this).toggleClass("ui-state-hover","mouseover"===n.type)});this.options.content.button&&this._createButton()};e._removeTitle=function(n){var t=this.elements;t.title&&(t.titlebar.remove(),t.titlebar=t.title=t.button=s,n!==u&&this.reposition())};e._createPosClass=function(n){return o+"-pos-"+(n||this.options.position.my).abbrev()};e.reposition=function(i,e){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=f;var a,y,ut,at,c=this.cache,d=this.tooltip,w=this.options.position,o=w.target,et=w.my,g=w.at,ot=w.viewport,ht=w.container,ft=w.adjust,vt=ft.method.split(" "),ct=d.outerWidth(u),lt=d.outerHeight(u),nt=0,tt=0,yt=d.css("position"),s={left:0,top:0},wt=d[0].offsetWidth>0,bt=i&&"scroll"===i.type,st=r(n),pt=ht[0].ownerDocument,rt=this.mouse;if(r.isArray(o)&&2===o.length)g={x:p,y:b},s={left:o[0],top:o[1]};else if("mouse"===o)g={x:p,y:b},(!ft.mouse||this.options.hide.distance)&&c.origin&&c.origin.pageX?i=c.origin:!i||i&&("resize"===i.type||"scroll"===i.type)?i=c.event:rt&&rt.pageX&&(i=rt),"static"!==yt&&(s=ht.offset()),pt.body.offsetWidth!==(n.innerWidth||pt.documentElement.clientWidth)&&(y=r(t.body).offset()),s={left:i.pageX-s.left+(y&&y.left||0),top:i.pageY-s.top+(y&&y.top||0)},ft.mouse&&bt&&rt&&(s.left-=(rt.scrollX||0)-st.scrollLeft(),s.top-=(rt.scrollY||0)-st.scrollTop());else{if("event"===o?i&&i.target&&"scroll"!==i.type&&"resize"!==i.type?c.target=r(i.target):i.target||(c.target=this.elements.target):"event"!==o&&(c.target=r(o.jquery?o:this.elements.target)),o=c.target,o=r(o).eq(0),0===o.length)return this;o[0]===t||o[0]===n?(nt=v.iOS?n.innerWidth:o.width(),tt=v.iOS?n.innerHeight:o.height(),o[0]===n&&(s={top:(ot||o).scrollTop(),left:(ot||o).scrollLeft()})):h.imagemap&&o.is("area")?a=h.imagemap(this,o,g,h.viewport?vt:u):h.svg&&o&&o[0].ownerSVGElement?a=h.svg(this,o,g,h.viewport?vt:u):(nt=o.outerWidth(u),tt=o.outerHeight(u),s=o.offset());a&&(nt=a.width,tt=a.height,y=a.offset,s=a.position);s=this.reposition.offset(o,s,ht);(v.iOS>3.1&&v.iOS<4.1||v.iOS>=4.3&&v.iOS<4.33||!v.iOS&&"fixed"===yt)&&(s.left-=st.scrollLeft(),s.top-=st.scrollTop());(!a||a&&a.adjustable!==u)&&(s.left+=g.x===k?nt:g.x===l?nt/2:0,s.top+=g.y===it?tt:g.y===l?tt/2:0)}return s.left+=ft.x+(et.x===k?-ct:et.x===l?-ct/2:0),s.top+=ft.y+(et.y===it?-lt:et.y===l?-lt/2:0),h.viewport?(ut=s.adjusted=h.viewport(this,s,w,nt,tt,ct,lt),y&&ut.left&&(s.left+=y.left),y&&ut.top&&(s.top+=y.top),ut.my&&(this.position.my=ut.my)):s.adjusted={left:0,top:0},c.posClass!==(at=this._createPosClass(this.position.my))&&d.removeClass(c.posClass).addClass(c.posClass=at),this._trigger("move",[s,ot.elem||ot],i)?(delete s.adjusted,e===u||!wt||isNaN(s.left)||isNaN(s.top)||"mouse"===o||!r.isFunction(w.effect)?d.css(s):r.isFunction(w.effect)&&(w.effect.call(d,this,r.extend({},s)),d.queue(function(n){r(this).css({opacity:"",height:""});v.ie&&this.style.removeAttribute("filter");n()})),this.positioning=u,this):this};e.reposition.offset=function(n,i,u){function s(n,t){i.left+=t*n.scrollLeft();i.top+=t*n.scrollTop()}if(!u[0])return i;var o,h,e,c,l=r(n[0].ownerDocument),a=!!v.ie&&"CSS1Compat"!==t.compatMode,f=u[0];do"static"!==(h=r.css(f,"position"))&&("fixed"===h?(e=f.getBoundingClientRect(),s(l,-1)):(e=r(f).position(),e.left+=parseFloat(r.css(f,"borderLeftWidth"))||0,e.top+=parseFloat(r.css(f,"borderTopWidth"))||0),i.left-=e.left+(parseFloat(r.css(f,"marginLeft"))||0),i.top-=e.top+(parseFloat(r.css(f,"marginTop"))||0),o||"hidden"===(c=r.css(f,"overflow"))||"visible"===c||(o=r(f)));while(f=f.offsetParent);return o&&(o[0]!==l[0]||a)&&s(o,1),i};yt=(tt=e.reposition.Corner=function(n,t){n=(""+n).replace(/([A-Z])/," $1").replace(/middle/gi,l).toLowerCase();this.x=(n.match(/left|right/i)||n.match(/center/)||["inherit"])[0].toLowerCase();this.y=(n.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();this.forceY=!!t;var i=n.charAt(0);this.precedance="t"===i||"b"===i?y:w}).prototype;yt.invert=function(n,t){this[n]=this[n]===p?k:this[n]===k?p:t||this[n]};yt.string=function(n){var t=this.x,i=this.y,r=t!==i?"center"===t||"center"!==i&&(this.precedance===y||this.forceY)?[i,t]:[t,i]:[t];return n!==!1?r.join(" "):r};yt.abbrev=function(){var n=this.string(!1);return n[0].charAt(0)+(n[1]&&n[1].charAt(0)||"")};yt.clone=function(){return new tt(this.string(),this.forceY)};e.toggle=function(n,i){var c=this.cache,b=this.options,e=this.tooltip;if(i){if(/over|enter/.test(i.type)&&c.event&&/out|leave/.test(c.event.type)&&b.show.target.add(i.target).length===b.show.target.length&&e.has(i.relatedTarget).length)return this;c.event=r.event.fix(i)}if(this.waiting&&!n&&(this.hiddenDuringWait=f),!this.rendered)return n?this.render(1):this;if(this.destroyed||this.disabled)return this;var y,p,l,w=n?"show":"hide",h=this.options[w],k=(this.options[n?"hide":"show"],this.options.position),a=this.options.content,d=this.tooltip.css("width"),g=this.tooltip.is(":visible"),nt=n||1===h.target.length,tt=!i||h.target.length<2||c.target[0]===i.target;return(typeof n).search("boolean|number")&&(n=!g),y=!e.is(":animated")&&g===n&&tt,p=y?s:!!this._trigger(w,[90]),this.destroyed?this:(p!==u&&n&&this.focus(i),!p||y?this:(r.attr(e[0],"aria-hidden",!n),n?(this.mouse&&(c.origin=r.event.fix(this.mouse)),r.isFunction(a.text)&&this._updateContent(a.text,u),r.isFunction(a.title)&&this._updateTitle(a.title,u),!gt&&"mouse"===k.target&&k.adjust.mouse&&(r(t).bind("mousemove."+o,this._storeMouse),gt=f),d||e.css("width",e.outerWidth(u)),this.reposition(i,arguments[2]),d||e.css("width",""),h.solo&&("string"==typeof h.solo?r(h.solo):r(rt,h.solo)).not(e).not(h.target).qtip("hide",r.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete c.origin,gt&&!r(rt+'[tracking="true"]:visible',h.solo).not(e).length&&(r(t).unbind("mousemove."+o),gt=u),this.blur(i)),l=r.proxy(function(){n?(v.ie&&e[0].style.removeAttribute("filter"),e.css("overflow",""),"string"==typeof h.autofocus&&r(this.options.show.autofocus,e).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):e.css({display:"",visibility:"",opacity:"",left:"",top:""});this._trigger(n?"visible":"hidden")},this),h.effect===u||nt===u?(e[w](),l()):r.isFunction(h.effect)?(e.stop(1,1),h.effect.call(e,this),e.queue("fx",function(n){l();n()})):e.fadeTo(90,n?1:0,l),n&&h.target.trigger("qtip-"+this.id+"-inactive"),this))};e.show=function(n){return this.toggle(f,n)};e.hide=function(n){return this.toggle(u,n)};e.focus=function(n){if(!this.rendered||this.destroyed)return this;var t=r(rt),i=this.tooltip,f=parseInt(i[0].style.zIndex,10),u=c.zindex+t.length;return i.hasClass(st)||this._trigger("focus",[u],n)&&(f!==u&&(t.each(function(){this.style.zIndex>f&&(this.style.zIndex=this.style.zIndex-1)}),t.filter("."+st).qtip("blur",n)),i.addClass(st)[0].style.zIndex=u),this};e.blur=function(n){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(st),this._trigger("blur",[this.tooltip.css("zIndex")],n),this)};e.disable=function(n){return this.destroyed?this:("toggle"===n?n=!(this.rendered?this.tooltip.hasClass(a):this.disabled):"boolean"!=typeof n&&(n=f),this.rendered&&this.tooltip.toggleClass(a,n).attr("aria-disabled",n),this.disabled=!!n,this)};e.enable=function(){return this.disable(u)};e._createButton=function(){var e=this,n=this.elements,i=n.tooltip,t=this.options.content.button,s="string"==typeof t,f=s?t:"Close tooltip";n.button&&n.button.remove();n.button=t.jquery?t:r("<a />",{"class":"qtip-close "+(this.options.style.widget?"":o+"-icon"),title:f,"aria-label":f}).prepend(r("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"}));n.button.appendTo(n.titlebar||i).attr("role","button").click(function(n){return i.hasClass(a)||e.hide(n),u})};e._updateButton=function(n){if(!this.rendered)return u;var t=this.elements.button;n?this._createButton():t.remove()};e._setWidget=function(){var t=this.options.style.widget,n=this.elements,i=n.tooltip,r=i.hasClass(a);i.removeClass(a);a=t?"ui-state-disabled":"qtip-disabled";i.toggleClass(a,r);i.toggleClass("ui-helper-reset "+bt(),t).toggleClass(oi,this.options.style.def&&!t);n.content&&n.content.toggleClass(bt("content"),t);n.titlebar&&n.titlebar.toggleClass(bt("header"),t);n.button&&n.button.toggleClass(o+"-icon",!t)};e._storeMouse=function(n){return(this.mouse=r.event.fix(n)).type="mousemove",this};e._bind=function(n,t,i,u,f){if(n&&i&&t.length){var e="."+this._id+(u?"-"+u:"");return r(n).bind((t.split?t:t.join(e+" "))+e,r.proxy(i,f||this)),this}};e._unbind=function(n,t){return n&&r(n).unbind("."+this._id+(t?"-"+t:"")),this};e._trigger=function(n,t,i){var f=r.Event("tooltip"+n);return f.originalEvent=i&&r.extend({},i)||this.cache.event||s,this.triggering=n,this.tooltip.trigger(f,[this].concat(t||[])),this.triggering=u,!f.isDefaultPrevented()};e._bindEvents=function(n,t,i,u,f,e){var o=i.filter(u).add(u.filter(i)),s=[];o.length&&(r.each(t,function(t,i){var u=r.inArray(i,n);u>-1&&s.push(n.splice(u,1)[0])}),s.length&&(this._bind(o,s,function(n){var t=this.rendered?this.tooltip[0].offsetWidth>0:!1;(t?e:f).call(this,n)}),i=i.not(o),u=u.not(o)));this._bind(i,n,f);this._bind(u,t,e)};e._assignInitialEvents=function(n){function i(n){return this.disabled||this.destroyed?u:(this.cache.event=n&&r.event.fix(n),this.cache.target=n&&r(n.target),clearTimeout(this.timers.show),void(this.timers.show=kt.call(this,function(){this.render("object"==typeof n||t.show.ready)},t.prerender?0:t.show.delay)))}var t=this.options,e=t.show.target,s=t.hide.target,h=t.show.event?r.trim(""+t.show.event).split(" "):[],o=t.hide.event?r.trim(""+t.hide.event).split(" "):[];this._bind(this.elements.target,["remove","removeqtip"],function(){this.destroy(!0)},"destroy");/mouse(over|enter)/i.test(t.show.event)&&!/mouse(out|leave)/i.test(t.hide.event)&&o.push("mouseleave");this._bind(e,"mousemove",function(n){this._storeMouse(n);this.cache.onTarget=f});this._bindEvents(h,o,e,s,i,function(){return this.timers?void clearTimeout(this.timers.show):u});(t.show.ready||t.prerender)&&i.call(this,n)};e._assignEvents=function(){var y=this,i=this.options,f=i.position,e=this.tooltip,s=i.show.target,o=i.hide.target,p=f.container,h=f.viewport,l=r(t),v=(r(t.body),r(n)),w=i.show.event?r.trim(""+i.show.event).split(" "):[],b=i.hide.event?r.trim(""+i.hide.event).split(" "):[];r.each(i.events,function(n,t){y._bind(e,"toggle"===n?["tooltipshow","tooltiphide"]:["tooltip"+n],t,null,e)});/mouse(out|leave)/i.test(i.hide.event)&&"window"===i.hide.leave&&this._bind(l,["mouseout","blur"],function(n){/select|option/.test(n.target.nodeName)||n.relatedTarget||this.hide(n)});i.hide.fixed?o=o.add(e.addClass(nr)):/mouse(over|enter)/i.test(i.show.event)&&this._bind(o,"mouseleave",function(){clearTimeout(this.timers.show)});(""+i.hide.event).indexOf("unfocus")>-1&&this._bind(p.closest("html"),["mousedown","touchstart"],function(n){var t=r(n.target),i=this.rendered&&!this.tooltip.hasClass(a)&&this.tooltip[0].offsetWidth>0,u=t.parents(rt).filter(this.tooltip[0]).length>0;t[0]===this.target[0]||t[0]===this.tooltip[0]||u||this.target.has(t[0]).length||!i||this.hide(n)});"number"==typeof i.hide.inactive&&(this._bind(s,"qtip-"+this.id+"-inactive",fi,"inactive"),this._bind(o.add(e),c.inactiveEvents,fi));this._bindEvents(w,b,s,o,hr,cr);this._bind(s.add(e),"mousemove",function(n){if("number"==typeof i.hide.distance){var t=this.cache.origin||{},r=this.options.hide.distance,u=Math.abs;(u(n.pageX-t.pageX)>=r||u(n.pageY-t.pageY)>=r)&&this.hide(n)}this._storeMouse(n)});"mouse"===f.target&&f.adjust.mouse&&(i.hide.event&&this._bind(s,["mouseenter","mouseleave"],function(n){return this.cache?void(this.cache.onTarget="mouseenter"===n.type):u}),this._bind(l,"mousemove",function(n){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(a)&&this.tooltip[0].offsetWidth>0&&this.reposition(n)}));(f.adjust.resize||h.length)&&this._bind(r.event.special.resize?h:v,"resize",pi);f.adjust.scroll&&this._bind(v.add(f.container),"scroll",pi)};e._unassignEvents=function(){var u=this.options,f=u.show.target,e=u.hide.target,i=r.grep([this.elements.target[0],this.rendered&&this.tooltip[0],u.position.container[0],u.position.viewport[0],u.position.container.closest("html")[0],n,t],function(n){return"object"==typeof n});f&&f.toArray&&(i=i.concat(f.toArray()));e&&e.toArray&&(i=i.concat(e.toArray()));this._unbind(i)._unbind(i,"destroy")._unbind(i,"inactive")};r(function(){wi(rt,["mouseenter","mouseleave"],function(n){var u="mouseenter"===n.type,i=r(n.currentTarget),f=r(n.relatedTarget||n.target),t=this.options;u?(this.focus(n),i.hasClass(nr)&&!i.hasClass(a)&&clearTimeout(this.timers.hide)):"mouse"===t.position.target&&t.position.adjust.mouse&&t.hide.event&&t.show.target&&!f.closest(t.show.target[0]).length&&this.hide(n);i.toggleClass(pr,u)});wi("["+ni+"]",gi,fi)});c=r.fn.qtip=function(n,t,e){var a=(""+n).toLowerCase(),y=s,p=r.makeArray(arguments).slice(1),v=p[p.length-1],l=this[0]?r.data(this[0],o):s;return!arguments.length&&l||"api"===a?l:"string"==typeof n?(this.each(function(){var n=r.data(this,o);if(!n)return f;if(v&&v.timeStamp&&(n.cache.event=v),t&&("option"===a||"options"===a)){if(e===i&&!r.isPlainObject(t))return y=n.get(t),u;n.set(t,e)}else n[a]&&n[a].apply(n,p)}),y!==s?y:this):"object"!=typeof n&&arguments.length?void 0:(l=wt(r.extend(f,{},n)),this.each(function(n){var i,t;return t=r.isArray(l.id)?l.id[n]:l.id,t=!t||t===u||t.length<1||c.api[t]?c.nextid++:t,i=lr(r(this),t,l),i===u?f:(c.api[t]=i,r.each(h,function(){"initialize"===this.initialize&&this(i)}),void i._assignInitialEvents(v))}))};r.qtip=ui;c.api={};r.each({attr:function(n,t){if(this.length){var u=this[0],f="title",i=r.data(u,"qtip");if(n===f&&i&&"object"==typeof i&&i.options.suppress)return arguments.length<2?r.attr(u,ut):(i&&i.options.content.attr===f&&i.cache.attr&&i.set("content.text",t),this.attr(ut,t))}return r.fn["attr"+ht].apply(this,arguments)},clone:function(n){var t=(r([]),r.fn["clone"+ht].apply(this,arguments));return n||t.filter("["+ut+"]").attr("title",function(){return r.attr(this,ut)}).removeAttr(ut),t}},function(n,t){if(!t||r.fn[n+ht])return f;var i=r.fn[n+ht]=r.fn[n];r.fn[n]=function(){return t.apply(this,arguments)||i.apply(this,arguments)}});r.ui||(r["cleanData"+ht]=r.cleanData,r.cleanData=function(n){for(var t,i=0;(t=r(n[i])).length;i++)if(t.attr(ei))try{t.triggerHandler("removeqtip")}catch(u){}r["cleanData"+ht].apply(this,arguments)});c.version="2.2.1";c.nextid=0;c.inactiveEvents=gi;c.zindex=15e3;c.defaults={prerender:u,id:u,overwrite:f,suppress:f,content:{text:f,attr:"title",title:u,button:u},position:{my:"top left",at:"bottom right",target:u,container:u,viewport:u,adjust:{x:0,y:0,mouse:f,scroll:f,resize:f,method:"flipinvert flipinvert"},effect:function(n,t){r(this).animate(t,{duration:200,queue:u})}},show:{target:u,event:"mouseenter",effect:f,delay:90,solo:u,ready:u,autofocus:u},hide:{target:u,event:"mouseleave",effect:f,delay:0,fixed:u,inactive:u,leave:"window",distance:u},style:{classes:"",widget:u,width:u,height:u,def:f},events:{render:s,move:s,show:s,hide:s,toggle:s,visible:s,hidden:s,focus:s,blur:s}};var si,hi="margin",ti="border",pt="color",ct="background-color",rr="transparent",ur=" !important",ii=!!t.createElement("canvas").getContext,fr=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,ci={},wr=["Webkit","O","Moz","ms"];if(ii)var br=n.devicePixelRatio||1,kr=function(){var n=t.createElement("canvas").getContext("2d");return n.backingStorePixelRatio||n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||1}(),lt=br/kr;else li=function(n,t,i){return"<qtipvml:"+n+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(t||"")+' style="behavior: url(#default#VML); '+(i||"")+'" />'};r.extend(bi.prototype,{init:function(n){var t,i;i=this.element=n.elements.tip=r("<div />",{"class":o+"-tip"}).prependTo(n.tooltip);ii?(t=r("<canvas />").appendTo(this.element)[0].getContext("2d"),t.lineJoin="miter",t.miterLimit=1e5,t.save()):(t=li("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(t+t),n._bind(r("*",i).add(i),["click","mousedown"],function(n){n.stopPropagation()},this._ns));n._bind(n.tooltip,"tooltipmove",this.reposition,this._ns,this);this.create()},_swapDimensions:function(){this.size[0]=this.options.height;this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width;this.size[1]=this.options.height},_useTitle:function(n){var t=this.qtip.elements.titlebar;return t&&(n.y===b||n.y===l&&this.element.position().top+this.size[1]/2+this.options.offset<t.outerHeight(f))},_parseCorner:function(n){var t=this.qtip.options.position.my;return n===u||t===u?n=u:n===f?n=new tt(t.string()):n.string||(n=new tt(n),n.fixed=f),n},_parseWidth:function(n,t,i){var r=this.qtip.elements,u=ti+at(t)+"Width";return(i?ot(i,u):ot(r.content,u)||ot(this._useTitle(n)&&r.titlebar||r.content,u)||ot(r.tooltip,u))||0},_parseRadius:function(n){var t=this.qtip.elements,i=ti+at(n.y)+at(n.x)+"Radius";return v.ie<9?0:ot(this._useTitle(n)&&t.titlebar||t.content,i)||ot(t.tooltip,i)||0},_invalidColour:function(n,t,i){var r=n.css(t);return!r||i&&r===n.css(i)||fr.test(r)?u:r},_parseColours:function(n){var i=this.qtip.elements,u=this.element.css("cssText",""),f=ti+at(n[n.precedance])+at(pt),o=this._useTitle(n)&&i.titlebar||i.content,t=this._invalidColour,e=[];return e[0]=t(u,ct)||t(o,ct)||t(i.content,ct)||t(i.tooltip,ct)||u.css(ct),e[1]=t(u,f,pt)||t(o,f,pt)||t(i.content,f,pt)||t(i.tooltip,f,pt)||i.tooltip.css(f),r("*",u).add(u).css("cssText",ct+":"+rr+ur+";"+ti+":0"+ur+";"),e},_calculateSize:function(n){var o,f,e,s=n.precedance===y,h=this.options.width,r=this.options.height,c="c"===n.abbrev(),l=(s?h:r)*(c?.5:1),i=Math.pow,a=Math.round,u=Math.sqrt(i(l,2)+i(r,2)),t=[this.border/l*u,this.border/r*u];return t[2]=Math.sqrt(i(t[0],2)-i(this.border,2)),t[3]=Math.sqrt(i(t[1],2)-i(this.border,2)),o=u+t[2]+t[3]+(c?0:t[0]),f=o/u,e=[a(f*h),a(f*r)],s?e:e.reverse()},_calculateTip:function(n,t,i){i=i||1;t=t||this.size;var r=t[0]*i,u=t[1]*i,e=Math.ceil(r/2),o=Math.ceil(u/2),f={br:[0,0,r,u,r,0],bl:[0,0,r,0,0,u],tr:[0,u,r,0,r,u],tl:[0,0,0,u,r,u],tc:[0,u,e,0,r,u],bc:[0,0,r,0,e,u],rc:[0,0,r,o,0,u],lc:[r,0,r,u,0,o]};return f.lt=f.br,f.rt=f.bl,f.lb=f.tr,f.rb=f.tl,f[n.abbrev()]},_drawCoords:function(n,t){n.beginPath();n.moveTo(t[0],t[1]);n.lineTo(t[2],t[3]);n.lineTo(t[4],t[5]);n.closePath()},create:function(){var n=this.corner=(ii||v.ie)&&this._parseCorner(this.options.corner);return(this.enabled=!!this.corner&&"c"!==this.corner.abbrev())&&(this.qtip.cache.corner=n.clone(),this.update()),this.element.toggle(this.enabled),this.corner},update:function(t,i){if(!this.enabled)return this;var a,et,h,c,ot,g,o,s,ht=this.qtip.elements,st=this.element,rt=st.children(),ut=this.options,nt=this.size,e=ut.mimic,ft=Math.round;t||(t=this.qtip.cache.corner||this.corner);e===u?e=t:(e=new tt(e),e.precedance=t.precedance,"inherit"===e.x?e.x=t.x:"inherit"===e.y?e.y=t.y:e.x===e.y&&(e[t.precedance]=t[t.precedance]));et=e.precedance;t.precedance===w?this._swapDimensions():this._resetDimensions();a=this.color=this._parseColours(t);a[1]!==rr?(s=this.border=this._parseWidth(t,t[t.precedance]),ut.border&&1>s&&!fr.test(a[1])&&(a[0]=a[1]),this.border=s=ut.border!==f?ut.border:s):this.border=s=0;o=this.size=this._calculateSize(t);st.css({width:o[0],height:o[1],lineHeight:o[1]+"px"});g=t.precedance===y?[ft(e.x===p?s:e.x===k?o[0]-nt[0]-s:(o[0]-nt[0])/2),ft(e.y===b?o[1]-nt[1]:0)]:[ft(e.x===p?o[0]-nt[0]:0),ft(e.y===b?s:e.y===it?o[1]-nt[1]-s:(o[1]-nt[1])/2)];ii?(h=rt[0].getContext("2d"),h.restore(),h.save(),h.clearRect(0,0,6e3,6e3),c=this._calculateTip(e,nt,lt),ot=this._calculateTip(e,this.size,lt),rt.attr(d,o[0]*lt).attr(vt,o[1]*lt),rt.css(d,o[0]).css(vt,o[1]),this._drawCoords(h,ot),h.fillStyle=a[1],h.fill(),h.translate(g[0]*lt,g[1]*lt),this._drawCoords(h,c),h.fillStyle=a[0],h.fill()):(c=this._calculateTip(e),c="m"+c[0]+","+c[1]+" l"+c[2]+","+c[3]+" "+c[4]+","+c[5]+" xe",g[2]=s&&/^(r|b)/i.test(t.string())?8===v.ie?2:1:0,rt.css({coordsize:o[0]+s+" "+(o[1]+s),antialias:""+(e.string().indexOf(l)>-1),left:g[0]-g[2]*Number(et===w),top:g[1]-g[2]*Number(et===y),width:o[0]+s,height:o[1]+s}).each(function(n){var t=r(this);t[t.prop?"prop":"attr"]({coordsize:o[0]+s+" "+(o[1]+s),path:c,fillcolor:a[0],filled:!!n,stroked:!n}).toggle(!(!s&&!n));n||t.html(li("stroke",'weight="'+2*s+'px" color="'+a[1]+'" miterlimit="1000" joinstyle="miter"'))}));n.opera&&setTimeout(function(){ht.tip.css({display:"inline-block",visibility:"visible"})},1);i!==u&&this.calculate(t,o)},calculate:function(n,t){if(!this.enabled)return u;var i,o,e=this,s=this.qtip.elements,c=this.element,h=this.options.offset,f=(s.tooltip.hasClass("ui-widget"),{});return n=n||this.corner,i=n.precedance,t=t||this._calculateSize(n),o=[n.x,n.y],i===w&&o.reverse(),r.each(o,function(r,u){var o,a,c;u===l?(o=i===y?p:b,f[o]="50%",f[hi+"-"+o]=-Math.round(t[i===y?0:1]/2)+h):(o=e._parseWidth(n,u,s.tooltip),a=e._parseWidth(n,u,s.content),c=e._parseRadius(n),f[u]=Math.max(-e.border,r?a:h+(c>o?c:-o)))}),f[n[i]]-=t[i===w?0:1],c.css({margin:"",top:"",bottom:"",left:"",right:""}).css(f),f},reposition:function(n,t,r){function tt(n,t,i,r,u){n===et&&s.precedance===t&&h[r]&&s[i]!==l?s.precedance=s.precedance===w?y:w:n!==et&&h[r]&&(s[t]=s[t]===l?h[r]>0?r:u:s[t]===r?u:r)}function rt(n,t,f){s[n]===l?nt[hi+"-"+t]=o[n]=e[hi+"-"+t]-h[t]:(a=e[f]!==i?[h[t],-e[t]]:[-h[t],e[t]],(o[n]=Math.max(a[0],a[1]))>a[0]&&(r[t]-=h[t],o[t]=u),nt[e[f]!==i?f:t]=o[n])}if(this.enabled){var e,a,c=t.cache,s=this.corner.clone(),h=r.adjusted,v=t.options.position.adjust.method.split(" "),d=v[0],g=v[1]||v[0],o={left:u,top:u,x:0,y:0},nt={};this.corner.fixed!==f&&(tt(d,w,y,p,k),tt(g,y,w,b,it),(s.string()!==c.corner.string()||c.cornerTop!==h.top||c.cornerLeft!==h.left)&&this.update(s,u));e=this.calculate(s);e.right!==i&&(e.left=-e.right);e.bottom!==i&&(e.top=-e.bottom);e.user=this.offset;(o.left=d===et&&!!h.left)&&rt(w,p,k);(o.top=g===et&&!!h.top)&&rt(y,b,it);this.element.css(nt).toggle(!(o.x&&o.y||s.x===l&&o.y||s.y===l&&o.x));r.left-=e.left.charAt?e.user:d!==et||o.top||!o.left&&!o.top?e.left+this.border:0;r.top-=e.top.charAt?e.user:g!==et||o.left||!o.left&&!o.top?e.top+this.border:0;c.cornerLeft=h.left;c.cornerTop=h.top;c.corner=s.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns);this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}});si=h.tip=function(n){return new bi(n,n.options.style.tip)};si.initialize="render";si.sanitize=function(n){if(n.style&&"tip"in n.style){var t=n.style.tip;"object"!=typeof t&&(t=n.style.tip={corner:t});/string|boolean/i.test(typeof t.corner)||(t.corner=f)}};dt.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create();this.qtip.reposition()},"^style.tip.(height|width)$":function(n){this.size=[n.width,n.height];this.update();this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}};r.extend(f,c.defaults,{style:{tip:{corner:f,mimic:u,width:6,height:6,border:f,offset:0}}});h.viewport=function(i,r,f,e,o,s,h){function at(n,t,i,u,f,e,o,s,h){var y=r[f],c=v[n],k=kt[n],rt=i===et,tt=c===f?h:c===e?-h:-h/2,ut=k===f?s:k===e?-s:-s/2,it=st[f]+nt[f]-(yt?0:g[f]),b=it-y,w=y+h-(o===d?ft:ot)-it,p=tt-(v.precedance===n||c===v[t]?ut:0)-(k===l?s/2:0);return rt?(p=(c===f?1:-1)*tt,r[f]+=b>0?b:w>0?-w:0,r[f]=Math.max(-g[f]+nt[f],y-p,Math.min(Math.max(-g[f]+nt[f]+(o===d?ft:ot),y+p),r[f],"center"===c?y-tt:1e9))):(u*=i===vr?2:0,b>0&&(c!==f||w>0)?(r[f]-=p+u,a.invert(n,f)):w>0&&(c!==e||b>0)&&(r[f]-=(c===l?-p:p)+u,a.invert(n,e)),r[f]<st&&-r[f]>w&&(r[f]=y,a=v.clone())),r[f]-y}var ut,a,g,yt,ft,ot,st,nt,pt=f.target,bt=i.elements.tooltip,v=f.my,kt=f.at,tt=f.adjust,ht=tt.method.split(" "),ct=ht[0],lt=ht[1]||ht[0],c=f.viewport,wt=f.container,rt=(i.cache,{left:0,top:0});return c.jquery&&pt[0]!==n&&pt[0]!==t.body&&"none"!==tt.method?(g=wt.offset()||rt,yt="static"===wt.css("position"),ut="fixed"===bt.css("position"),ft=c[0]===n?c.width():c.outerWidth(u),ot=c[0]===n?c.height():c.outerHeight(u),st={left:ut?0:c.scrollLeft(),top:ut?0:c.scrollTop()},nt=c.offset()||rt,("shift"!==ct||"shift"!==lt)&&(a=v.clone()),rt={left:"none"!==ct?at(w,y,ct,tt.x,p,k,d,e,s):0,top:"none"!==lt?at(y,w,lt,tt.y,b,it,vt,o,h):0,my:a}):rt};h.polys={polygon:function(n,t){for(var r,h,c,i={width:0,height:0,position:{top:1e10,right:0,bottom:0,left:1e10},adjustable:u},f=0,e=[],o=1,s=1,a=0,v=0,f=n.length;f--;)r=[parseInt(n[--f],10),parseInt(n[f+1],10)],r[0]>i.position.right&&(i.position.right=r[0]),r[0]<i.position.left&&(i.position.left=r[0]),r[1]>i.position.bottom&&(i.position.bottom=r[1]),r[1]<i.position.top&&(i.position.top=r[1]),e.push(r);if(h=i.width=Math.abs(i.position.right-i.position.left),c=i.height=Math.abs(i.position.bottom-i.position.top),"c"===t.abbrev())i.position={left:i.position.left+i.width/2,top:i.position.top+i.height/2};else{for(;h>0&&c>0&&o>0&&s>0;)for(h=Math.floor(h/2),c=Math.floor(c/2),t.x===p?o=h:t.x===k?o=i.width-h:o+=Math.floor(h/2),t.y===b?s=c:t.y===it?s=i.height-c:s+=Math.floor(c/2),f=e.length;f--&&!(e.length<2);)a=e[f][0]-i.position.left,v=e[f][1]-i.position.top,(t.x===p&&a>=o||t.x===k&&o>=a||t.x===l&&(o>a||a>i.width-o)||t.y===b&&v>=s||t.y===it&&s>=v||t.y===l&&(s>v||v>i.height-s))&&e.splice(f,1);i.position={left:e[0][0],top:e[0][1]}}return i},rect:function(n,t,i,r){return{width:Math.abs(i-n),height:Math.abs(r-t),position:{left:Math.min(n,i),top:Math.min(t,r)}}},_angles:{tc:1.5,tr:7/4,tl:5/4,bc:.5,br:.25,bl:.75,rc:2,lc:1,c:0},ellipse:function(n,t,i,r,f){var e=h.polys._angles[f.abbrev()],o=0===e?0:i*Math.cos(e*Math.PI),s=r*Math.sin(e*Math.PI);return{width:2*i-Math.abs(o),height:2*r-Math.abs(s),position:{left:n+o,top:t+s},adjustable:u}},circle:function(n,t,i,r){return h.polys.ellipse(n,t,i,i,r)}};h.imagemap=function(n,t,i){t.jquery||(t=r(t));var e,s,c,o,v,l=(t.attr("shape")||"rect").toLowerCase().replace("poly","polygon"),f=r('img[usemap="#'+t.parent("map").attr("name")+'"]'),y=r.trim(t.attr("coords")),a=y.replace(/,$/,"").split(",");if(!f.length)return u;if("polygon"===l)o=h.polys.polygon(a,i);else{if(!h.polys[l])return u;for(c=-1,v=a.length,s=[];++c<v;)s.push(parseInt(a[c],10));o=h.polys[l].apply(this,s.concat(i))}return e=f.offset(),e.left+=Math.ceil((f.outerWidth(u)-f.width())/2),e.top+=Math.ceil((f.outerHeight(u)-f.height())/2),o.position.left+=e.left,o.position.top+=e.top,o};h.svg=function(n,i,f){for(var a,b,p,k,w,v,s,o,c,e=(r(t),i[0]),y=r(e.ownerSVGElement),l=e.ownerDocument,d=(parseInt(i.css("stroke-width"),10)||0)/2;!e.getBBox;)e=e.parentNode;if(!e.getBBox||!e.parentNode)return u;switch(e.nodeName){case"ellipse":case"circle":o=h.polys.ellipse(e.cx.baseVal.value,e.cy.baseVal.value,(e.rx||e.r).baseVal.value+d,(e.ry||e.r).baseVal.value+d,f);break;case"line":case"polygon":case"polyline":for(s=e.points||[{x:e.x1.baseVal.value,y:e.y1.baseVal.value},{x:e.x2.baseVal.value,y:e.y2.baseVal.value}],o=[],v=-1,k=s.numberOfItems||s.length;++v<k;)w=s.getItem?s.getItem(v):s[v],o.push.apply(o,[w.x,w.y]);o=h.polys.polygon(o,f);break;default:o=e.getBBox();o={width:o.width,height:o.height,position:{left:o.x,top:o.y}}}return c=o.position,y=y[0],y.createSVGPoint&&(b=e.getScreenCTM(),s=y.createSVGPoint(),s.x=c.left,s.y=c.top,p=s.matrixTransform(b),c.left=p.x,c.top=p.y),l!==t&&"mouse"!==n.position.target&&(a=r((l.defaultView||l.parentWindow).frameElement).offset(),a&&(c.left+=a.left,c.top+=a.top)),l=r(l),c.left+=l.scrollLeft(),c.top+=l.scrollTop(),o};ri="qtip-modal";nt="."+ri;g=function(){function l(n){if(r.expr[":"].focusable)return r.expr[":"].focusable;var t,i,u,e=!isNaN(r.attr(n,"tabindex")),f=n.nodeName&&n.nodeName.toLowerCase();return"area"===f?(t=n.parentNode,i=t.name,n.href&&i&&"map"===t.nodeName.toLowerCase()?(u=r("img[usemap=#"+i+"]")[0],!!u&&u.is(":visible")):!1):/input|select|textarea|button|object/.test(f)?!n.disabled:"a"===f?n.href||e:e}function h(n){o.length<1&&n.length?n.not("body").blur():o.first().focus()}function a(t){if(n.is(":visible")){var e,f=r(t.target),s=i.tooltip,c=f.closest(rt);e=c.length<1?u:parseInt(c[0].style.zIndex,10)>parseInt(s[0].style.zIndex,10);e||f.closest(rt)[0]===s[0]||h(f);v=t.target===o[o.length-1]}}var i,v,c,n,e=this,o={};r.extend(e,{init:function(){return n=e.elem=r("<div />",{id:"qtip-overlay",html:"<div><\/div>",mousedown:function(){return u}}).hide(),r(t.body).bind("focusin"+nt,a),r(t).bind("keydown"+nt,function(n){i&&i.options.show.modal.escape&&27===n.keyCode&&i.hide(n)}),n.bind("click"+nt,function(n){i&&i.options.show.modal.blur&&i.hide(n)}),e},update:function(n){i=n;o=n.options.show.modal.stealfocus!==u?n.tooltip.find("*").filter(function(){return l(this)}):[]},toggle:function(o,l,a){var p=(r(t.body),o.tooltip),v=o.options.show.modal,y=v.effect,w=l?"show":"hide",b=n.is(":visible"),k=r(nt).filter(":visible:not(:animated)").not(p);return e.update(o),l&&v.stealfocus!==u&&h(r(":focus")),n.toggleClass("blurs",v.blur),l&&n.appendTo(t.body),n.is(":animated")&&b===l&&c!==u||!l&&k.length?e:(n.stop(f,u),r.isFunction(y)?y.call(n,l):y===u?n[w]():n.fadeTo(parseInt(a,10)||90,l?1:0,function(){l||n.hide()}),l||n.queue(function(t){n.css({left:"",top:""});r(nt).length||n.detach();t()}),c=l,i.destroyed&&(i=s),e)}});e.init()};g=new g;r.extend(ki.prototype,{init:function(n){var t=n.tooltip;return this.options.on?(n.elements.overlay=g.elem,t.addClass(ri).css("z-index",c.modal_zindex+r(nt).length),n._bind(t,["tooltipshow","tooltiphide"],function(n,i,u){var f=n.originalEvent;if(n.target===t[0])if(f&&"tooltiphide"===n.type&&/mouse(leave|enter)/.test(f.type)&&r(f.relatedTarget).closest(g.elem[0]).length)try{n.preventDefault()}catch(e){}else(!f||f&&"tooltipsolo"!==f.type)&&this.toggle(n,"tooltipshow"===n.type,u)},this._ns,this),n._bind(t,"tooltipfocus",function(n,i){if(!n.isDefaultPrevented()&&n.target===t[0]){var u=r(nt),f=c.modal_zindex+u.length,e=parseInt(t[0].style.zIndex,10);g.elem[0].style.zIndex=f-1;u.each(function(){this.style.zIndex>e&&(this.style.zIndex-=1)});u.filter("."+st).qtip("blur",n.originalEvent);t.addClass(st)[0].style.zIndex=f;g.update(i);try{n.preventDefault()}catch(o){}}},this._ns,this),void n._bind(t,"tooltiphide",function(n){n.target===t[0]&&r(nt).filter(":visible").not(t).last().qtip("focus",n)},this._ns,this)):this},toggle:function(n,t,i){return n&&n.isDefaultPrevented()?this:void g.toggle(this.qtip,!!t,i)},destroy:function(){this.qtip.tooltip.removeClass(ri);this.qtip._unbind(this.qtip.tooltip,this._ns);g.toggle(this.qtip,u);delete this.qtip.elements.overlay}});ai=h.modal=function(n){return new ki(n,n.options.show.modal)};ai.sanitize=function(n){n.show&&("object"!=typeof n.show.modal?n.show.modal={on:!!n.show.modal}:"undefined"==typeof n.show.modal.on&&(n.show.modal.on=f))};c.modal_zindex=c.zindex-200;ai.initialize="render";dt.modal={"^show.modal.(on|blur)$":function(){this.destroy();this.init();this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}};r.extend(f,c.defaults,{show:{modal:{on:u,effect:f,blur:f,stealfocus:f,escape:f}}});or='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';"  style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"><\/iframe>';r.extend(di.prototype,{_scroll:function(){var t=this.qtip.elements.overlay;t&&(t[0].style.top=r(n).scrollTop()+"px")},init:function(i){var u=i.tooltip;r("select, object").length<1&&(this.bgiframe=i.elements.bgiframe=r(or).appendTo(u),i._bind(u,"tooltipmove",this.adjustBGIFrame,this._ns,this));this.redrawContainer=r("<div/>",{id:o+"-rcontainer"}).appendTo(t.body);i.elements.overlay&&i.elements.overlay.addClass("qtipmodal-ie6fix")&&(i._bind(n,["scroll","resize"],this._scroll,this._ns,this),i._bind(u,["tooltipshow"],this._scroll,this._ns,this));this.redraw()},adjustBGIFrame:function(){var t,n,i=this.qtip.tooltip,e={height:i.outerHeight(u),width:i.outerWidth(u)},r=this.qtip.plugins.tip,f=this.qtip.elements.tip;n=parseInt(i.css("borderLeftWidth"),10)||0;n={left:-n,top:-n};r&&f&&(t="x"===r.corner.precedance?[d,p]:[vt,b],n[t[1]]-=f[t[0]]());this.bgiframe.css(n).css(e)},redraw:function(){if(this.qtip.rendered<1||this.drawing)return this;var f,n,t,i,r=this.qtip.tooltip,u=this.qtip.options.style,e=this.qtip.options.position.container;return this.qtip.drawing=1,u.height&&r.css(vt,u.height),u.width?r.css(d,u.width):(r.css(d,"").appendTo(this.redrawContainer),n=r.width(),1>n%2&&(n+=1),t=r.css("maxWidth")||"",i=r.css("minWidth")||"",f=(t+i).indexOf("%")>-1?e.width()/100:0,t=(t.indexOf("%")>-1?f:1)*parseInt(t,10)||n,i=(i.indexOf("%")>-1?f:1)*parseInt(i,10)||0,n=t+i?Math.min(Math.max(n,i),t):n,r.css(d,Math.round(n)).appendTo(e)),this.drawing=0,this},destroy:function(){this.bgiframe&&this.bgiframe.remove();this.qtip._unbind([n,this.qtip.tooltip],this._ns)}});er=h.ie6=function(n){return 6===v.ie?new di(n):u};er.initialize="render";dt.ie6={"^content|style$":function(){this.redraw()}}})}(window,document),function(n){n.fn.EasyTree=function(t){var r=n('<div class="alert alert-warning alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;<\/button><strong><\/strong><span class="alert-content"><\/span> <\/div> '),u=n('<div class="alert alert-danger alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;<\/button><strong><\/strong><span class="alert-content"><\/span> <\/div> '),i=n('<div class="input-group"><input type="text" class="form-control"><span class="input-group-btn"><button type="button" class="btn btn-default btn-success confirm"><\/button> <\/span><span class="input-group-btn"><button type="button" class="btn btn-default cancel"><\/button> <\/span> <\/div> ');t=n.extend({selectable:!0,deletable:!1,editable:!1,addable:!1,i18n:{deleteNull:"Select a node to delete",deleteConfirmation:"Delete this node?",confirmButtonLabel:"Okay",editNull:"Select a node to edit",editMultiple:"Only one node can be edited at one time",addMultiple:"Select a node to add a new node",collapseTip:"collapse",expandTip:"expand",selectTip:"select",unselectTip:"unselet",editTip:"edit",addTip:"add",deleteTip:"delete",cancelButtonLabel:"cancle"}},t);this.each(function(){var f=n(this),e;n.each(n(f).find("ul > li"),function(){var t,i;n(this).is("li:has(ul)")?(i=n(this).find(" > ul"),n(i).remove(),t=n(this).text(),n(this).html('<span><span class="glyphicon"><\/span><a href="javascript: void(0);"><\/a> <\/span>'),n(this).find(" > span > span").addClass("glyphicon-folder-open"),n(this).find(" > span > a").text(t),n(this).append(i)):(t=n(this).text(),n(this).html('<span><span class="glyphicon"><\/span><a href="javascript: void(0);"><\/a> <\/span>'),n(this).find(" > span > span").addClass("glyphicon-file"),n(this).find(" > span > a").text(t))});n(f).find("li:has(ul)").addClass("parent_li").find(" > span").attr("title",t.i18n.collapseTip);(t.deletable||t.editable||t.addable)&&n(f).prepend('<div class="easy-tree-toolbar"><\/div> ');t.addable&&(n(f).find(".easy-tree-toolbar").append('<div class="create"><button class="btn btn-default btn-sm btn-success"><span class="glyphicon glyphicon-plus"><\/span><\/button><\/div> '),n(f).find(".easy-tree-toolbar .create > button").attr("title",t.i18n.addTip).click(function(){var u=n(f).find(".easy-tree-toolbar .create");n(u).append(i);n(i).find("input").focus();n(i).find(".confirm").text(t.i18n.confirmButtonLabel);n(i).find(".confirm").click(function(){if(n(i).find("input").val()!==""){var o=e(),u=n('<li><span><span class="glyphicon glyphicon-file"><\/span><a href="javascript: void(0);">'+n(i).find("input").val()+"<\/a> <\/span><\/li>");n(u).find(" > span > span").attr("title",t.i18n.collapseTip);n(u).find(" > span > a").attr("title",t.i18n.selectTip);o.length<=0?n(f).find(" > ul").append(n(u)):o.length>1?(n(f).prepend(r),n(f).find(".alert .alert-content").text(t.i18n.addMultiple)):n(o).hasClass("parent_li")?n(o).find(" > ul").append(u):(n(o).addClass("parent_li").find(" > span > span").addClass("glyphicon-folder-open").removeClass("glyphicon-file"),n(o).append(n("<ul><\/ul>")).find(" > ul").append(u));n(i).find("input").val("");t.selectable&&(n(u).find(" > span > a").attr("title",t.i18n.selectTip),n(u).find(" > span > a").click(function(i){var u=n(this).parent().parent(),r;u.hasClass("li_selected")?(n(this).attr("title",t.i18n.selectTip),n(u).removeClass("li_selected")):(n(f).find("li.li_selected").removeClass("li_selected"),n(this).attr("title",t.i18n.unselectTip),n(u).addClass("li_selected"));(t.deletable||t.editable||t.addable)&&(r=e(),t.editable&&(r.length<=0||r.length>1?n(f).find(".easy-tree-toolbar .edit > button").addClass("disabled"):n(f).find(".easy-tree-toolbar .edit > button").removeClass("disabled")),t.deletable&&(r.length<=0||r.length>1?n(f).find(".easy-tree-toolbar .remove > button").addClass("disabled"):n(f).find(".easy-tree-toolbar .remove > button").removeClass("disabled")));i.stopPropagation()}));n(i).remove()}});n(i).find(".cancel").text(t.i18n.cancelButtonLabel);n(i).find(".cancel").click(function(){n(i).remove()})}));t.editable&&(n(f).find(".easy-tree-toolbar").append('<div class="edit"><button class="btn btn-default btn-sm btn-primary disabled"><span class="glyphicon glyphicon-edit"><\/span><\/button><\/div> '),n(f).find(".easy-tree-toolbar .edit > button").attr("title",t.i18n.editTip).click(function(){var i,o,u;n(f).find("input.easy-tree-editor").remove();n(f).find("li > span > a:hidden").show();i=e();i.length<=0?(n(f).prepend(r),n(f).find(".alert .alert-content").html(t.i18n.editNull)):i.length>1?(n(f).prepend(r),n(f).find(".alert .alert-content").html(t.i18n.editMultiple)):(o=n(i).find(" > span > a").text(),n(i).find(" > span > a").hide(),n(i).find(" > span").append('<input type="text" class="easy-tree-editor">'),u=n(i).find(" > span > input.easy-tree-editor"),n(u).val(o),n(u).focus(),n(u).keydown(function(t){t.which==13&&n(u).val()!==""&&(n(i).find(" > span > a").text(n(u).val()),n(u).remove(),n(i).find(" > span > a").show())}))}));t.deletable&&(n(f).find(".easy-tree-toolbar").append('<div class="remove"><button class="btn btn-default btn-sm btn-danger disabled"><span class="glyphicon glyphicon-remove"><\/span><\/button><\/div> '),n(f).find(".easy-tree-toolbar .remove > button").attr("title",t.i18n.deleteTip).click(function(){var i=e();if(i.length<=0)n(f).prepend(r),n(f).find(".alert .alert-content").html(t.i18n.deleteNull);else{n(f).prepend(u);n(f).find(".alert .alert-content").html(t.i18n.deleteConfirmation).append('<a style="margin-left: 10px;" class="btn btn-default btn-danger confirm"><\/a>').find(".confirm").html(t.i18n.confirmButtonLabel);n(f).find(".alert .alert-content .confirm").on("click",function(){n(i).find(" ul ").remove();n(i).parent("ul").find(" > li").length<=1&&(n(i).parents("li").removeClass("parent_li").find(" > span > span").removeClass("glyphicon-folder-open").addClass("glyphicon-file"),n(i).parent("ul").remove());n(i).remove();n(u).remove()})}}));n(f).delegate("li.parent_li > span","click",function(i){var r=n(this).parent("li.parent_li").find(" > ul > li");r.is(":visible")?(r.hide("fast"),n(this).attr("title",t.i18n.expandTip).find(" > span.glyphicon").addClass("glyphicon-folder-close").removeClass("glyphicon-folder-open")):(r.show("fast"),n(this).attr("title",t.i18n.collapseTip).find(" > span.glyphicon").addClass("glyphicon-folder-open").removeClass("glyphicon-folder-close"));i.stopPropagation()});t.selectable&&(n(f).find("li > span > a").attr("title",t.i18n.selectTip),n(f).find("li > span > a").click(function(i){var u=n(this).parent().parent(),r;u.hasClass("li_selected")?(n(this).attr("title",t.i18n.selectTip),n(u).removeClass("li_selected")):(n(f).find("li.li_selected").removeClass("li_selected"),n(this).attr("title",t.i18n.unselectTip),n(u).addClass("li_selected"));(t.deletable||t.editable||t.addable)&&(r=e(),t.editable&&(r.length<=0||r.length>1?n(f).find(".easy-tree-toolbar .edit > button").addClass("disabled"):n(f).find(".easy-tree-toolbar .edit > button").removeClass("disabled")),t.deletable&&(r.length<=0||r.length>1?n(f).find(".easy-tree-toolbar .remove > button").addClass("disabled"):n(f).find(".easy-tree-toolbar .remove > button").removeClass("disabled")));i.stopPropagation()}));e=function(){return n(f).find("li.li_selected")}})}}(jQuery);!function(n,t){"object"==typeof module&&module.exports?module.exports=t():"function"==typeof define&&define.amd?define(t):n.Spinner=t()}(this,function(){"use strict";function i(n,t){var i,r=document.createElement(n||"div");for(i in t)r[i]=t[i];return r}function t(n){for(var t=1,i=arguments.length;i>t;t++)n.appendChild(arguments[t]);return n}function a(n,t,i,r){var e=["opacity",t,~~(100*n),i,r].join("-"),o=.01+i/r*100,s=Math.max(1-(1-n)/t*(100-o),n),h=u.substring(0,u.indexOf("Animation")).toLowerCase(),c=h&&"-"+h+"-"||"";return l[e]||(f.insertRule("@"+c+"keyframes "+e+"{0%{opacity:"+s+"}"+o+"%{opacity:"+n+"}"+(o+.01)+"%{opacity:1}"+(o+t)%100+"%{opacity:"+n+"}100%{opacity:"+s+"}}",f.cssRules.length),l[e]=1),e}function o(n,t){var r,i,u=n.style;if(t=t.charAt(0).toUpperCase()+t.slice(1),void 0!==u[t])return t;for(i=0;i<c.length;i++)if(r=c[i]+t,void 0!==u[r])return r}function n(n,t){for(var i in t)n.style[o(n,i)||i]=t[i];return n}function s(n){for(var r,i,t=1;t<arguments.length;t++){r=arguments[t];for(i in r)void 0===n[i]&&(n[i]=r[i])}return n}function h(n,t){return"string"==typeof n?n:n[t%n.length]}function r(n){this.opts=s(n||{},r.defaults,y)}function v(){function u(n,t){return i("<"+n+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',t)}f.addRule(".spin-vml","behavior:url(#default#VML)");r.prototype.lines=function(i,r){function s(){return n(u("group",{coordsize:o+" "+o,coordorigin:-e+" "+-e}),{width:o,height:o})}function c(i,f,o){t(a,t(n(s(),{rotation:360/r.lines*i+"deg",left:~~f}),t(n(u("roundrect",{arcsize:r.corners}),{width:e,height:r.scale*r.width,left:r.scale*r.radius,top:-r.scale*r.width>>1,filter:o}),u("fill",{color:h(r.color,i),opacity:r.opacity}),u("stroke",{opacity:0}))))}var f,e=r.scale*(r.length+r.width),o=2*r.scale*e,l=-(r.width+r.length)*r.scale*2+"px",a=n(s(),{position:"absolute",top:l,left:l});if(r.shadow)for(f=1;f<=r.lines;f++)c(f,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(f=1;f<=r.lines;f++)c(f);return t(i,a)};r.prototype.opacity=function(n,t,i,r){var u=n.firstChild;r=r.shadow&&r.lines||0;u&&t+r<u.childNodes.length&&(u=u.childNodes[t+r],u=u&&u.firstChild,u=u&&u.firstChild,u&&(u.opacity=i))}}var u,f,c=["webkit","Moz","ms","O"],l={},y={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",opacity:.25,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!1,position:"absolute"},e;return(r.defaults={},s(r.prototype,{spin:function(t){this.stop();var f=this,r=f.opts,e=f.el=i(null,{className:r.className});if(n(e,{position:r.position,width:0,zIndex:r.zIndex,left:r.left,top:r.top}),t&&t.insertBefore(e,t.firstChild||null),e.setAttribute("role","progressbar"),f.lines(e,f.opts),!u){var s,h=0,l=(r.lines-1)*(1-r.direction)/2,c=r.fps,o=c/r.speed,a=(1-r.opacity)/(o*r.trail/100),v=o/r.lines;!function y(){h++;for(var n=0;n<r.lines;n++)s=Math.max(1-(h+(r.lines-n)*v)%o*a,r.opacity),f.opacity(e,n*r.direction+l,s,r);f.timeout=f.el&&setTimeout(y,~~(1e3/c))}()}return f},stop:function(){var n=this.el;return n&&(clearTimeout(this.timeout),n.parentNode&&n.parentNode.removeChild(n),this.el=void 0),this},lines:function(r,f){function s(t,r){return n(i(),{position:"absolute",width:f.scale*(f.length+f.width)+"px",height:f.scale*f.width+"px",background:t,boxShadow:r,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*e+f.rotate)+"deg) translate("+f.scale*f.radius+"px,0)",borderRadius:(f.corners*f.scale*f.width>>1)+"px"})}for(var o,e=0,c=(f.lines-1)*(1-f.direction)/2;e<f.lines;e++)o=n(i(),{position:"absolute",top:1+~(f.scale*f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:u&&a(f.opacity,f.trail,c+e*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&t(o,n(s("#000","0 0 4px #000"),{top:"2px"})),t(r,t(o,s(h(f.color,e),"0 0 1px rgba(0,0,0,.1)")));return r},opacity:function(n,t,i){t<n.childNodes.length&&(n.childNodes[t].style.opacity=i)}}),"undefined"!=typeof document)&&(f=function(){var n=i("style",{type:"text/css"});return t(document.getElementsByTagName("head")[0],n),n.sheet||n.styleSheet}(),e=n(i("group"),{behavior:"url(#default#VML)"}),!o(e,"transform")&&e.adj?v():u=o(e,"animation")),r})