
jQuery.noConflict();

// Google Analytics
var _gaq = _gaq || [];
_gaq.push(['_setAccount','UA-12598321-12'],['_trackPageview']);
(function(){var ga=document.createElement('script');ga.type='text/javascript';ga.async=true;ga.src=('https:'==document.location.protocol?'https://ssl':'http://www')+'.google-analytics.com/ga.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ga,s);})();

// http://jquery.malsup.com/cycle/lite/
;(function(D){var A="Lite-1.0";D.fn.cycle=function(E){return this.each(function(){E=E||{};if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var I=D(this);var J=E.slideExpr?D(E.slideExpr,this):I.children();var G=J.get();if(G.length<2){if(window.console&&window.console.log){window.console.log("terminating; too few slides: "+G.length)}return }var H=D.extend({},D.fn.cycle.defaults,E||{},D.metadata?I.metadata():D.meta?I.data():{});H.before=H.before?[H.before]:[];H.after=H.after?[H.after]:[];H.after.unshift(function(){H.busy=0});var F=this.className;H.width=parseInt((F.match(/w:(\d+)/)||[])[1])||H.width;H.height=parseInt((F.match(/h:(\d+)/)||[])[1])||H.height;H.timeout=parseInt((F.match(/t:(\d+)/)||[])[1])||H.timeout;if(I.css("position")=="static"){I.css("position","relative")}if(H.width){I.width(H.width)}if(H.height&&H.height!="auto"){I.height(H.height)}var K=0;J.css({position:"absolute",top:0,left:0}).hide().each(function(M){D(this).css("z-index",G.length-M)});D(G[K]).css("opacity",1).show();if(D.browser.msie){G[K].style.removeAttribute("filter")}if(H.fit&&H.width){J.width(H.width)}if(H.fit&&H.height&&H.height!="auto"){J.height(H.height)}if(H.pause){I.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}D.fn.cycle.transitions.fade(I,J,H);J.each(function(){var M=D(this);this.cycleH=(H.fit&&H.height)?H.height:M.height();this.cycleW=(H.fit&&H.width)?H.width:M.width()});J.not(":eq("+K+")").css({opacity:0});if(H.cssFirst){D(J[K]).css(H.cssFirst)}if(H.timeout){if(H.speed.constructor==String){H.speed={slow:600,fast:200}[H.speed]||400}if(!H.sync){H.speed=H.speed/2}while((H.timeout-H.speed)<250){H.timeout+=H.speed}}H.speedIn=H.speed;H.speedOut=H.speed;H.slideCount=G.length;H.currSlide=K;H.nextSlide=1;var L=J[K];if(H.before.length){H.before[0].apply(L,[L,L,H,true])}if(H.after.length>1){H.after[1].apply(L,[L,L,H,true])}if(H.click&&!H.next){H.next=H.click}if(H.next){D(H.next).bind("click",function(){return C(G,H,H.rev?-1:1)})}if(H.prev){D(H.prev).bind("click",function(){return C(G,H,H.rev?1:-1)})}if(H.timeout){this.cycleTimeout=setTimeout(function(){B(G,H,0,!H.rev)},H.timeout+(H.delay||0))}})};function B(J,E,I,K){if(E.busy){return }var H=J[0].parentNode,M=J[E.currSlide],L=J[E.nextSlide];if(H.cycleTimeout===0&&!I){return }if(I||!H.cyclePause){if(E.before.length){D.each(E.before,function(N,O){O.apply(L,[M,L,E,K])})}var F=function(){if(D.browser.msie){this.style.removeAttribute("filter")}D.each(E.after,function(N,O){O.apply(L,[M,L,E,K])})};if(E.nextSlide!=E.currSlide){E.busy=1;D.fn.cycle.custom(M,L,E,F)}var G=(E.nextSlide+1)==J.length;E.nextSlide=G?0:E.nextSlide+1;E.currSlide=G?J.length-1:E.nextSlide-1}if(E.timeout){H.cycleTimeout=setTimeout(function(){B(J,E,0,!E.rev)},E.timeout)}}function C(E,F,I){var H=E[0].parentNode,G=H.cycleTimeout;if(G){clearTimeout(G);H.cycleTimeout=0}F.nextSlide=F.currSlide+I;if(F.nextSlide<0){F.nextSlide=E.length-1}else{if(F.nextSlide>=E.length){F.nextSlide=0}}B(E,F,1,I>=0);return false}D.fn.cycle.custom=function(K,H,I,E){var J=D(K),G=D(H);G.css({opacity:0});var F=function(){G.animate({opacity:1},I.speedIn,I.easeIn,E)};J.animate({opacity:0},I.speedOut,I.easeOut,function(){J.css({display:"none"});if(!I.sync){F()}});if(I.sync){F()}};D.fn.cycle.transitions={fade:function(F,G,E){G.not(":eq(0)").css("opacity",0);E.before.push(function(){D(this).show()})}};D.fn.cycle.ver=function(){return A};D.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:"auto",sync:1,fit:0,pause:0,delay:0,slideExpr:null}})(jQuery);

// FormToWizard by Janko
;(function(a){a.fn.formToWizard=function(d){d=a.extend({submitButton:""},d);var f=this;var b=a(f).find("fieldset");var g=b.size();var h="#"+d.submitButton;a(h).hide();a(f).before('<ul id="steps"></ul>');b.each(function(k){a(this).wrap('<div id="step'+k+'"></div>');a(this).append('<p class="stepcommands" id="step'+k+'commands"></p>');var j=a(this).find("legend").html();a("#steps").append('<li id="stepDesc'+k+'">Step '+(k+1)+"<span>"+j+"</span></li>");if(k==0){i(k);c(k)}else{if(k==g-1){a("#step"+k).hide();e(k)}else{a("#step"+k).hide();e(k);i(k)}}});function e(j){var k="step"+j;a("#"+k+"commands").append('<a href="#" id="'+k+'Prev" class="prev">&larr; Back</a>');a("#"+k+"Prev").bind("click",function(event){event.preventDefault();a("#"+k).hide();a("#step"+(j-1)).show();a(h).hide();c(j-1)})}function i(j){var k="step"+j;a("#"+k+"commands").append('<a href="#" id="'+k+'Next" class="next">Next &rarr;</a>');a("#"+k+"Next").bind("click",function(event){event.preventDefault();a("#"+k).hide();a("#step"+(j+1)).show();if(j+2==g){a(h).show()}c(j+1)})}function c(j){a("#steps li").removeClass("current");a("#stepDesc"+j).addClass("current")}}})(jQuery);

//  jQuery Numeric 1.1.1
(function(a){a.fn.numeric=function(b,c){b=b||".";c=typeof c=="function"?c:function(){};this.keypress(function(g){var d=g.charCode?g.charCode:g.keyCode?g.keyCode:0;if(d==13&&this.nodeName.toLowerCase()=="input"){return true}else{if(d==13){return false}}var f=false;if((g.ctrlKey&&d==97)||(g.ctrlKey&&d==65)){return true}if((g.ctrlKey&&d==120)||(g.ctrlKey&&d==88)){return true}if((g.ctrlKey&&d==99)||(g.ctrlKey&&d==67)){return true}if((g.ctrlKey&&d==122)||(g.ctrlKey&&d==90)){return true}if((g.ctrlKey&&d==118)||(g.ctrlKey&&d==86)||(g.shiftKey&&d==45)){return true}if(d<48||d>57){if(d==45&&this.value.length==0){return true}if(d==b.charCodeAt(0)&&this.value.indexOf(b)!=-1){f=false}if(d!=8&&d!=9&&d!=13&&d!=35&&d!=36&&d!=37&&d!=39&&d!=46){f=false}else{if(typeof g.charCode!="undefined"){if(g.keyCode==g.which&&g.which!=0){f=true}else{if(g.keyCode!=0&&g.charCode==0&&g.which==0){f=true}}}}if(d==b.charCodeAt(0)){if(!this.containsDecimal){f=true;this.containsDecimal=true}else{f=false}}}else{f=true}return f}).blur(function(){var e=a(this).val();if(e!=""){var d=new RegExp("^\\d+$|\\d*"+b+"\\d+");if(!d.exec(e)){c.apply(this)}}});return this}})(jQuery);

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

// jQuery Easing 1.3
;(function(A){A.easing.jswing=A.easing.swing;A.extend(A.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return A.easing[A.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-A.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return A.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return A.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});})(jQuery);

// FancyBox 1.3.1
;(function(A){var J,S,Q,K,d,w,I,N,z,D=0,H={},h=[],e=0,F={},y=[],f=null,m=new Image(),g=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,k=/[^\.]\.(swf)\s*$/i,q,L=1,a,c,O=false,C=20,t=A.extend(A("<div/>")[0],{prop:0}),j=0,R=!A.support.opacity&&!window.XMLHttpRequest,i=function(){S.hide();m.onerror=m.onload=null;if(f){f.abort()}J.empty()},p=function(){A.fancybox('<p id="fancybox_error">The requested content cannot be loaded.<br />Please try again later.</p>',{scrolling:"no",padding:20,transitionIn:"none",transitionOut:"none"})},E=function(){return[A(window).width(),A(window).height(),A(document).scrollLeft(),A(document).scrollTop()]},b=function(){var V=E(),ac={},aa=F.margin,W=F.autoScale,ab=(C+aa)*2,Z=(C+aa)*2,X=(F.padding*2),Y;if(F.width.toString().indexOf("%")>-1){ac.width=((V[0]*parseFloat(F.width))/100)-(C*2);W=false}else{ac.width=F.width+X}if(F.height.toString().indexOf("%")>-1){ac.height=((V[1]*parseFloat(F.height))/100)-(C*2);W=false}else{ac.height=F.height+X}if(W&&(ac.width>(V[0]-ab)||ac.height>(V[1]-Z))){if(H.type=="image"||H.type=="swf"){ab+=X;Z+=X;Y=Math.min(Math.min(V[0]-ab,F.width)/F.width,Math.min(V[1]-Z,F.height)/F.height);ac.width=Math.round(Y*(ac.width-X))+X;ac.height=Math.round(Y*(ac.height-X))+X}else{ac.width=Math.min(ac.width,(V[0]-ab));ac.height=Math.min(ac.height,(V[1]-Z))}}ac.top=V[3]+((V[1]-(ac.height+(C*2)))*0.5);ac.left=V[2]+((V[0]-(ac.width+(C*2)))*0.5);if(F.autoScale===false){ac.top=Math.max(V[3]+aa,ac.top);ac.left=Math.max(V[2]+aa,ac.left)}return ac},M=function(V){if(V&&V.length){switch(F.titlePosition){case"inside":return V;case"over":return'<span id="fancybox-title-over">'+V+"</span>";default:return'<span id="fancybox-title-wrap"><span id="fancybox-title-left"></span><span id="fancybox-title-main">'+V+'</span><span id="fancybox-title-right"></span></span>'}}return false},s=function(){var X=F.title,W=c.width-(F.padding*2),V="fancybox-title-"+F.titlePosition;A("#fancybox-title").remove();j=0;if(F.titleShow===false){return}X=A.isFunction(F.titleFormat)?F.titleFormat(X,y,e,F):M(X);if(!X||X===""){return}A('<div id="fancybox-title" class="'+V+'" />').css({width:W,paddingLeft:F.padding,paddingRight:F.padding}).html(X).appendTo("body");switch(F.titlePosition){case"inside":j=A("#fancybox-title").outerHeight(true)-F.padding;c.height+=j;break;case"over":A("#fancybox-title").css("bottom",F.padding);break;default:A("#fancybox-title").css("bottom",A("#fancybox-title").outerHeight(true)*-1);break}A("#fancybox-title").appendTo(d).hide()},o=function(){A(document).unbind("keydown.fb").bind("keydown.fb",function(V){if(V.keyCode==27&&F.enableEscapeButton){V.preventDefault();A.fancybox.close()}else{if(V.keyCode==37){V.preventDefault();A.fancybox.prev()}else{if(V.keyCode==39){V.preventDefault();A.fancybox.next()}}}});if(A.fn.mousewheel){K.unbind("mousewheel.fb");if(y.length>1){K.bind("mousewheel.fb",function(V,W){V.preventDefault();if(O||W===0){return}if(W>0){A.fancybox.prev()}else{A.fancybox.next()}})}}if(!F.showNavArrows){return}if((F.cyclic&&y.length>1)||e!==0){N.show()}if((F.cyclic&&y.length>1)||e!=(y.length-1)){z.show()}},T=function(){var V,W;if((y.length-1)>e){V=y[e+1].href;if(typeof V!=="undefined"&&V.match(g)){W=new Image();W.src=V}}if(e>0){V=y[e-1].href;if(typeof V!=="undefined"&&V.match(g)){W=new Image();W.src=V}}},v=function(){w.css("overflow",(F.scrolling=="auto"?(F.type=="image"||F.type=="iframe"||F.type=="swf"?"hidden":"auto"):(F.scrolling=="yes"?"auto":"visible")));if(!A.support.opacity){w.get(0).style.removeAttribute("filter");K.get(0).style.removeAttribute("filter")}A("#fancybox-title").show();if(F.hideOnContentClick){w.one("click",A.fancybox.close)}if(F.hideOnOverlayClick){Q.one("click",A.fancybox.close)}if(F.showCloseButton){I.show()}o();A(window).bind("resize.fb",A.fancybox.center);if(F.centerOnScroll){A(window).bind("scroll.fb",A.fancybox.center)}else{A(window).unbind("scroll.fb")}if(A.isFunction(F.onComplete)){F.onComplete(y,e,F)}O=false;T()},G=function(Z){var W=Math.round(a.width+(c.width-a.width)*Z),V=Math.round(a.height+(c.height-a.height)*Z),Y=Math.round(a.top+(c.top-a.top)*Z),X=Math.round(a.left+(c.left-a.left)*Z);K.css({width:W+"px",height:V+"px",top:Y+"px",left:X+"px"});W=Math.max(W-F.padding*2,0);V=Math.max(V-(F.padding*2+(j*Z)),0);w.css({width:W+"px",height:V+"px"});if(typeof c.opacity!=="undefined"){K.css("opacity",(Z<0.5?0.5:Z))}},x=function(V){var W=V.offset();W.top+=parseFloat(V.css("paddingTop"))||0;W.left+=parseFloat(V.css("paddingLeft"))||0;W.top+=parseFloat(V.css("border-top-width"))||0;W.left+=parseFloat(V.css("border-left-width"))||0;W.width=V.width();W.height=V.height();return W},U=function(){var Y=H.orig?A(H.orig):false,X={},W,V;if(Y&&Y.length){W=x(Y);X={width:(W.width+(F.padding*2)),height:(W.height+(F.padding*2)),top:(W.top-F.padding-C),left:(W.left-F.padding-C)}}else{V=E();X={width:1,height:1,top:V[3]+V[1]*0.5,left:V[2]+V[0]*0.5}}return X},u=function(){S.hide();if(K.is(":visible")&&A.isFunction(F.onCleanup)){if(F.onCleanup(y,e,F)===false){A.event.trigger("fancybox-cancel");O=false;return}}y=h;e=D;F=H;w.get(0).scrollTop=0;w.get(0).scrollLeft=0;if(F.overlayShow){if(R){A("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"})}Q.css({"background-color":F.overlayColor,opacity:F.overlayOpacity}).unbind().show()}c=b();s();if(K.is(":visible")){A(I.add(N).add(z)).hide();var W=K.position(),V;a={top:W.top,left:W.left,width:K.width(),height:K.height()};V=(a.width==c.width&&a.height==c.height);w.fadeOut(F.changeFade,function(){var X=function(){w.html(J.contents()).fadeIn(F.changeFade,v)};A.event.trigger("fancybox-change");w.empty().css("overflow","hidden");if(V){w.css({top:F.padding,left:F.padding,width:Math.max(c.width-(F.padding*2),1),height:Math.max(c.height-(F.padding*2)-j,1)});X()}else{w.css({top:F.padding,left:F.padding,width:Math.max(a.width-(F.padding*2),1),height:Math.max(a.height-(F.padding*2),1)});t.prop=0;A(t).animate({prop:1},{duration:F.changeSpeed,easing:F.easingChange,step:G,complete:X})}});return}K.css("opacity",1);if(F.transitionIn=="elastic"){a=U();w.css({top:F.padding,left:F.padding,width:Math.max(a.width-(F.padding*2),1),height:Math.max(a.height-(F.padding*2),1)}).html(J.contents());K.css(a).show();if(F.opacity){c.opacity=0}t.prop=0;A(t).animate({prop:1},{duration:F.speedIn,easing:F.easingIn,step:G,complete:v})}else{w.css({top:F.padding,left:F.padding,width:Math.max(c.width-(F.padding*2),1),height:Math.max(c.height-(F.padding*2)-j,1)}).html(J.contents());K.css(c).fadeIn(F.transitionIn=="none"?0:F.speedIn,v)}},r=function(){J.width(H.width);J.height(H.height);if(H.width=="auto"){H.width=J.width()}if(H.height=="auto"){H.height=J.height()}u()},P=function(){O=true;H.width=m.width;H.height=m.height;A("<img />").attr({id:"fancybox-img",src:m.src,alt:H.title}).appendTo(J);u()},l=function(){i();var aa=h[D],X,Y,ac,ab,W,V,Z;H=A.extend({},A.fn.fancybox.defaults,(typeof A(aa).data("fancybox")=="undefined"?H:A(aa).data("fancybox")));ac=aa.title||A(aa).title||H.title||"";if(aa.nodeName&&!H.orig){H.orig=A(aa).children("img:first").length?A(aa).children("img:first"):A(aa)}if(ac===""&&H.orig){ac=H.orig.attr("alt")}if(aa.nodeName&&(/^(?:javascript|#)/i).test(aa.href)){X=H.href||null}else{X=H.href||aa.href||null}if(H.type){Y=H.type;if(!X){X=H.content}}else{if(H.content){Y="html"}else{if(X){if(X.match(g)){Y="image"}else{if(X.match(k)){Y="swf"}else{if(A(aa).hasClass("iframe")){Y="iframe"}else{if(X.match(/#/)){aa=X.substr(X.indexOf("#"));Y=A(aa).length>0?"inline":"ajax"}else{Y="ajax"}}}}}else{Y="inline"}}}H.type=Y;H.href=X;H.title=ac;if(H.autoDimensions&&H.type!=="iframe"&&H.type!=="swf"){H.width="auto";H.height="auto"}if(H.modal){H.overlayShow=true;H.hideOnOverlayClick=false;H.hideOnContentClick=false;H.enableEscapeButton=false;H.showCloseButton=false}if(A.isFunction(H.onStart)){if(H.onStart(h,D,H)===false){O=false;return}}J.css("padding",(C+H.padding+H.margin));A(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){A(this).replaceWith(w.children())});switch(Y){case"html":J.html(H.content);r();break;case"inline":A('<div class="fancybox-inline-tmp" />').hide().insertBefore(A(aa)).bind("fancybox-cleanup",function(){A(this).replaceWith(w.children())}).bind("fancybox-cancel",function(){A(this).replaceWith(J.children())});A(aa).appendTo(J);r();break;case"image":O=false;A.fancybox.showActivity();m=new Image();m.onerror=function(){p()};m.onload=function(){m.onerror=null;m.onload=null;P()};m.src=X;break;case"swf":ab='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+H.width+'" height="'+H.height+'"><param name="movie" value="'+X+'"></param>';W="";A.each(H.swf,function(ad,ae){ab+='<param name="'+ad+'" value="'+ae+'"></param>';W+=" "+ad+'="'+ae+'"'});ab+='<embed src="'+X+'" type="application/x-shockwave-flash" width="'+H.width+'" height="'+H.height+'"'+W+"></embed></object>";J.html(ab);r();break;case"ajax":V=X.split("#",2);Z=H.ajax.data||{};if(V.length>1){X=V[0];if(typeof Z=="string"){Z+="&selector="+V[1]}else{Z.selector=V[1]}}O=false;A.fancybox.showActivity();f=A.ajax(A.extend(H.ajax,{url:X,data:Z,error:p,success:function(ae,af,ad){if(f.status==200){J.html(ae);r()}}}));break;case"iframe":A('<iframe id="fancybox-frame" name="fancybox-frame'+new Date().getTime()+'" frameborder="0" hspace="0" scrolling="'+H.scrolling+'" src="'+H.href+'"></iframe>').appendTo(J);u();break}},n=function(){if(!S.is(":visible")){clearInterval(q);return}A("div",S).css("top",(L*-40)+"px");L=(L+1)%12},B=function(){if(A("#fancybox-wrap").length){return}A("body").append(J=A('<div id="fancybox-tmp"></div>'),S=A('<div id="fancybox-loading"><div></div></div>'),Q=A('<div id="fancybox-overlay"></div>'),K=A('<div id="fancybox-wrap"></div>'));if(!A.support.opacity){K.addClass("fancybox-ie");S.addClass("fancybox-ie")}d=A('<div id="fancybox-outer"></div>').append('<div class="fancy-bg" id="fancy-bg-n"></div><div class="fancy-bg" id="fancy-bg-ne"></div><div class="fancy-bg" id="fancy-bg-e"></div><div class="fancy-bg" id="fancy-bg-se"></div><div class="fancy-bg" id="fancy-bg-s"></div><div class="fancy-bg" id="fancy-bg-sw"></div><div class="fancy-bg" id="fancy-bg-w"></div><div class="fancy-bg" id="fancy-bg-nw"></div>').appendTo(K);d.append(w=A('<div id="fancybox-inner"></div>'),I=A('<a id="fancybox-close"></a>'),N=A('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),z=A('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));I.click(A.fancybox.close);S.click(A.fancybox.cancel);N.click(function(V){V.preventDefault();A.fancybox.prev()});z.click(function(V){V.preventDefault();A.fancybox.next()});if(R){Q.get(0).style.setExpression("height","document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'");S.get(0).style.setExpression("top","(-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'");d.prepend('<iframe id="fancybox-hide-sel-frame" src="javascript:\'\';" scrolling="no" frameborder="0" ></iframe>')}};A.fn.fancybox=function(V){A(this).data("fancybox",A.extend({},V,(A.metadata?A(this).metadata():{}))).unbind("click.fb").bind("click.fb",function(X){X.preventDefault();if(O){return}O=true;A(this).blur();h=[];D=0;var W=A(this).attr("rel")||"";if(!W||W==""||W==="nofollow"){h.push(this)}else{h=A("a[rel="+W+"], area[rel="+W+"]");D=h.index(this)}l();return false});return this};A.fancybox=function(Y){if(O){return}O=true;var X=typeof arguments[1]!=="undefined"?arguments[1]:{};h=[];D=X.index||0;if(A.isArray(Y)){for(var W=0,V=Y.length;W<V;W++){if(typeof Y[W]=="object"){A(Y[W]).data("fancybox",A.extend({},X,Y[W]))}else{Y[W]=A({}).data("fancybox",A.extend({content:Y[W]},X))}}h=jQuery.merge(h,Y)}else{if(typeof Y=="object"){A(Y).data("fancybox",A.extend({},X,Y))}else{Y=A({}).data("fancybox",A.extend({content:Y},X))}h.push(Y)}if(D>h.length||D<0){D=0}l()};A.fancybox.showActivity=function(){clearInterval(q);S.show();q=setInterval(n,66)};A.fancybox.hideActivity=function(){S.hide()};A.fancybox.next=function(){return A.fancybox.pos(e+1)};A.fancybox.prev=function(){return A.fancybox.pos(e-1)};A.fancybox.pos=function(V){if(O){return}V=parseInt(V,10);if(V>-1&&y.length>V){D=V;l()}if(F.cyclic&&y.length>1&&V<0){D=y.length-1;l()}if(F.cyclic&&y.length>1&&V>=y.length){D=0;l()}return};A.fancybox.cancel=function(){if(O){return}O=true;A.event.trigger("fancybox-cancel");i();if(H&&A.isFunction(H.onCancel)){H.onCancel(h,D,H)}O=false};A.fancybox.close=function(){if(O||K.is(":hidden")){return}O=true;if(F&&A.isFunction(F.onCleanup)){if(F.onCleanup(y,e,F)===false){O=false;return}}i();A(I.add(N).add(z)).hide();A("#fancybox-title").remove();K.add(w).add(Q).unbind();A(window).unbind("resize.fb scroll.fb");A(document).unbind("keydown.fb");function V(){Q.fadeOut("fast");K.hide();A.event.trigger("fancybox-cleanup");w.empty();if(A.isFunction(F.onClosed)){F.onClosed(y,e,F)}y=H=[];e=D=0;F=H={};O=false}w.css("overflow","hidden");if(F.transitionOut=="elastic"){a=U();var W=K.position();c={top:W.top,left:W.left,width:K.width(),height:K.height()};if(F.opacity){c.opacity=1}t.prop=1;A(t).animate({prop:0},{duration:F.speedOut,easing:F.easingOut,step:G,complete:V})}else{K.fadeOut(F.transitionOut=="none"?0:F.speedOut,V)}};A.fancybox.resize=function(){var W,V;if(O||K.is(":hidden")){return}O=true;W=w.wrapInner("<div style='overflow:auto'></div>").children();V=W.height();K.css({height:V+(F.padding*2)+j});w.css({height:V});W.replaceWith(W.children());A.fancybox.center()};A.fancybox.center=function(){O=true;var V=E(),W=F.margin,X={};X.top=V[3]+((V[1]-((K.height()-j)+(C*2)))*0.5);X.left=V[2]+((V[0]-(K.width()+(C*2)))*0.5);X.top=Math.max(V[3]+W,X.top);X.left=Math.max(V[2]+W,X.left);K.css(X);O=false};A.fn.fancybox.defaults={padding:10,margin:20,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.3,overlayColor:"#666",titleShow:true,titlePosition:"outside",titleFormat:null,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,onStart:null,onCancel:null,onComplete:null,onCleanup:null,onClosed:null};A(document).ready(function(){B()})})(jQuery);

jQuery(function($){

	$("a.lbi").fancybox({ 'width':700, 'centerOnScroll':true, 'autoDimensions':true });

	$(".numeric").numeric();

	$(".product .side").cycle();
	$("#p-3 form#sample").formToWizard({ submitButton:"btn-submit" });
	$("#p-4 form#order").formToWizard({ submitButton:"btn-submit" });

	// Remove the logo link on the home page
	$("body#p-1 #head h1 a").css("cursor","default").attr({ "title":"" }).click(function(e){ e.preventDefault(); });

	$("a[href^=http], area[href^=http]").each(function(){
		if (this.href.indexOf(location.hostname) == -1){
			$(this).attr({ "target":"_blank", "rel":"external" });
		}
	});

});

