function getById(a){if(document.getElementById){return document.getElementById(a)}else{if(document.all){return document.all(a)}else{return null}}}var previousKeyPressed;function fnTrapKD(c,b){var d=getById(c);var a=null;if(b.keyCode){a=b.keyCode}else{if(b.which){a=b.which}}if(a==13&&previousKeyPressed!=38&&previousKeyPressed!=40){if(window.event){window.event.returnValue=false}else{if(b.cancelable){b.preventDefault()}if(!b.cancelBubble){b.stopPropagation()}}d.click();return false}else{previousKeyPressed=a}}function quickSearch(c,a,b){if(c.length>0&&c!=b){window.location.href=a.replace(/searchterm/,encodeURIComponent(c).replace(/%20/g,"+"))}return false}function MLquickSearch(c,b,a){return quickSearch(c,b,a)}function resetTextCommon(a,c){var b=getById(a);if(b&&(b.value==""||b.value==c)){b.value=c;b.style.color="#aaa"}}function clearTextCommon(a,c){var b=getById(a);if(b&&b.value==c){b.value="";b.style.color="black"}}var defaultSearchText="enter font name or key terms";$(function(){resetTextCommon("navSearchField",defaultSearchText);var a=$("#siteNav");if(a.length>0){a.superfish({animation:{opacity:"show",height:"show"}})}});function togglePopup(a,b,c,g){var f=$("#"+a);if(b!=null){var h=$(b).offset();var e=h.top-c;if(e<1){e=10}var d=h.left-g;if(d<1){d=10}f.css({top:e,left:d})}f.toggle()}function logError(b,c){if(document.createElement){var d="/services/service.ashx?method=logError&error="+escape(b.message)+"&where="+escape(c);var a=document.createElement("iframe");a.setAttribute("src",d);a.style.display="none";document.body.appendChild(a)}}function readCookie(a){var f=a+"=";var b=document.cookie.split(";");for(var e=0;e<b.length;e++){var d=b[e];while(d.charAt(0)==" "){d=d.substring(1,d.length)}if(d.indexOf(f)==0){return d.substring(f.length,d.length)}}return""}function createCookie(a,e,d){var c="";if(d){var b=new Date();b.setTime(b.getTime()+(d*24*60*60*1000));c="; expires="+b.toGMTString()}document.cookie=a+"="+e+c+"; path=/"}function changeQsValue(a,e,d){var c=window.location.href.replace(window.location.hash,"");if(c.indexOf(a+"=")>-1){var b=new RegExp(a+"=([^&#]*)","i");c=c.replace(b,a+"="+e)}else{if(c.indexOf("?")>-1){c=c+"&"+a+"="+e}else{c=c+"?"+a+"="+e}}if(d&&a!="pg"){c=c.replace(/&+pg=([^&#]*)/,"")}window.location.href=c;return false}function changeCur(a){return changeQsValue("cur",a,false)}function changeLang(a){return changeQsValue("lang",a,false)}var monotypeExternalLinks=function(){var c="fonts.com";var d="You are leaving the Fonts.com Web site. You may\nreturn to the Fonts.com Web site by closing\nthe window to the third-party Web site\nthat you have opened.\n\nDo you wish to continue?";var e=function(){if(window.addEventListener){return function(g,h,f){g.addEventListener(h,f,false)}}else{if(window.attachEvent){return function(h,i,g){var j=function(){g.call(h,window.event)};h.attachEvent("on"+i,j)}}else{return function(g,h,f){g["on"+h]=f}}}}();function b(f){if(!confirm(d)){if(f.preventDefault){f.preventDefault()}else{f.returnValue=false}return false}else{return true}}function a(){var f=new RegExp("^\\w+:\\/\\/(\\w+\\.)?(test)?"+c+"\\/");var h=new RegExp("^\\w+:\\/\\/"+window.location.hostname+"\\/");var g=document.getElementsByTagName("a");for(var j=0;j<g.length;j++){if(!f.test(g[j].href)&&!h.test(g[j].href)&&g[j].href.substring(0,7)!="mailto:"&&g[j].href.substring(0,11)!="javascript:"&&g[j].href.substring(0,14)!="http://msg2svc"){g[j].setAttribute("target","_blank");e(g[j],"click",b)}}}e(window,"load",a,false)}();(function(a){a.fn.hoverIntent=function(k,l){var c={sensitivity:7,interval:100,timeout:0};c=a.extend(c,l?{over:k,out:l}:k);var b,e,d,h;var m=function(f){b=f.pageX;e=f.pageY};var i=function(f,g){g.hoverIntent_t=clearTimeout(g.hoverIntent_t);if((Math.abs(d-b)+Math.abs(h-e))<c.sensitivity){a(g).unbind("mousemove",m);g.hoverIntent_s=1;return c.over.apply(g,[f])}else{d=b;h=e;g.hoverIntent_t=setTimeout(function(){i(f,g)},c.interval)}};var j=function(f,g){g.hoverIntent_t=clearTimeout(g.hoverIntent_t);g.hoverIntent_s=0;return c.out.apply(g,[f])};var n=function(o){var q=(o.type=="mouseover"?o.fromElement:o.toElement)||o.relatedTarget;while(q&&q!=this){try{q=q.parentNode}catch(o){q=this}}if(q==this){return false}var f=jQuery.extend({},o);var g=this;if(g.hoverIntent_t){g.hoverIntent_t=clearTimeout(g.hoverIntent_t)}if(o.type=="mouseover"){d=f.pageX;h=f.pageY;a(g).bind("mousemove",m);if(g.hoverIntent_s!=1){g.hoverIntent_t=setTimeout(function(){i(f,g)},c.interval)}}else{a(g).unbind("mousemove",m);if(g.hoverIntent_s==1){g.hoverIntent_t=setTimeout(function(){j(f,g)},c.timeout)}}};return this.mouseover(n).mouseout(n)}})(jQuery);(function(a){a.superfish={};a.superfish.o=[];a.superfish.op={};a.superfish.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",delay:800,animation:{opacity:"show"},speed:"normal",oldJquery:false,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};a.fn.superfish=function(e){var b="sfbreadcrumb",c=function(){var j=a(this),i=h(j);f(i,true);clearTimeout(i.sfTimer);j.showSuperfishUl().siblings().hideSuperfishUl()},d=function(){var k=a(this),j=h(k);var i=f(j,true);clearTimeout(j.sfTimer);if(!k.is("."+b)){j.sfTimer=setTimeout(function(){k.hideSuperfishUl();if(i.$path.length){c.call(i.$path)}},i.delay)}},h=function(i){return i.parents("ul.superfish:first")[0]},f=function(i,j){i=j?i:h(i);return a.superfish.op=a.superfish.o[i.serial]},g=function(){return a.superfish.op.oldJquery?"li[ul]":"li:has(ul)"};return this.each(function(){var i=this.serial=a.superfish.o.length;var j=a.extend({},a.superfish.defaults,e);j.$path=a("li."+j.pathClass,this).each(function(){a(this).addClass(j.hoverClass+" "+b).filter(g()).removeClass(j.pathClass)});a.superfish.o[i]=a.superfish.op=j;a(g(),this)[(a.fn.hoverIntent&&!j.disableHI)?"hoverIntent":"hover"](c,d).not("."+b).hideSuperfishUl();var k=a("a",this);k.each(function(m){var l=k.eq(m).parents("li");k.eq(m).focus(function(){c.call(l)}).blur(function(){d.call(l)})});j.onInit.call(this)}).addClass("superfish")};a.fn.extend({hideSuperfishUl:function(){var c=a.superfish.op,b=a("li."+c.hoverClass,this).add(this).removeClass(c.hoverClass).find(">ul").hide().css("visibility","hidden");c.onHide.call(b);return this},showSuperfishUl:function(){var c=a.superfish.op,b=this.addClass(c.hoverClass).find(">ul:hidden").css("visibility","visible");c.onBeforeShow.call(b);b.animate(c.animation,c.speed,function(){c.onShow.call(this)});return this}});a(window).unload(function(){a("ul.superfish").each(function(){a("li",this).unbind("mouseover","mouseout","mouseenter","mouseleave")})})})(jQuery);
/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.97 (14-FEB-2011)
 * Dual licensed under the MIT and GPL licenses.
 * http://jquery.malsup.com/license.html
 * Requires: jQuery v1.3.2 or later
 */
(function(e){var f="2.97";if(e.support==undefined){e.support={opacity:!(e.browser.msie)}}function d(r){e.fn.cycle.debug&&a(r)}function a(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}e.expr[":"].paused=function(r){return r.cyclePause};e.fn.cycle=function(s,r){var t={s:this.selector,c:this.context};if(this.length===0&&s!="stop"){if(!e.isReady&&t.s){a("DOM not ready, queuing slideshow");e(function(){e(t.s,t.c).cycle(s,r)});return this}a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var u=m(this,s,r);if(u===false){return}u.updateActivePagerLink=u.updateActivePagerLink||e.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=this.cyclePause=0;var v=e(this);var w=u.slideExpr?e(u.slideExpr,this):v.children();var z=w.get();if(z.length<2){a("terminating; too few slides: "+z.length);return}var x=b(v,w,z,u,t);if(x===false){return}var y=x.continuous?10:h(z[x.currSlide],z[x.nextSlide],x,!x.backwards);if(y){y+=(x.delay||0);if(y<10){y=10}d("first timeout: "+y);this.cycleTimeout=setTimeout(function(){n(z,x,0,!u.backwards)},y)}})};function m(t,u,s){if(t.cycleStop==undefined){t.cycleStop=0}if(u===undefined||u===null){u={}}if(u.constructor==String){switch(u){case"destroy":case"stop":var r=e(t).data("cycle.opts");if(!r){return false}t.cycleStop++;if(t.cycleTimeout){clearTimeout(t.cycleTimeout)}t.cycleTimeout=0;e(t).removeData("cycle.opts");if(u=="destroy"){o(r)}return false;case"toggle":t.cyclePause=(t.cyclePause===1)?0:1;v(t.cyclePause,s,t);return false;case"pause":t.cyclePause=1;return false;case"resume":t.cyclePause=0;v(false,s,t);return false;case"prev":case"next":var r=e(t).data("cycle.opts");if(!r){a('options not found, "prev/next" ignored');return false}e.fn.cycle[u](r);return false;default:u={fx:u}}return u}else{if(u.constructor==Number){var w=u;u=e(t).data("cycle.opts");if(!u){a("options not found, can not advance slide");return false}if(w<0||w>=u.elements.length){a("invalid slide index: "+w);return false}u.nextSlide=w;if(t.cycleTimeout){clearTimeout(t.cycleTimeout);t.cycleTimeout=0}if(typeof s=="string"){u.oneTimeFx=s}n(u.elements,u,1,w>=u.currSlide);return false}}return u;function v(A,x,y){if(!A&&x===true){var z=e(y).data("cycle.opts");if(!z){a("options not found, can not resume");return false}if(y.cycleTimeout){clearTimeout(y.cycleTimeout);y.cycleTimeout=0}n(z.elements,z,1,!z.backwards)}}}function q(s,r){if(!e.support.opacity&&r.cleartype&&s.style.filter){try{s.style.removeAttribute("filter")}catch(t){}}}function o(r){if(r.next){e(r.next).unbind(r.prevNextEvent)}if(r.prev){e(r.prev).unbind(r.prevNextEvent)}if(r.pager||r.pagerAnchorBuilder){e.each(r.pagerAnchors||[],function(){this.unbind().remove()})}r.pagerAnchors=null;if(r.destroy){r.destroy(r)}}function b(G,r,y,t,E){var F=e.extend({},e.fn.cycle.defaults,t||{},e.metadata?G.metadata():e.meta?G.data():{});if(F.autostop){F.countdown=F.autostopCount||y.length}var s=G[0];G.data("cycle.opts",F);F.$cont=G;F.stopCount=s.cycleStop;F.elements=y;F.before=F.before?[F.before]:[];F.after=F.after?[F.after]:[];if(!e.support.opacity&&F.cleartype){F.after.push(function(){q(this,F)})}if(F.continuous){F.after.push(function(){n(y,F,0,!F.backwards)})}i(F);if(!e.support.opacity&&F.cleartype&&!F.cleartypeNoBg){k(r)}if(G.css("position")=="static"){G.css("position","relative")}if(F.width){G.width(F.width)}if(F.height&&F.height!="auto"){G.height(F.height)}if(F.startingSlide){F.startingSlide=parseInt(F.startingSlide)}else{if(F.backwards){F.startingSlide=y.length-1}}if(F.random){F.randomMap=[];for(var B=0;B<y.length;B++){F.randomMap.push(B)}F.randomMap.sort(function(w,N){return Math.random()-0.5});F.randomIndex=1;F.startingSlide=F.randomMap[1]}else{if(F.startingSlide>=y.length){F.startingSlide=0}}F.currSlide=F.startingSlide||0;var x=F.startingSlide;r.css({position:"absolute",top:0,left:0}).hide().each(function(N){var w;if(F.backwards){w=x?N<=x?y.length+(N-x):x-N:y.length-N}else{w=x?N>=x?y.length-(N-x):x-N:y.length-N}e(this).css("z-index",w)});e(y[x]).css("opacity",1).show();q(y[x],F);if(F.fit&&F.width){r.width(F.width)}if(F.fit&&F.height&&F.height!="auto"){r.height(F.height)}var J=F.containerResize&&!G.innerHeight();if(J){var u=0,A=0;for(var C=0;C<y.length;C++){var H=e(y[C]),K=H[0],z=H.outerWidth(),D=H.outerHeight();if(!z){z=K.offsetWidth||K.width||H.attr("width")}if(!D){D=K.offsetHeight||K.height||H.attr("height")}u=z>u?z:u;A=D>A?D:A}if(u>0&&A>0){G.css({width:u+"px",height:A+"px"})}}if(F.pause){G.hover(function(){this.cyclePause++},function(){this.cyclePause--})}if(g(F)===false){return false}var M=false;t.requeueAttempts=t.requeueAttempts||0;r.each(function(){var N=e(this);this.cycleH=(F.fit&&F.height)?F.height:(N.height()||this.offsetHeight||this.height||N.attr("height")||0);this.cycleW=(F.fit&&F.width)?F.width:(N.width()||this.offsetWidth||this.width||N.attr("width")||0);if(N.is("img")){var P=(e.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var O=(e.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var w=(e.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var Q=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(P||O||w||Q){if(E.s&&F.requeueOnImageNotLoaded&&++t.requeueAttempts<100){a(t.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){e(E.s,E.c).cycle(t)},F.requeueTimeout);M=true;return false}else{a("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(M){return false}F.cssBefore=F.cssBefore||{};F.cssAfter=F.cssAfter||{};F.cssFirst=F.cssFirst||{};F.animIn=F.animIn||{};F.animOut=F.animOut||{};r.not(":eq("+x+")").css(F.cssBefore);e(r[x]).css(F.cssFirst);if(F.timeout){F.timeout=parseInt(F.timeout);if(F.speed.constructor==String){F.speed=e.fx.speeds[F.speed]||parseInt(F.speed)}if(!F.sync){F.speed=F.speed/2}var L=F.fx=="none"?0:F.fx=="shuffle"?500:250;while((F.timeout-F.speed)<L){F.timeout+=F.speed}}if(F.easing){F.easeIn=F.easeOut=F.easing}if(!F.speedIn){F.speedIn=F.speed}if(!F.speedOut){F.speedOut=F.speed}F.slideCount=y.length;F.currSlide=F.lastSlide=x;if(F.random){if(++F.randomIndex==y.length){F.randomIndex=0}F.nextSlide=F.randomMap[F.randomIndex]}else{if(F.backwards){F.nextSlide=F.startingSlide==0?(y.length-1):F.startingSlide-1}else{F.nextSlide=F.startingSlide>=(y.length-1)?0:F.startingSlide+1}}if(!F.multiFx){var I=e.fn.cycle.transitions[F.fx];if(e.isFunction(I)){I(G,r,F)}else{if(F.fx!="custom"&&!F.multiFx){a("unknown transition: "+F.fx,"; slideshow terminating");return false}}}var v=r[x];if(F.before.length){F.before[0].apply(v,[v,v,F,true])}if(F.after.length>1){F.after[1].apply(v,[v,v,F,true])}if(F.next){e(F.next).bind(F.prevNextEvent,function(){return c(F,1)})}if(F.prev){e(F.prev).bind(F.prevNextEvent,function(){return c(F,0)})}if(F.pager||F.pagerAnchorBuilder){j(y,F)}l(F,y);return F}function i(r){r.original={before:[],after:[]};r.original.cssBefore=e.extend({},r.cssBefore);r.original.cssAfter=e.extend({},r.cssAfter);r.original.animIn=e.extend({},r.animIn);r.original.animOut=e.extend({},r.animOut);e.each(r.before,function(){r.original.before.push(this)});e.each(r.after,function(){r.original.after.push(this)})}function g(r){var v,t,s=e.fn.cycle.transitions;if(r.fx.indexOf(",")>0){r.multiFx=true;r.fxs=r.fx.replace(/\s*/g,"").split(",");for(v=0;v<r.fxs.length;v++){var x=r.fxs[v];t=s[x];if(!t||!s.hasOwnProperty(x)||!e.isFunction(t)){a("discarding unknown transition: ",x);r.fxs.splice(v,1);v--}}if(!r.fxs.length){a("No valid transitions named; slideshow terminating.");return false}}else{if(r.fx=="all"){r.multiFx=true;r.fxs=[];for(p in s){t=s[p];if(s.hasOwnProperty(p)&&e.isFunction(t)){r.fxs.push(p)}}}}if(r.multiFx&&r.randomizeEffects){var u=Math.floor(Math.random()*20)+30;for(v=0;v<u;v++){var w=Math.floor(Math.random()*r.fxs.length);r.fxs.push(r.fxs.splice(w,1)[0])}d("randomized fx sequence: ",r.fxs)}return true}function l(r,s){r.addSlide=function(w,v){var u=e(w),t=u[0];if(!r.autostopCount){r.countdown++}s[v?"unshift":"push"](t);if(r.els){r.els[v?"unshift":"push"](t)}r.slideCount=s.length;u.css("position","absolute");u[v?"prependTo":"appendTo"](r.$cont);if(v){r.currSlide++;r.nextSlide++}if(!e.support.opacity&&r.cleartype&&!r.cleartypeNoBg){k(u)}if(r.fit&&r.width){u.width(r.width)}if(r.fit&&r.height&&r.height!="auto"){u.height(r.height)}t.cycleH=(r.fit&&r.height)?r.height:u.height();t.cycleW=(r.fit&&r.width)?r.width:u.width();u.css(r.cssBefore);if(r.pager||r.pagerAnchorBuilder){e.fn.cycle.createPagerAnchor(s.length-1,t,e(r.pager),s,r)}if(e.isFunction(r.onAddSlide)){r.onAddSlide(u)}else{u.hide()}}}e.fn.cycle.resetState=function(r,t){t=t||r.fx;r.before=[];r.after=[];r.cssBefore=e.extend({},r.original.cssBefore);r.cssAfter=e.extend({},r.original.cssAfter);r.animIn=e.extend({},r.original.animIn);r.animOut=e.extend({},r.original.animOut);r.fxFn=null;e.each(r.original.before,function(){r.before.push(this)});e.each(r.original.after,function(){r.after.push(this)});var s=e.fn.cycle.transitions[t];if(e.isFunction(s)){s(r.$cont,e(r.elements),r)}};function n(t,C,B,x){if(B&&C.busy&&C.manualTrump){d("manualTrump in go(), stopping active transition");e(t).stop(true,true);C.busy=0}if(C.busy){d("transition active, ignoring new tx request");return}var z=C.$cont[0],A=t[C.currSlide],r=t[C.nextSlide];if(z.cycleStop!=C.stopCount||z.cycleTimeout===0&&!B){return}if(!B&&!z.cyclePause&&!C.bounce&&((C.autostop&&(--C.countdown<=0))||(C.nowrap&&!C.random&&C.nextSlide<C.currSlide))){if(C.end){C.end(C)}return}var w=false;if((B||!z.cyclePause)&&(C.nextSlide!=C.currSlide)){w=true;var u=C.fx;A.cycleH=A.cycleH||e(A).height();A.cycleW=A.cycleW||e(A).width();r.cycleH=r.cycleH||e(r).height();r.cycleW=r.cycleW||e(r).width();if(C.multiFx){if(C.lastFx==undefined||++C.lastFx>=C.fxs.length){C.lastFx=0}u=C.fxs[C.lastFx];C.currFx=u}if(C.oneTimeFx){u=C.oneTimeFx;C.oneTimeFx=null}e.fn.cycle.resetState(C,u);if(C.before.length){e.each(C.before,function(E,D){if(z.cycleStop!=C.stopCount){return}D.apply(r,[A,r,C,x])})}var s=function(){C.busy=0;e.each(C.after,function(E,D){if(z.cycleStop!=C.stopCount){return}D.apply(r,[A,r,C,x])})};d("tx firing("+u+"); currSlide: "+C.currSlide+"; nextSlide: "+C.nextSlide);C.busy=1;if(C.fxFn){C.fxFn(A,r,C,s,x,B&&C.fastOnEvent)}else{if(e.isFunction(e.fn.cycle[C.fx])){e.fn.cycle[C.fx](A,r,C,s,x,B&&C.fastOnEvent)}else{e.fn.cycle.custom(A,r,C,s,x,B&&C.fastOnEvent)}}}if(w||C.nextSlide==C.currSlide){C.lastSlide=C.currSlide;if(C.random){C.currSlide=C.nextSlide;if(++C.randomIndex==t.length){C.randomIndex=0}C.nextSlide=C.randomMap[C.randomIndex];if(C.nextSlide==C.currSlide){C.nextSlide=(C.currSlide==C.slideCount-1)?0:C.currSlide+1}}else{if(C.backwards){var v=(C.nextSlide-1)<0;if(v&&C.bounce){C.backwards=!C.backwards;C.nextSlide=1;C.currSlide=0}else{C.nextSlide=v?(t.length-1):C.nextSlide-1;C.currSlide=v?0:C.nextSlide+1}}else{var v=(C.nextSlide+1)==t.length;if(v&&C.bounce){C.backwards=!C.backwards;C.nextSlide=t.length-2;C.currSlide=t.length-1}else{C.nextSlide=v?0:C.nextSlide+1;C.currSlide=v?t.length-1:C.nextSlide-1}}}}if(w&&C.pager){C.updateActivePagerLink(C.pager,C.currSlide,C.activePagerClass)}var y=0;if(C.timeout&&!C.continuous){y=h(t[C.currSlide],t[C.nextSlide],C,x)}else{if(C.continuous&&z.cyclePause){y=10}}if(y>0){z.cycleTimeout=setTimeout(function(){n(t,C,0,!C.backwards)},y)}}e.fn.cycle.updateActivePagerLink=function(t,r,s){e(t).each(function(){e(this).children().removeClass(s).eq(r).addClass(s)})};function h(u,v,r,w){if(r.timeoutFn){var s=r.timeoutFn.call(u,u,v,r,w);while(r.fx!="none"&&(s-r.speed)<250){s+=r.speed}d("calculated timeout: "+s+"; speed: "+r.speed);if(s!==false){return s}}return r.timeout}e.fn.cycle.next=function(r){c(r,1)};e.fn.cycle.prev=function(r){c(r,0)};function c(r,s){var w=s?1:-1;var x=r.elements;var t=r.$cont[0],u=t.cycleTimeout;if(u){clearTimeout(u);t.cycleTimeout=0}if(r.random&&w<0){r.randomIndex--;if(--r.randomIndex==-2){r.randomIndex=x.length-2}else{if(r.randomIndex==-1){r.randomIndex=x.length-1}}r.nextSlide=r.randomMap[r.randomIndex]}else{if(r.random){r.nextSlide=r.randomMap[r.randomIndex]}else{r.nextSlide=r.currSlide+w;if(r.nextSlide<0){if(r.nowrap){return false}r.nextSlide=x.length-1}else{if(r.nextSlide>=x.length){if(r.nowrap){return false}r.nextSlide=0}}}}var v=r.onPrevNextEvent||r.prevNextClick;if(e.isFunction(v)){v(w>0,r.nextSlide,x[r.nextSlide])}n(x,r,1,s);return false}function j(t,r){var s=e(r.pager);e.each(t,function(v,u){e.fn.cycle.createPagerAnchor(v,u,s,t,r)});r.updateActivePagerLink(r.pager,r.startingSlide,r.activePagerClass)}e.fn.cycle.createPagerAnchor=function(r,v,w,t,y){var u;if(e.isFunction(y.pagerAnchorBuilder)){u=y.pagerAnchorBuilder(r,v);d("pagerAnchorBuilder("+r+", el) returned: "+u)}else{u='<a href="#">'+(r+1)+"</a>"}if(!u){return}var s=e(u);if(s.parents("body").length===0){var x=[];if(w.length>1){w.each(function(){var z=s.clone(true);e(this).append(z);x.push(z[0])});s=e(x)}else{s.appendTo(w)}}y.pagerAnchors=y.pagerAnchors||[];y.pagerAnchors.push(s);s.bind(y.pagerEvent,function(B){B.preventDefault();y.nextSlide=r;var C=y.$cont[0],A=C.cycleTimeout;if(A){clearTimeout(A);C.cycleTimeout=0}var z=y.onPagerEvent||y.pagerClick;if(e.isFunction(z)){z(y.nextSlide,t[y.nextSlide])}n(t,y,1,y.currSlide<r)});if(!/^click/.test(y.pagerEvent)&&!y.allowPagerClickBubble){s.bind("click.cycle",function(){return false})}if(y.pauseOnPagerHover){s.hover(function(){y.$cont[0].cyclePause++},function(){y.$cont[0].cyclePause--})}};e.fn.cycle.hopsFromLast=function(r,v){var u,t=r.lastSlide,s=r.currSlide;if(v){u=s>t?s-t:r.slideCount-t}else{u=s<t?t-s:t+r.slideCount-s}return u};function k(r){d("applying clearType background-color hack");function s(u){u=parseInt(u).toString(16);return u.length<2?"0"+u:u}function t(x){for(;x&&x.nodeName.toLowerCase()!="html";x=x.parentNode){var u=e.css(x,"background-color");if(u.indexOf("rgb")>=0){var w=u.match(/\d+/g);return"#"+s(w[0])+s(w[1])+s(w[2])}if(u&&u!="transparent"){return u}}return"#ffffff"}r.each(function(){e(this).css("background-color",t(this))})}e.fn.cycle.commonReset=function(s,x,r,t,u,v){e(r.elements).not(s).hide();if(typeof r.cssBefore.opacity=="undefined"){r.cssBefore.opacity=1}r.cssBefore.display="block";if(r.slideResize&&t!==false&&x.cycleW>0){r.cssBefore.width=x.cycleW}if(r.slideResize&&u!==false&&x.cycleH>0){r.cssBefore.height=x.cycleH}r.cssAfter=r.cssAfter||{};r.cssAfter.display="none";e(s).css("zIndex",r.slideCount+(v===true?1:0));e(x).css("zIndex",r.slideCount+(v===true?0:1))};e.fn.cycle.custom=function(x,r,D,y,w,t){var A=e(x),z=e(r);var s=D.speedIn,v=D.speedOut,C=D.easeIn,B=D.easeOut;z.css(D.cssBefore);if(t){if(typeof t=="number"){s=v=t}else{s=v=1}C=B=null}var u=function(){z.animate(D.animIn,s,C,function(){y()})};A.animate(D.animOut,v,B,function(){A.css(D.cssAfter);if(!D.sync){u()}});if(D.sync){u()}};e.fn.cycle.transitions={fade:function(s,t,r){t.not(":eq("+r.currSlide+")").css("opacity",0);r.before.push(function(v,w,u){e.fn.cycle.commonReset(v,w,u);u.cssBefore.opacity=0});r.animIn={opacity:1};r.animOut={opacity:0};r.cssBefore={top:0,left:0}}};e.fn.cycle.ver=function(){return f};e.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animOut:null,autostop:0,autostopCount:0,backwards:false,before:null,cleartype:!e.support.opacity,cleartypeNoBg:false,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null,slideExpr:null,slideResize:1,speed:1000,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4000,timeoutFn:null,updateActivePagerLink:null}})(jQuery);
/*
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version:	 2.73
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function(a){a.fn.cycle.transitions.none=function(c,d,b){b.fxFn=function(g,h,e,f){a(h).show();a(g).hide();f()}};a.fn.cycle.transitions.fadeout=function(c,d,b){d.not(":eq("+b.currSlide+")").css({display:"block",opacity:1});b.before.push(function(f,k,e,g,i,j){a(f).css("zIndex",e.slideCount+(!j===true?1:0));a(k).css("zIndex",e.slideCount+(!j===true?0:1))});b.animIn.opacity=1;b.animOut.opacity=0;b.cssBefore.opacity=1;b.cssBefore.display="block";b.cssAfter.zIndex=0};a.fn.cycle.transitions.scrollUp=function(c,d,b){c.css("overflow","hidden");b.before.push(a.fn.cycle.commonReset);var e=c.height();b.cssBefore.top=e;b.cssBefore.left=0;b.cssFirst.top=0;b.animIn.top=0;b.animOut.top=-e};a.fn.cycle.transitions.scrollDown=function(c,d,b){c.css("overflow","hidden");b.before.push(a.fn.cycle.commonReset);var e=c.height();b.cssFirst.top=0;b.cssBefore.top=-e;b.cssBefore.left=0;b.animIn.top=0;b.animOut.top=e};a.fn.cycle.transitions.scrollLeft=function(c,d,b){c.css("overflow","hidden");b.before.push(a.fn.cycle.commonReset);var e=c.width();b.cssFirst.left=0;b.cssBefore.left=e;b.cssBefore.top=0;b.animIn.left=0;b.animOut.left=0-e};a.fn.cycle.transitions.scrollRight=function(c,d,b){c.css("overflow","hidden");b.before.push(a.fn.cycle.commonReset);var e=c.width();b.cssFirst.left=0;b.cssBefore.left=-e;b.cssBefore.top=0;b.animIn.left=0;b.animOut.left=e};a.fn.cycle.transitions.scrollHorz=function(c,d,b){c.css("overflow","hidden").width();b.before.push(function(f,g,e,h){if(e.rev){h=!h}a.fn.cycle.commonReset(f,g,e);e.cssBefore.left=h?(g.cycleW-1):(1-g.cycleW);e.animOut.left=h?-f.cycleW:f.cycleW});b.cssFirst.left=0;b.cssBefore.top=0;b.animIn.left=0;b.animOut.top=0};a.fn.cycle.transitions.scrollVert=function(c,d,b){c.css("overflow","hidden");b.before.push(function(f,g,e,h){if(e.rev){h=!h}a.fn.cycle.commonReset(f,g,e);e.cssBefore.top=h?(1-g.cycleH):(g.cycleH-1);e.animOut.top=h?f.cycleH:-f.cycleH});b.cssFirst.top=0;b.cssBefore.left=0;b.animIn.top=0;b.animOut.left=0};a.fn.cycle.transitions.slideX=function(c,d,b){b.before.push(function(f,g,e){a(e.elements).not(f).hide();a.fn.cycle.commonReset(f,g,e,false,true);e.animIn.width=g.cycleW});b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.width=0;b.animIn.width="show";b.animOut.width=0};a.fn.cycle.transitions.slideY=function(c,d,b){b.before.push(function(f,g,e){a(e.elements).not(f).hide();a.fn.cycle.commonReset(f,g,e,true,false);e.animIn.height=g.cycleH});b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.height=0;b.animIn.height="show";b.animOut.height=0};a.fn.cycle.transitions.shuffle=function(c,d,b){var f,e=c.css("overflow","visible").width();d.css({left:0,top:0});b.before.push(function(h,i,g){a.fn.cycle.commonReset(h,i,g,true,true,true)});if(!b.speedAdjusted){b.speed=b.speed/2;b.speedAdjusted=true}b.random=0;b.shuffle=b.shuffle||{left:-e,top:15};b.els=[];for(f=0;f<d.length;f++){b.els.push(d[f])}for(f=0;f<b.currSlide;f++){b.els.push(b.els.shift())}b.fxFn=function(i,l,g,k,m){if(g.rev){m=!m}var h=m?a(i):a(l);a(l).css(g.cssBefore);var j=g.slideCount;h.animate(g.shuffle,g.speedIn,g.easeIn,function(){var r=a.fn.cycle.hopsFromLast(g,m);for(var s=0;s<r;s++){m?g.els.push(g.els.shift()):g.els.unshift(g.els.pop())}if(m){for(var q=0,n=g.els.length;q<n;q++){a(g.els[q]).css("z-index",n-q+j)}}else{var o=a(i).css("z-index");h.css("z-index",parseInt(o)+1+j)}h.animate({left:0,top:0},g.speedOut,g.easeOut,function(){a(m?this:i).hide();if(k){k()}})})};a.extend(b.cssBefore,{display:"block",opacity:1,top:0,left:0})};a.fn.cycle.transitions.turnUp=function(c,d,b){b.before.push(function(f,g,e){a.fn.cycle.commonReset(f,g,e,true,false);e.cssBefore.top=g.cycleH;e.animIn.height=g.cycleH;e.animOut.width=g.cycleW});b.cssFirst.top=0;b.cssBefore.left=0;b.cssBefore.height=0;b.animIn.top=0;b.animOut.height=0};a.fn.cycle.transitions.turnDown=function(c,d,b){b.before.push(function(f,g,e){a.fn.cycle.commonReset(f,g,e,true,false);e.animIn.height=g.cycleH;e.animOut.top=f.cycleH});b.cssFirst.top=0;b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.height=0;b.animOut.height=0};a.fn.cycle.transitions.turnLeft=function(c,d,b){b.before.push(function(f,g,e){a.fn.cycle.commonReset(f,g,e,false,true);e.cssBefore.left=g.cycleW;e.animIn.width=g.cycleW});b.cssBefore.top=0;b.cssBefore.width=0;b.animIn.left=0;b.animOut.width=0};a.fn.cycle.transitions.turnRight=function(c,d,b){b.before.push(function(f,g,e){a.fn.cycle.commonReset(f,g,e,false,true);e.animIn.width=g.cycleW;e.animOut.left=f.cycleW});a.extend(b.cssBefore,{top:0,left:0,width:0});b.animIn.left=0;b.animOut.width=0};a.fn.cycle.transitions.zoom=function(c,d,b){b.before.push(function(f,g,e){a.fn.cycle.commonReset(f,g,e,false,false,true);e.cssBefore.top=g.cycleH/2;e.cssBefore.left=g.cycleW/2;a.extend(e.animIn,{top:0,left:0,width:g.cycleW,height:g.cycleH});a.extend(e.animOut,{width:0,height:0,top:f.cycleH/2,left:f.cycleW/2})});b.cssFirst.top=0;b.cssFirst.left=0;b.cssBefore.width=0;b.cssBefore.height=0};a.fn.cycle.transitions.fadeZoom=function(c,d,b){b.before.push(function(f,g,e){a.fn.cycle.commonReset(f,g,e,false,false);e.cssBefore.left=g.cycleW/2;e.cssBefore.top=g.cycleH/2;a.extend(e.animIn,{top:0,left:0,width:g.cycleW,height:g.cycleH})});b.cssBefore.width=0;b.cssBefore.height=0;b.animOut.opacity=0};a.fn.cycle.transitions.blindX=function(c,d,b){var e=c.css("overflow","hidden").width();b.before.push(function(g,h,f){a.fn.cycle.commonReset(g,h,f);f.animIn.width=h.cycleW;f.animOut.left=g.cycleW});b.cssBefore.left=e;b.cssBefore.top=0;b.animIn.left=0;b.animOut.left=e};a.fn.cycle.transitions.blindY=function(c,d,b){var e=c.css("overflow","hidden").height();b.before.push(function(g,h,f){a.fn.cycle.commonReset(g,h,f);f.animIn.height=h.cycleH;f.animOut.top=g.cycleH});b.cssBefore.top=e;b.cssBefore.left=0;b.animIn.top=0;b.animOut.top=e};a.fn.cycle.transitions.blindZ=function(c,d,b){var f=c.css("overflow","hidden").height();var e=c.width();b.before.push(function(h,i,g){a.fn.cycle.commonReset(h,i,g);g.animIn.height=i.cycleH;g.animOut.top=h.cycleH});b.cssBefore.top=f;b.cssBefore.left=e;b.animIn.top=0;b.animIn.left=0;b.animOut.top=f;b.animOut.left=e};a.fn.cycle.transitions.growX=function(c,d,b){b.before.push(function(f,g,e){a.fn.cycle.commonReset(f,g,e,false,true);e.cssBefore.left=this.cycleW/2;e.animIn.left=0;e.animIn.width=this.cycleW;e.animOut.left=0});b.cssBefore.top=0;b.cssBefore.width=0};a.fn.cycle.transitions.growY=function(c,d,b){b.before.push(function(f,g,e){a.fn.cycle.commonReset(f,g,e,true,false);e.cssBefore.top=this.cycleH/2;e.animIn.top=0;e.animIn.height=this.cycleH;e.animOut.top=0});b.cssBefore.height=0;b.cssBefore.left=0};a.fn.cycle.transitions.curtainX=function(c,d,b){b.before.push(function(f,g,e){a.fn.cycle.commonReset(f,g,e,false,true,true);e.cssBefore.left=g.cycleW/2;e.animIn.left=0;e.animIn.width=this.cycleW;e.animOut.left=f.cycleW/2;e.animOut.width=0});b.cssBefore.top=0;b.cssBefore.width=0};a.fn.cycle.transitions.curtainY=function(c,d,b){b.before.push(function(f,g,e){a.fn.cycle.commonReset(f,g,e,true,false,true);e.cssBefore.top=g.cycleH/2;e.animIn.top=0;e.animIn.height=g.cycleH;e.animOut.top=f.cycleH/2;e.animOut.height=0});b.cssBefore.height=0;b.cssBefore.left=0};a.fn.cycle.transitions.cover=function(c,e,b){var i=b.direction||"left";var f=c.css("overflow","hidden").width();var g=c.height();b.before.push(function(h,j,d){a.fn.cycle.commonReset(h,j,d);if(i=="right"){d.cssBefore.left=-f}else{if(i=="up"){d.cssBefore.top=g}else{if(i=="down"){d.cssBefore.top=-g}else{d.cssBefore.left=f}}}});b.animIn.left=0;b.animIn.top=0;b.cssBefore.top=0;b.cssBefore.left=0};a.fn.cycle.transitions.uncover=function(c,e,b){var i=b.direction||"left";var f=c.css("overflow","hidden").width();var g=c.height();b.before.push(function(h,j,d){a.fn.cycle.commonReset(h,j,d,true,true,true);if(i=="right"){d.animOut.left=f}else{if(i=="up"){d.animOut.top=-g}else{if(i=="down"){d.animOut.top=g}else{d.animOut.left=-f}}}});b.animIn.left=0;b.animIn.top=0;b.cssBefore.top=0;b.cssBefore.left=0};a.fn.cycle.transitions.toss=function(c,d,b){var e=c.css("overflow","visible").width();var f=c.height();b.before.push(function(h,i,g){a.fn.cycle.commonReset(h,i,g,true,true,true);if(!g.animOut.left&&!g.animOut.top){a.extend(g.animOut,{left:e*2,top:-f/2,opacity:0})}else{g.animOut.opacity=0}});b.cssBefore.left=0;b.cssBefore.top=0;b.animIn.left=0};a.fn.cycle.transitions.wipe=function(c,g,k){var s=c.css("overflow","hidden").width();var u=c.height();k.cssBefore=k.cssBefore||{};var q;if(k.clip){if(/l2r/.test(k.clip)){q="rect(0px 0px "+u+"px 0px)"}else{if(/r2l/.test(k.clip)){q="rect(0px "+s+"px "+u+"px "+s+"px)"}else{if(/t2b/.test(k.clip)){q="rect(0px "+s+"px 0px 0px)"}else{if(/b2t/.test(k.clip)){q="rect("+u+"px "+s+"px "+u+"px 0px)"}else{if(/zoom/.test(k.clip)){var e=parseInt(u/2);var f=parseInt(s/2);q="rect("+e+"px "+f+"px "+e+"px "+f+"px)"}}}}}}k.cssBefore.clip=k.cssBefore.clip||q||"rect(0px 0px 0px 0px)";var j=k.cssBefore.clip.match(/(\d+)/g);var o=parseInt(j[0]),n=parseInt(j[1]),i=parseInt(j[2]),m=parseInt(j[3]);k.before.push(function(l,b,w){if(l==b){return}var r=a(l),d=a(b);a.fn.cycle.commonReset(l,b,w,true,true,false);w.cssAfter.display="block";var t=1,v=parseInt((w.speedIn/13))-1;(function h(){var x=o?o-parseInt(t*(o/v)):0;var z=m?m-parseInt(t*(m/v)):0;var A=i<u?i+parseInt(t*((u-i)/v||1)):u;var y=n<s?n+parseInt(t*((s-n)/v||1)):s;d.css({clip:"rect("+x+"px "+y+"px "+A+"px "+z+"px)"});(t++<=v)?setTimeout(h,13):r.css("display","none")})()});a.extend(k.cssBefore,{display:"block",opacity:1,top:0,left:0});k.animIn={left:0};k.animOut={left:0}}})(jQuery);
/*
 * jQuery UI 1.8.13
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
(function(a,b){function d(c,f){var g=c.nodeName.toLowerCase();if("area"===g){f=c.parentNode;g=f.name;if(!c.href||!g||f.nodeName.toLowerCase()!=="map"){return false}c=a("img[usemap=#"+g+"]")[0];return !!c&&e(c)}return(/input|select|textarea|button|object/.test(g)?!c.disabled:"a"==g?c.href||f:f)&&e(c)}function e(c){return !a(c).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(!a.ui.version){a.extend(a.ui,{version:"1.8.13",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({_focus:a.fn.focus,focus:function(c,f){return typeof c==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();f&&f.call(g)},c)}):this._focus.apply(this,arguments)},scrollParent:function(){var c;c=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?a(document):c},zIndex:function(c){if(c!==b){return this.css("zIndex",c)}if(this.length){c=a(this[0]);for(var f;c.length&&c[0]!==document;){f=c.css("position");if(f==="absolute"||f==="relative"||f==="fixed"){f=parseInt(c.css("zIndex"),10);if(!isNaN(f)&&f!==0){return f}}c=c.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(c){c.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(f,g){function k(o,q,h,i){a.each(l,function(){q-=parseFloat(a.curCSS(o,"padding"+this,true))||0;if(h){q-=parseFloat(a.curCSS(o,"border"+this+"Width",true))||0}if(i){q-=parseFloat(a.curCSS(o,"margin"+this,true))||0}});return q}var l=g==="Width"?["Left","Right"]:["Top","Bottom"],j=g.toLowerCase(),c={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+g]=function(h){if(h===b){return c["inner"+g].call(this)}return this.each(function(){a(this).css(j,k(this,h)+"px")})};a.fn["outer"+g]=function(h,i){if(typeof h!=="number"){return c["outer"+g].call(this,h)}return this.each(function(){a(this).css(j,k(this,h,true,i)+"px")})}});a.extend(a.expr[":"],{data:function(c,f,g){return !!a.data(c,g[3])},focusable:function(c){return d(c,!isNaN(a.attr(c,"tabindex")))},tabbable:function(c){var f=a.attr(c,"tabindex"),g=isNaN(f);return(g||f>=0)&&d(c,!g)}});a(function(){var c=document.body,f=c.appendChild(f=document.createElement("div"));a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;c.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(c,f,g){c=a.ui[c].prototype;for(var h in g){c.plugins[h]=c.plugins[h]||[];c.plugins[h].push([f,g[h]])}},call:function(c,f,g){if((f=c.plugins[f])&&c.element[0].parentNode){for(var h=0;h<f.length;h++){c.options[f[h][0]]&&f[h][1].apply(c.element,g)}}}},contains:function(c,f){return document.compareDocumentPosition?c.compareDocumentPosition(f)&16:c!==f&&c.contains(f)},hasScroll:function(c,f){if(a(c).css("overflow")==="hidden"){return false}f=f&&f==="left"?"scrollLeft":"scrollTop";var g=false;if(c[f]>0){return true}c[f]=1;g=c[f]>0;c[f]=0;return g},isOverAxis:function(c,f,g){return c>f&&c<f+g},isOver:function(f,g,k,l,j,c){return a.ui.isOverAxis(f,k,j)&&a.ui.isOverAxis(g,l,c)}})}})(jQuery);
/*
 * jQuery UI Widget 1.8.13
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Widget
 */
(function(a,c){if(a.cleanData){var d=a.cleanData;a.cleanData=function(b){for(var f=0,g;(g=b[f])!=null;f++){a(g).triggerHandler("remove")}d(b)}}else{var e=a.fn.remove;a.fn.remove=function(b,f){return this.each(function(){if(!f){if(!b||a.filter(b,[this]).length){a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")})}}return e.call(a(this),b,f)})}}a.widget=function(b,g,h){var i=b.split(".")[0],j;b=b.split(".")[1];j=i+"-"+b;if(!h){h=g;g=a.Widget}a.expr[":"][j]=function(f){return !!a.data(f,b)};a[i]=a[i]||{};a[i][b]=function(f,k){arguments.length&&this._createWidget(f,k)};g=new g;g.options=a.extend(true,{},g.options);a[i][b].prototype=a.extend(true,g,{namespace:i,widgetName:b,widgetEventPrefix:a[i][b].prototype.widgetEventPrefix||b,widgetBaseClass:j},h);a.widget.bridge(b,a[i][b])};a.widget.bridge=function(b,f){a.fn[b]=function(i){var j=typeof i==="string",k=Array.prototype.slice.call(arguments,1),g=this;i=!j&&k.length?a.extend.apply(null,[true,i].concat(k)):i;if(j&&i.charAt(0)==="_"){return g}j?this.each(function(){var l=a.data(this,b),h=l&&a.isFunction(l[i])?l[i].apply(l,k):l;if(h!==l&&h!==c){g=h;return false}}):this.each(function(){var h=a.data(this,b);h?h.option(i||{})._init():a.data(this,b,new f(i,this))});return g}};a.Widget=function(b,f){arguments.length&&this._createWidget(b,f)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(b,f){a.data(f,this.widgetName,this);this.element=a(f);this.options=a.extend(true,{},this.options,this._getCreateOptions(),b);var g=this;this.element.bind("remove."+this.widgetName,function(){g.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,f){var g=b;if(arguments.length===0){return a.extend({},this.options)}if(typeof b==="string"){if(f===c){return this.options[b]}g={};g[b]=f}this._setOptions(g);return this},_setOptions:function(b){var f=this;a.each(b,function(g,h){f._setOption(g,h)});return this},_setOption:function(b,f){this.options[b]=f;if(b==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,g,h){var i=this.options[b];g=a.Event(g);g.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();h=h||{};if(g.originalEvent){b=a.event.props.length;for(var j;b;){j=a.event.props[--b];g[j]=g.originalEvent[j]}}this.element.trigger(g,h);return !(a.isFunction(i)&&i.call(this.element[0],g,h)===false||g.isDefaultPrevented())}}})(jQuery);
/*
 * jQuery UI Mouse 1.8.13
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Mouse
 *
 * Depends:
 *	jquery.ui.widget.js
 */
(function(a){var c=false;a(document).mousedown(function(){c=false});a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(d){return b._mouseDown(d)}).bind("click."+this.widgetName,function(d){if(true===a.data(d.target,b.widgetName+".preventClickEvent")){a.removeData(d.target,b.widgetName+".preventClickEvent");d.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(b){if(!c){this._mouseStarted&&this._mouseUp(b);this._mouseDownEvent=b;var d=this,e=b.which==1,h=typeof this.options.cancel=="string"?a(b.target).parents().add(b.target).filter(this.options.cancel).length:false;if(!e||h||!this._mouseCapture(b)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==false;if(!this._mouseStarted){b.preventDefault();return true}}true===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(f){return d._mouseMove(f)};this._mouseUpDelegate=function(f){return d._mouseUp(f)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);b.preventDefault();return c=true}},_mouseMove:function(b){if(a.browser.msie&&!(document.documentMode>=9)&&!b.button){return this._mouseUp(b)}if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==false)?this._mouseDrag(b):this._mouseUp(b)}return !this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",true);this._mouseStop(b)}return false},_mouseDistanceMet:function(b){return Math.max(Math.abs(this._mouseDownEvent.pageX-b.pageX),Math.abs(this._mouseDownEvent.pageY-b.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);(function(a){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))){this.element[0].style.position="relative"}this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(c){var d=this.options;if(this.helper||d.disabled||a(c.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(c);if(!this.handle){return false}a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")});return true},_mouseStart:function(c){var d=this.options;this.helper=this._createHelper(c);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;d.cursorAt&&this._adjustOffsetFromHelper(d.cursorAt);d.containment&&this._setContainment();if(this._trigger("start",c)===false){this._clear();return false}this._cacheHelperProportions();a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,c);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(c,true);return true},_mouseDrag:function(c,d){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");if(!d){d=this._uiHash();if(this._trigger("drag",c,d)===false){this._mouseUp({});return false}this.position=d.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}a.ui.ddmanager&&a.ui.ddmanager.drag(this,c);return false},_mouseStop:function(d){var e=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){e=a.ui.ddmanager.drop(this,d)}if(this.dropped){e=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original"){return false}if(this.options.revert=="invalid"&&!e||this.options.revert=="valid"&&e||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,e)){var f=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",d)!==false&&f._clear()})}else{this._trigger("stop",d)!==false&&this._clear()}return false},_mouseUp:function(b){this.options.iframeFix===true&&a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});return a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(c){var d=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==c.target){d=true}});return d},_createHelper:function(c){var d=this.options;c=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):d.helper=="clone"?this.element.clone().removeAttr("id"):this.element;c.parents("body").length||c.appendTo(d.appendTo=="parent"?this.element[0].parentNode:d.appendTo);c[0]!=this.element[0]&&!/(fixed|absolute)/.test(c.css("position"))&&c.css("position","absolute");return c},_adjustOffsetFromHelper:function(b){if(typeof b=="string"){b=b.split(" ")}if(a.isArray(b)){b={left:+b[0],top:+b[1]||0}}if("left" in b){this.offset.click.left=b.left+this.margins.left}if("right" in b){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if("top" in b){this.offset.click.top=b.top+this.margins.top}if("bottom" in b){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var d=this.options;if(d.containment=="parent"){d.containment=this.helper[0].parentNode}if(d.containment=="document"||d.containment=="window"){this.containment=[(d.containment=="document"?0:a(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(d.containment=="document"?0:a(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(d.containment=="document"?0:a(window).scrollLeft())+a(d.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d.containment=="document"?0:a(window).scrollTop())+(a(d.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(d.containment)&&d.containment.constructor!=Array){d=a(d.containment);var e=d[0];if(e){d.offset();var f=a(e).css("overflow")!="hidden";this.containment=[(parseInt(a(e).css("borderLeftWidth"),10)||0)+(parseInt(a(e).css("paddingLeft"),10)||0),(parseInt(a(e).css("borderTopWidth"),10)||0)+(parseInt(a(e).css("paddingTop"),10)||0),(f?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(a(e).css("borderLeftWidth"),10)||0)-(parseInt(a(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(a(e).css("borderTopWidth"),10)||0)-(parseInt(a(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=d}}else{if(d.containment.constructor==Array){this.containment=d.containment}}},_convertPositionTo:function(d,e){if(!e){e=this.position}d=d=="absolute"?1:-1;var g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=/(html|body)/i.test(g[0].tagName);return{top:e.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():h?0:g.scrollTop())*d),left:e.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:g.scrollLeft())*d)}},_generatePosition:function(i){var j=this.options,k=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,m=/(html|body)/i.test(k[0].tagName),l=i.pageX,d=i.pageY;if(this.originalPosition){var n;if(this.containment){if(this.relative_container){n=this.relative_container.offset();n=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]}else{n=this.containment}if(i.pageX-this.offset.click.left<n[0]){l=n[0]+this.offset.click.left}if(i.pageY-this.offset.click.top<n[1]){d=n[1]+this.offset.click.top}if(i.pageX-this.offset.click.left>n[2]){l=n[2]+this.offset.click.left}if(i.pageY-this.offset.click.top>n[3]){d=n[3]+this.offset.click.top}}if(j.grid){d=this.originalPageY+Math.round((d-this.originalPageY)/j.grid[1])*j.grid[1];d=n?!(d-this.offset.click.top<n[1]||d-this.offset.click.top>n[3])?d:!(d-this.offset.click.top<n[1])?d-j.grid[1]:d+j.grid[1]:d;l=this.originalPageX+Math.round((l-this.originalPageX)/j.grid[0])*j.grid[0];l=n?!(l-this.offset.click.left<n[0]||l-this.offset.click.left>n[2])?l:!(l-this.offset.click.left<n[0])?l-j.grid[0]:l+j.grid[0]:l}}return{top:d-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():m?0:k.scrollTop()),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():m?0:k.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(d,e,f){f=f||this._uiHash();a.ui.plugin.call(this,d,[e,f]);if(d=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.Widget.prototype._trigger.call(this,d,e,f)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"1.8.13"});a.ui.plugin.add("draggable","connectToSortable",{start:function(d,g){var h=a(this).data("draggable"),j=h.options,i=a.extend({},g,{item:h.element});h.sortables=[];a(j.connectToSortable).each(function(){var b=a.data(this,"sortable");if(b&&!b.options.disabled){h.sortables.push({instance:b,shouldRevert:b.options.revert});b.refreshPositions();b._trigger("activate",d,i)}})},stop:function(d,e){var g=a(this).data("draggable"),h=a.extend({},e,{item:g.element});a.each(g.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;g.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(d);this.instance.options.helper=this.instance.options._helper;g.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",d,h)}})},drag:function(d,e){var g=a(this).data("draggable"),h=this;a.each(g.sortables,function(){this.instance.positionAbs=g.positionAbs;this.instance.helperProportions=g.helperProportions;this.instance.offset.click=g.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(h).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return e.helper[0]};d.target=this.instance.currentItem[0];this.instance._mouseCapture(d,true);this.instance._mouseStart(d,true,true);this.instance.offset.click.top=g.offset.click.top;this.instance.offset.click.left=g.offset.click.left;this.instance.offset.parent.left-=g.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=g.offset.parent.top-this.instance.offset.parent.top;g._trigger("toSortable",d);g.dropped=this.instance.element;g.currentItem=g.element;this.instance.fromOutside=g}this.instance.currentItem&&this.instance._mouseDrag(d)}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",d,this.instance._uiHash(this.instance));this.instance._mouseStop(d,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();g._trigger("fromSortable",d);g.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(){var c=a("body"),d=a(this).data("draggable").options;if(c.css("cursor")){d._cursor=c.css("cursor")}c.css("cursor",d.cursor)},stop:function(){var b=a(this).data("draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){c=a(d.helper);d=a(this).data("draggable").options;if(c.css("opacity")){d._opacity=c.css("opacity")}c.css("opacity",d.opacity)},stop:function(c,d){c=a(this).data("draggable").options;c._opacity&&a(d.helper).css("opacity",c._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d){var e=a(this).data("draggable"),g=e.options,h=false;if(e.scrollParent[0]!=document&&e.scrollParent[0].tagName!="HTML"){if(!g.axis||g.axis!="x"){if(e.overflowOffset.top+e.scrollParent[0].offsetHeight-d.pageY<g.scrollSensitivity){e.scrollParent[0].scrollTop=h=e.scrollParent[0].scrollTop+g.scrollSpeed}else{if(d.pageY-e.overflowOffset.top<g.scrollSensitivity){e.scrollParent[0].scrollTop=h=e.scrollParent[0].scrollTop-g.scrollSpeed}}}if(!g.axis||g.axis!="y"){if(e.overflowOffset.left+e.scrollParent[0].offsetWidth-d.pageX<g.scrollSensitivity){e.scrollParent[0].scrollLeft=h=e.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(d.pageX-e.overflowOffset.left<g.scrollSensitivity){e.scrollParent[0].scrollLeft=h=e.scrollParent[0].scrollLeft-g.scrollSpeed}}}}else{if(!g.axis||g.axis!="x"){if(d.pageY-a(document).scrollTop()<g.scrollSensitivity){h=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())<g.scrollSensitivity){h=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}}if(!g.axis||g.axis!="y"){if(d.pageX-a(document).scrollLeft()<g.scrollSensitivity){h=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())<g.scrollSensitivity){h=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}}h!==false&&a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(e,d)}});a.ui.plugin.add("draggable","snap",{start:function(){var c=a(this).data("draggable"),d=c.options;c.snapElements=[];a(d.snap.constructor!=String?d.snap.items||":data(draggable)":d.snap).each(function(){var b=a(this),e=b.offset();this!=c.element[0]&&c.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:e.top,left:e.left})})},drag:function(G,H){for(var I=a(this).data("draggable"),K=I.options,J=K.snapTolerance,y=H.offset.left,L=y+I.helperProportions.width,E=H.offset.top,F=E+I.helperProportions.height,z=I.snapElements.length-1;z>=0;z--){var A=I.snapElements[z].left,C=A+I.snapElements[z].width,B=I.snapElements[z].top,D=B+I.snapElements[z].height;if(A-J<y&&y<C+J&&B-J<E&&E<D+J||A-J<y&&y<C+J&&B-J<F&&F<D+J||A-J<L&&L<C+J&&B-J<E&&E<D+J||A-J<L&&L<C+J&&B-J<F&&F<D+J){if(K.snapMode!="inner"){var d=Math.abs(B-F)<=J,u=Math.abs(D-E)<=J,v=Math.abs(A-L)<=J,w=Math.abs(C-y)<=J;if(d){H.position.top=I._convertPositionTo("relative",{top:B-I.helperProportions.height,left:0}).top-I.margins.top}if(u){H.position.top=I._convertPositionTo("relative",{top:D,left:0}).top-I.margins.top}if(v){H.position.left=I._convertPositionTo("relative",{top:0,left:A-I.helperProportions.width}).left-I.margins.left}if(w){H.position.left=I._convertPositionTo("relative",{top:0,left:C}).left-I.margins.left}}var x=d||u||v||w;if(K.snapMode!="outer"){d=Math.abs(B-E)<=J;u=Math.abs(D-F)<=J;v=Math.abs(A-y)<=J;w=Math.abs(C-L)<=J;if(d){H.position.top=I._convertPositionTo("relative",{top:B,left:0}).top-I.margins.top}if(u){H.position.top=I._convertPositionTo("relative",{top:D-I.helperProportions.height,left:0}).top-I.margins.top}if(v){H.position.left=I._convertPositionTo("relative",{top:0,left:A}).left-I.margins.left}if(w){H.position.left=I._convertPositionTo("relative",{top:0,left:C-I.helperProportions.width}).left-I.margins.left}}if(!I.snapElements[z].snapping&&(d||u||v||w||x)){I.options.snap.snap&&I.options.snap.snap.call(I.element,G,a.extend(I._uiHash(),{snapItem:I.snapElements[z].item}))}I.snapElements[z].snapping=d||u||v||w||x}else{I.snapElements[z].snapping&&I.options.snap.release&&I.options.snap.release.call(I.element,G,a.extend(I._uiHash(),{snapItem:I.snapElements[z].item}));I.snapElements[z].snapping=false}}}});a.ui.plugin.add("draggable","stack",{start:function(){var c=a(this).data("draggable").options;c=a.makeArray(a(c.stack)).sort(function(b,e){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(e).css("zIndex"),10)||0)});if(c.length){var d=parseInt(c[0].style.zIndex)||0;a(c).each(function(b){this.style.zIndex=d+b});this[0].style.zIndex=d+c.length}}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){c=a(d.helper);d=a(this).data("draggable").options;if(c.css("zIndex")){d._zIndex=c.css("zIndex")}c.css("zIndex",d.zIndex)},stop:function(c,d){c=a(this).data("draggable").options;c._zIndex&&a(d.helper).css("zIndex",c._zIndex)}})})(jQuery);var Carousel=(function(d){function c(q,o,n){var m=q+(Math.random()*(o-q));return typeof n?Math.round(m):m.toFixed(n)}function a(){var u=d(".slider-handler"),t=d(".slider"),r=d(".categorySlider"),o=d(".scroll-content"),n=o.width()<r.width()?0:parseInt(o.width()-r.width(),10),s=parseInt(t.width()-u.width(),10),q=Math.round((n/s)*100)/100,m=Math.round(parseInt(d("#shandler").css("left"),10)*q)*-1;if(m>0){m=0}if(m<(-1*n)){m=-1*n}return m}function h(){return function(o,n){var m=d(".scroll-content");d(m).css("margin-left",a()+"px")}}function f(){return function(o,n){var m=d(".scroll-content");m.animate({"margin-left":a()+"px"},500,"linear")}}function b(){var m=d(".slider-handler"),o=d(".slider");var n=parseInt(d(o).width()/2,10)-parseInt(d(m).width()/2,10);if(n<0){n=0}d("#shandler").css("left",n.toString()+"px")}function e(r,m){var v=d(".slider-handler"),s=d(".slider"),n=d(".scroll-content"),t=d("#favfontswrap").length>0?parseInt(d("#favfontswrap").css("margin-left"),10):0,o=r.pageX-m.offsetLeft-t,q=parseInt(s.width()-v.width(),10),u=o-parseInt(d(v).width()/2,10);if(u>q){u=q}if(u<0){u=0}d(v).css("left",u.toString()+"px");n.animate({"margin-left":a()+"px"},500,"linear")}function i(o,m,q,n){d("#shandler").draggable("destroy")}function k(){var o=d(".slider-handler"),r=d(".slider"),q=d(".categorySlider"),n=d(".scroll-content");var m={axis:"x",addClasses:false,containment:"parent"};m.drag=h();m.stop=f();b();d(n).css("margin-left",a()+"px");d("#shandler").draggable(m);d(r).click(function(s){e(s,this)})}function g(){k();d("#loadingimg").animate({opacity:0},950);d("div.categorySlider").animate({opacity:1},100);d("#loadingimg").hide(1);return false}function j(q,o){var n=q.responseXML;var m=n.getElementsByTagName("rsp")[0].firstChild.nodeValue;d(".scroll-content").html(m);return g()}function l(q,o,r,n,m){d("#carouseltabs-nav-Classifications").removeClass("ui-carouseltabs-selected");d("#carouseltabs-nav-Foundries").removeClass("ui-carouseltabs-selected");d("#carouseltabs-nav-Designers").removeClass("ui-carouseltabs-selected");d("#carouseltabs-nav-NewReleases").removeClass("ui-carouseltabs-selected");d("#carouseltabs-nav-SuperFamilies").removeClass("ui-carouseltabs-selected");d("#carouseltabs-nav-HighestRated").removeClass("ui-carouseltabs-selected");d("#carouseltabs-nav-BestSellers").removeClass("ui-carouseltabs-selected");if(d(o).length>0){d(o).addClass("ui-carouseltabs-selected")}d("div.categorySlider").animate({opacity:0},100);d("#loadingimg").animate({opacity:1},100);d("#loadingimg").show(1);i();if(m){d.ajax({type:"GET",url:"/services/service.ashx",complete:j,data:{method:"get_carousel_content",p:n}})}else{g()}return false}return{moveLayerTo:l}}(jQuery));$(function(){$("#loadingimg").html('<img width="32" height="32" src="/assets/images/wait-spinner.gif">');$("#carouseltabs-nav-Classifications").find("a").click(function(){return Carousel.moveLayerTo("div.categorySlider","#carouseltabs-nav-Classifications",5,"Classification",true)});$("#carouseltabs-nav-Foundries").find("a").click(function(){return Carousel.moveLayerTo("div.lvl2Slider","#carouseltabs-nav-Foundries",-190,"Foundries",true)});$("#carouseltabs-nav-Designers").find("a").click(function(){return Carousel.moveLayerTo("div.lvl3Slider","#carouseltabs-nav-Designers",-385,"Designers",true)});$("#carouseltabs-nav-NewReleases").find("a").click(function(){return Carousel.moveLayerTo("div.lvl4Slider","#carouseltabs-nav-NewReleases",-580,"Newreleases",true)});$("#carouseltabs-nav-SuperFamilies").find("a").click(function(){return Carousel.moveLayerTo("div.lvl5Slider","#carouseltabs-nav-SuperFamilies",-754,"SuperFamilies",true)});$("#carouseltabs-nav-HighestRated").find("a").click(function(){return Carousel.moveLayerTo("div.lvl6Slider","#carouseltabs-nav-HighestRated",-945,"HighestRated",true)});$("#carouseltabs-nav-BestSellers").find("a").click(function(){return Carousel.moveLayerTo("div.lvl7Slider","#carouseltabs-nav-BestSellers",-1136,"BestSellers",true)});var a=7;switch(a){case 1:Carousel.moveLayerTo("div.categorySlider","#carouseltabs-nav-Classifications",5,"Classification",false);break;case 2:Carousel.moveLayerTo("div.lvl2Slider","#carouseltabs-nav-Foundries",-190,"Foundries",false);break;case 3:Carousel.moveLayerTo("div.lvl3Slider","#carouseltabs-nav-Designers",-385,"Designers",false);break;case 4:Carousel.moveLayerTo("div.lvl4Slider","#carouseltabs-nav-NewReleases",-580,"Newreleases",false);break;case 5:Carousel.moveLayerTo("div.lvl5Slider","#carouseltabs-nav-SuperFamilies",-754,"SuperFamilies",false);break;case 6:Carousel.moveLayerTo("div.lvl6Slider","#carouseltabs-nav-HighestRated",-945,"HighestRated",false);break;case 7:Carousel.moveLayerTo("div.lvl7Slider","#carouseltabs-nav-BestSellers",-1136,"BestSellers",false);break;default:Carousel.moveLayerTo("div.lvl7Slider","#carouseltabs-nav-BestSellers",-1136,"BestSellers",false)}});var dragOn=0;var dragDiv=null;var dragX=0,dragY=0;var zMax=0;var dragInit=0;function initDrag(){if(document.layers){document.captureEvents(Event.MOUSEMOVE|Event.MOUSEDOWN|Event.MOUSEUP)}document.onmousemove=dragf;document.onmousedown=dragf;document.onmouseup=dragf;dragDiv=null;dragInit=1;if(document.getElementsByTagName){zMax=document.getElementsByTagName("DIV").length}else{if(document.all){zMax=document.body.all.tags("DIV").length}else{if(document.layers){zMax=document.layers.length}}}}function dragf(a){ev=a?a:event;if(dragDiv&&ev.type=="mousedown"){dragOn=1;dragX=(ev.pageX?ev.pageX:ev.clientX)-parseInt(dragDiv.style.left);dragY=(ev.pageY?ev.pageY:ev.clientY)-parseInt(dragDiv.style.top);dragDiv.style.zIndex=zMax++;return false}if(ev.type=="mouseup"){dragOn=0}if(dragDiv&&ev.type=="mousemove"&&dragOn){dragDiv.style.left=(ev.pageX?ev.pageX:ev.clientX)-dragX;dragDiv.style.top=(ev.pageY?ev.pageY:ev.clientY)-dragY;return false}if(ev.type=="mouseout"){if(!dragOn){dragDiv=null}}}function drag(a){if(!dragInit){initDrag()}if(!dragOn){dragDiv=document.getElementById?document.getElementById(a):document.all?document.all[a]:document.layers?document.layers[a]:null;if(document.layers){dragDiv.style=dragDiv}dragDiv.onmouseout=dragf}}function OpenCloseDiv(a){if(a.style.display=="none"){a.style.display="block"}else{a.style.display="none"}};
