/* jquery.scrollTo-min.js, form.js, Carousel3D3.js, jquery.prettyPhoto.js, jquery.infinitecarousel.js, script.js */ 
(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
jQuery(document).ready(function(a){a("input.initial_focus")&&a("input.initial_focus").focus(),a("#comment_form").length>0&&a("#comment_form").ajaxForm({dataType:"json",beforeSubmit:function(b,c,d){a("input[type=submit], #submit_button",c).attr("disabled","disabled"),a("input[type=submit]",c).attr("value","Please wait...")},success:function(b,c,d,e){if(b.status=="ok"){e.clearForm(),a("#comment_errors").html("<div>Thank  you for your comment.</div>"),a("#comment_form_wrapper").hide(),a("a[href$=#comments]").text(""+b.count+" comments");var f="<b>Your  comment is pending moderation and will appear after it is  approved.</b>";if(b.moderated=="false"||b.moderated==!1)a("a[href$=#comments]").text(""+b.count+" comments"),f="<h3>"+b.params.subject+"</h3><p>From: "+b.params.name+", Just  Posted</p><p>"+b.params.body+"</p>";var g=a("#comments > p:first");g==undefined||g.length==0?a("#comments").prepend(f):g.after(f)}else a("#comment_form  input[type=submit],#comment_form  #submit_button").removeAttr("disabled").attr("value","Submit"),a("#comment_errors").html("<div><h2>Please correct the following  problems</h2><p>"+b.message+"</p></div>")}})}),function(a){a.fn.featureCarousel=function(b){b=a.extend({},a.fn.featureCarousel.defaults,b||{});return a(this).each(function(){function s(a,b){var c=1,d=1,e;e=a;while((e=g(e))!=b)c++;e=a;while((e=h(e))!=b)d++;return c<d?c*-1:d}function r(a,b){if(c.currentlyMoving==!1){var d=b*c.itemsToAnimate;c.rotationsRemaining=d,q(a)}}function q(a){c.currentlyMoving=!0;var b,d,f,i;a==!0?(b=e(h(c.currentCenterNum)),d=e(c.currentCenterNum),f=e(h(h(c.currentCenterNum))),i=e(g(c.currentCenterNum)),c.currentCenterNum=h(c.currentCenterNum)):(b=e(g(c.currentCenterNum)),d=e(g(g(c.currentCenterNum))),f=e(c.currentCenterNum),i=e(h(c.currentCenterNum)),c.currentCenterNum=g(c.currentCenterNum)),a?d.css("z-index",3):f.css("z-index",3),b.css("z-index",4),p(d,a),p(b,a),p(f,a),c.totalFeatureCount>3&&p(i,a)}function p(a,d){var e,f,i,j,k,l,p,r=a.data("position"),s;d==!0?s=g(r):s=h(r),s==1?(e=c.largeFeatureWidth,f=c.largeFeatureHeight,i=b.topPadding,k=a.css("z-index"),j=c.containerWidth/2-c.largeFeatureWidth/2-c.borderWidth/2,p=1):(e=c.smallFeatureWidth,f=c.smallFeatureHeight,i=b.smallFeatureOffset+b.topPadding,k=1,p=.9,s==c.totalFeatureCount?j=b.sidePadding:s==2?j=c.containerWidth-c.smallFeatureWidth-b.sidePadding-c.borderWidth:(j=c.containerWidth/2-c.smallFeatureWidth/2-c.borderWidth/2,p=0)),s!=1&&a.find("div").hide(),a.animate({width:e,height:f,top:i,left:j,opacity:p},b.carouselSpeed,b.animationEasing,function(){s==1&&a.find("div").fadeTo("fast",.85),c.rotationsRemaining=c.rotationsRemaining-1,a.css("z-index",k);if(b.counterStyle==1||b.counterStyle==2)if(s==1){var e=c.featuresContainer.children("div").index(a)+1,f;d==!1?f=h(e):f=g(e),m(f,e)}var i=c.rotationsRemaining/c.itemsToAnimate;i%1==0&&(c.currentlyMoving=!1,o(d),c.rotationsRemaining>0&&q(d)),n()}).find("img:first").animate({width:e,height:f},b.carouselSpeed,b.animationEasing).end()}function o(b){a.each(c.featuresArray,function(){var c;b==!1?c=h(a(this).data().position):c=g(a(this).data().position),a(this).data("position",c)})}function n(){c.timeoutVar!=null&&(c.timeoutVar=clearTimeout(c.timeoutVar));if(b.autoPlay!=0){var a=Math.abs(b.autoPlay)<b.carouselSpeed?b.carouselSpeed:Math.abs(b.autoPlay);c.timeoutVar=setTimeout(function(){b.autoPlay>0?r(!0,1):b.autoPlay<0&&r(!1,1)},a)}}function m(a,b){var d=c.featuresContainer.find(".blipsContainer"),e=d.find("#blip_"+a),f=d.find("#blip_"+b);e.removeClass("blipSelected"),f.addClass("blipSelected")}function l(){if(b.counterStyle==1||b.counterStyle==2){var d=a("<ul></ul>");d.addClass("blipsContainer");for(var e=0;e<c.totalFeatureCount;e++){var f;b.counterStyle==2?f="":f=e+1;var g=a("<div>"+f+"</div>");g.addClass("blip"),g.css("cursor","pointer"),g.attr("id","blip_"+(e+1));var h=a("<li></li>");h.append(g),h.css("float","left"),h.css("list-style-type","none"),d.append(h)}a(c.containerIDTag).append(d),d.hide().show()}}function k(){a.each(c.featuresArray,function(b){a(this).data("setPosition",b+1)});var d=g(b.startingFeature);c.currentCenterNum=d;var f=e(d);f.data("position",1);var h=f.prevAll();h.each(function(b){a(this).data("position",c.totalFeatureCount-b)});var i=f.nextAll();i.each(function(b){a(this).data("setPosition")!=undefined&&a(this).data("position",b+2)}),b.counterStyle==3&&a.each(c.featuresArray,function(){var b=g(a(this).data("position")),d=a("<span></span>");d.addClass("numberTag"),d.html("("+b+" of "+c.totalFeatureCount+") "),a(this).find("div p").prepend(d)})}function j(){b.displayCutoff>0&&b.displayCutoff<c.totalFeatureCount&&(c.totalFeatureCount=b.displayCutoff),c.featuresContainer.children("div").each(function(b){b<c.totalFeatureCount&&(c.featuresArray[b]=a(this))}),c.featuresContainer.children("div").first().css("borderLeftWidth")!="medium"&&(c.borderWidth=parseInt(c.featuresContainer.children("div").first().css("borderLeftWidth"))*2),c.featuresContainer.children("div").each(function(){a(this).css({left:c.containerWidth/2-c.smallFeatureWidth/2-c.borderWidth/2,width:c.smallFeatureWidth,height:c.smallFeatureHeight,top:b.smallFeatureOffset+b.topPadding,opacity:0})}).find("img:first").css({width:c.smallFeatureWidth}),c.totalFeatureCount<4?c.itemsToAnimate=c.totalFeatureCount:c.itemsToAnimate=4,c.featuresContainer.find("div > div").hide()}function i(){c.containerWidth=c.featuresContainer.width(),c.containerHeight=c.featuresContainer.height();var d=a(c.containerIDTag).find("div img:first");b.largeFeatureWidth>1?c.largeFeatureWidth=b.largeFeatureWidth:b.largeFeatureWidth>0&&b.largeFeatureWidth<1?c.largeFeatureWidth=d.width()*b.largeFeatureWidth:c.largeFeatureWidth=d.outerWidth(),b.largeFeatureHeight>1?c.largeFeatureHeight=b.largeFeatureHeight:b.largeFeatureHeight>0&&b.largeFeatureHeight<1?c.largeFeatureHeight=d.height()*b.largeFeatureHeight:c.largeFeatureHeight=d.outerHeight(),b.smallFeatureWidth>1?c.smallFeatureWidth=b.smallFeatureWidth:b.smallFeatureWidth>0&&b.smallFeatureWidth<1?c.smallFeatureWidth=d.width()*b.smallFeatureWidth:c.smallFeatureWidth=d.outerWidth()/2,b.smallFeatureHeight>1?c.smallFeatureHeight=b.smallFeatureHeight:b.smallFeatureHeight>0&&b.smallFeatureHeight<1?c.smallFeatureHeight=d.height()*b.smallFeatureHeight:c.smallFeatureHeight=d.outerHeight()/2}function h(a){return a+1>c.totalFeatureCount?1:a+1}function g(a){return a-1==0?c.totalFeatureCount:a-1}function f(b){a.each(c.featuresArray,function(){if(a(this).data().setPosition==b)return a(this)})}function e(a){return c.featuresArray[a-1]}function d(d){if(b.preload==!0){var e=c.featuresContainer.find("img"),f=0,g=e.length;e.each(function(){a(this).load(function(){f++,f==g&&d()}),this.complete&&a(this).trigger("load")})}else d()}var c={currentCenterNum:b.startingFeature,containerWidth:0,containerHeight:0,largeFeatureWidth:0,largeFeatureHeight:0,smallFeatureWidth:0,smallFeatureHeight:0,totalFeatureCount:a(this).children("div").length,currentlyMoving:!1,featuresContainer:a(this),featuresArray:[],containerIDTag:"#"+a(this).attr("id"),timeoutVar:null,rotationsRemaining:0,itemsToAnimate:0,borderWidth:0};d(function(){i(),j(),k(),l(),r(!0,1)}),a(".leftButton").click(function(){r(!1,1)}),a(".rightButton").click(function(){r(!0,1)}),c.featuresContainer.children("div").click(function(){var b=a(this).data("position");b==2?r(!0,1):b==c.totalFeatureCount&&r(!1,1)}).mouseover(function(){if(c.currentlyMoving==!1){var b=a(this).data("position");(b==2||b==c.totalFeatureCount)&&a(this).css("opacity",1)}}).mouseout(function(){if(c.currentlyMoving==!1){var b=a(this).data("position");(b==2||b==c.totalFeatureCount)&&a(this).css("opacity",.9)}}),a("a",c.containerIDTag).live("click",function(b){var d=a(this).parentsUntil(c.containerIDTag);d.each(function(){var d=a(this).data("position");if(d!=undefined&&d!=1){d==c.totalFeatureCount?r(!1,1):d==2&&r(!0,1),b.preventDefault();return!1}})}),a(".blip").live("click",function(){var b=a(this).attr("id").substring(5),d=c.featuresContainer.children("div").eq(b-1).data("position"),e=c.currentCenterNum;if(b!=e){var f=s(1,d);f<0?r(!1,f*-1):r(!0,f)}})})},a.fn.featureCarousel.defaults={largeFeatureWidth:0,largeFeatureHeight:0,smallFeatureWidth:.8,smallFeatureHeight:.8,topPadding:0,sidePadding:30,smallFeatureOffset:40,startingFeature:1,carouselSpeed:500,autoPlay:!1,counterStyle:1,preload:!0,displayCutoff:0,animationEasing:"swing"}}(jQuery),function(a){function b(a,b){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c="[\\?&]"+a+"=([^&#]*)",d=new RegExp(c),e=d.exec(b);return e==null?"":e[1]}a.prettyPhoto={version:"2.5.6"},a.fn.prettyPhoto=function(c){function z(){a("body").append(c.markup),g=a(".pp_pic_holder"),h=a(".ppt"),i=a("div.pp_overlay"),g.attr("class","pp_pic_holder "+c.theme),i.css({opacity:0,height:a(document).height()}).bind("click",function(){c.modal||a.prettyPhoto.close()}),a("a.pp_close").bind("click",function(){a.prettyPhoto.close();return!1}),a("a.pp_expand").bind("click",function(){$this=a(this),$this.hasClass("pp_expand")?($this.removeClass("pp_expand").addClass("pp_contract"),d=!1):($this.removeClass("pp_contract").addClass("pp_expand"),d=!0),r(function(){a.prettyPhoto.open(images,titles,descriptions)}),g.find(".pp_fade").fadeOut(c.animationSpeed);return!1}),g.find(".pp_previous, .pp_arrow_previous").bind("click",function(){a.prettyPhoto.changePage("previous");return!1}),g.find(".pp_next, .pp_arrow_next").bind("click",function(){a.prettyPhoto.changePage("next");return!1})}function y(){n=a(window).height(),o=a(window).width(),i.css({height:a(document).height()})}function x(){if(self.pageYOffset)return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};if(document.documentElement&&document.documentElement.scrollTop)return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};if(document.body)return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}}function w(){d&&(titleHeight=h.height(),contentHeight=g.height(),contentwidth=g.width(),projectedTop=n/2+q.scrollTop-(contentHeight+titleHeight)/2,g.css({top:projectedTop,left:o/2+q.scrollLeft-contentwidth/2}),h.css({top:projectedTop-titleHeight,left:o/2+q.scrollLeft-contentwidth/2+20}))}function v(a){return a.match(/youtube\.com\/watch/i)?"youtube":a.match(/vimeo\.com/i)?"vimeo":a.indexOf(".mov")!=-1?"quicktime":a.indexOf(".swf")!=-1?"flash":a.indexOf("iframe")!=-1?"iframe":a.substr(0,1)=="#"?"inline":"image"}function u(b,c){b=parseFloat(b),c=parseFloat(c),$pp_details=g.find(".pp_details"),$pp_details.width(b),detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom")),$pp_details=$pp_details.clone().appendTo(a("body")).css({position:"absolute",top:-1e4}),detailsHeight+=$pp_details.height(),detailsHeight=detailsHeight<=34?36:detailsHeight,a.browser.msie&&a.browser.version==7&&(detailsHeight+=8),$pp_details.remove(),j=c+detailsHeight,k=b,l=j+h.height()+g.find(".pp_top").height()+g.find(".pp_bottom").height(),m=b}function t(a,b){hasBeenResized=!1,u(a,b),imageWidth=a,imageHeight=b;if((m>o||l>n)&&d&&c.allowresize&&!e){hasBeenResized=!0,notFitting=!0;while(notFitting)m>o?(imageWidth=o-200,imageHeight=b/a*imageWidth):l>n?(imageHeight=n-200,imageWidth=a/b*imageHeight):notFitting=!1,l=imageHeight,m=imageWidth;u(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(l),containerWidth:Math.floor(m)+40,contentHeight:Math.floor(j),contentWidth:Math.floor(k),resized:hasBeenResized}}function s(b){p==b-1?(g.find("a.pp_next").css("visibility","hidden"),g.find("a.pp_arrow_next").addClass("disabled").unbind("click")):(g.find("a.pp_next").css("visibility","visible"),g.find("a.pp_arrow_next.disabled").removeClass("disabled").bind("click",function(){a.prettyPhoto.changePage("next");return!1})),p==0?(g.find("a.pp_previous").css("visibility","hidden"),g.find("a.pp_arrow_previous").addClass("disabled").unbind("click")):(g.find("a.pp_previous").css("visibility","visible"),g.find("a.pp_arrow_previous.disabled").removeClass("disabled").bind("click",function(){a.prettyPhoto.changePage("previous");return!1})),b>1?a(".pp_nav").show():a(".pp_nav").hide()}function r(b){g.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden"),g.find(".pp_fade").fadeOut(c.animationSpeed,function(){a(".pp_loaderIcon").show(),b&&b()}),h.fadeOut(c.animationSpeed)}c=jQuery.extend({animationSpeed:"normal",opacity:.8,showTitle:!0,allowresize:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"light_rounded",hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,changepicturecallback:function(){},callback:function(){},markup:'<div class="pp_pic_holder" id="pretty"> \n                        <div class="pp_top"> \n                            <div class="pp_left"></div> \n                            <div class="pp_middle"></div> \n                            <div class="pp_right"></div> \n                        </div> \n                        <div class="pp_content_container"> \n                            <div class="pp_left"> \n                            <div class="pp_right"> \n                                <div class="pp_content"> \n                                    <div class="pp_loaderIcon"></div> \n                                    <div class="pp_fade"> \n                                        <a href="#" class="pp_expand" title="Expand the image">Expand</a> \n                                        <div class="pp_hoverContainer"> \n                                            <a class="pp_next" href="#">next</a> \n                                            <a class="pp_previous" href="#">previous</a> \n                                        </div> \n                                        <div id="pp_full_res"></div> \n                                        <div class="pp_details clearfix"> \n                                            <a class="pp_close" href="#">Close</a> \n                                            <p class="pp_description"></p> \n                                            <div class="pp_nav"> \n                                                <a href="#" class="pp_arrow_previous">Previous</a> \n                                                <p class="currentTextHolder">0/0</p> \n                                                <a href="#" class="pp_arrow_next">Next</a> \n                                            </div> \n                                        </div> \n                                    </div> \n                                </div> \n                            </div> \n                            </div> \n                        </div> \n                        <div class="pp_bottom"> \n                            <div class="pp_left"></div> \n                            <div class="pp_middle"></div> \n                            <div class="pp_right"></div> \n                        </div> \n                    </div> \n                    <div class="pp_overlay"></div> \n                    <div class="ppt"></div>',image_markup:'<img id="fullResImage" src="" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline clearfix">{content}</div>'},c),a.browser.msie&&parseInt(a.browser.version)==6&&(c.theme="light_square"),a(".pp_overlay").size()==0&&z();var d=!0,e=!1,f,g,h,i,j,k,l,m,n=a(window).height(),o=a(window).width(),p=0,q=x();a(window).scroll(function(){q=x(),w(),y()}),a(window).resize(function(){w(),y()}),a(document).keydown(function(b){if(g.is(":visible"))switch(b.keyCode){case 37:a.prettyPhoto.changePage("previous");break;case 39:a.prettyPhoto.changePage("next");break;case 27:c.modal||a.prettyPhoto.close()}}),a(this).each(function(){a(this).bind("click",function(){_self=this,theRel=a(this).attr("rel"),galleryRegExp=/\[(?:.*)\]/,theGallery=galleryRegExp.exec(theRel);var b=[],c=[],d=[];theGallery?a("a[rel*="+theGallery+"]").each(function(e){a(this)[0]===a(_self)[0]&&(p=e),b.push(a(this).attr("href")),c.push(a(this).find("img").attr("alt")),d.push(a(this).attr("title"))}):(b=a(this).attr("href"),c=a(this).find("img").attr("alt")?a(this).find("img").attr("alt"):"",d=a(this).attr("title")?a(this).attr("title"):""),a.prettyPhoto.open(b,c,d);return!1})}),a.prettyPhoto.open=function(d,j,k){a.browser.msie&&a.browser.version==6&&a("select").css("visibility","hidden"),c.hideflash&&a("object,embed").css("visibility","hidden"),images=a.makeArray(d),titles=a.makeArray(j),descriptions=a.makeArray(k),image_set=a(images).size()>0?!0:!1,s(a(images).size()),a(".pp_loaderIcon").show(),i.show().fadeTo(c.animationSpeed,c.opacity),g.find(".currentTextHolder").text(p+1+c.counter_separator_label+a(images).size()),descriptions[p]?g.find(".pp_description").show().html(unescape(descriptions[p])):g.find(".pp_description").hide().text(""),titles[p]&&c.showTitle?(hasTitle=!0,h.html(unescape(titles[p]))):hasTitle=!1,movie_width=parseFloat(b("width",images[p]))?b("width",images[p]):c.default_width.toString(),movie_height=parseFloat(b("height",images[p]))?b("height",images[p]):c.default_height.toString();if(movie_width.indexOf("%")!=-1||movie_height.indexOf("%")!=-1)movie_height=parseFloat(a(window).height()*parseFloat(movie_height)/100-100),movie_width=parseFloat(a(window).width()*parseFloat(movie_width)/100-100),e=!0;g.fadeIn(function(){imgPreloader="";switch(v(images[p])){case"image":imgPreloader=new Image,nextImage=new Image,image_set&&p>a(images).size()&&(nextImage.src=images[p+1]),prevImage=new Image,image_set&&images[p-1]&&(prevImage.src=images[p-1]),g.find("#pp_full_res")[0].innerHTML=c.image_markup,g.find("#fullResImage").attr("src",images[p]),imgPreloader.onload=function(){f=t(imgPreloader.width,imgPreloader.height),_showContent()},imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist."),a.prettyPhoto.close()},imgPreloader.src=images[p];break;case"youtube":f=t(movie_width,movie_height),movie="http://www.youtube.com/v/"+b("v",images[p]),c.autoplay&&(movie+="&autoplay=1"),toInject=c.flash_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,c.wmode).replace(/{path}/g,movie);break;case"vimeo":f=t(movie_width,movie_height),movie_id=images[p],movie="http://vimeo.com/moogaloop.swf?clip_id="+movie_id.replace("http://vimeo.com/",""),c.autoplay&&(movie+="&autoplay=1"),toInject=c.flash_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,c.wmode).replace(/{path}/g,movie);break;case"quicktime":f=t(movie_width,movie_height),f.height+=15,f.contentHeight+=15,f.containerHeight+=15,toInject=c.quicktime_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,c.wmode).replace(/{path}/g,images[p]).replace(/{autoplay}/g,c.autoplay);break;case"flash":f=t(movie_width,movie_height),flash_vars=images[p],flash_vars=flash_vars.substring(images[p].indexOf("flashvars")+10,images[p].length),filename=images[p],filename=filename.substring(0,filename.indexOf("?")),toInject=c.flash_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,c.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":f=t(movie_width,movie_height),frame_url=images[p],frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1),toInject=c.iframe_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{path}/g,frame_url);break;case"inline":myClone=a(images[p]).clone().css({width:c.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline clearfix"></div></div>').appendTo(a("body")),f=t(a(myClone).width(),a(myClone).height()),a(myClone).remove(),toInject=c.inline_markup.replace(/{content}/g,a(images[p]).html())}imgPreloader||(g.find("#pp_full_res")[0].innerHTML=toInject,_showContent())})},a.prettyPhoto.changePage=function(b){if(b=="previous"){p--;if(p<0){p=0;return}}else{if(a(".pp_arrow_next").is(".disabled"))return;p++}d||(d=!0),r(function(){a.prettyPhoto.open(images,titles,descriptions)}),a("a.pp_expand,a.pp_contract").fadeOut(c.animationSpeed)},a.prettyPhoto.close=function(){g.find("object,embed").css("visibility","hidden"),a("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(c.animationSpeed),i.fadeOut(c.animationSpeed,function(){a("#pp_full_res").html(""),g.attr("style","").find("div:not(.pp_hoverContainer)").attr("style",""),w(),a.browser.msie&&a.browser.version==6&&a("select").css("visibility","visible"),c.hideflash&&a("object,embed").css("visibility","visible"),p=0,c.callback()}),d=!0},_showContent=function(){a(".pp_loaderIcon").hide(),projectedTop=q.scrollTop+(n/2-f.containerHeight/2),projectedTop<0&&(projectedTop=0+h.height()),g.find(".pp_content").animate({height:f.contentHeight},c.animationSpeed),g.animate({top:projectedTop,left:o/2-f.containerWidth/2,width:f.containerWidth},c.animationSpeed,function(){g.find(".pp_hoverContainer,#fullResImage").height(f.height).width(f.width),g.find(".pp_fade").fadeIn(c.animationSpeed),image_set&&v(images[p])=="image"?g.find(".pp_hoverContainer").show():g.find(".pp_hoverContainer").hide(),c.showTitle&&hasTitle&&(h.css({top:g.offset().top-25,left:g.offset().left+20,display:"none"}),h.fadeIn(c.animationSpeed)),f.resized&&a("a.pp_expand,a.pp_contract").fadeIn(c.animationSpeed),c.changepicturecallback()})},w()}}(jQuery),function(a){function o(b){function d(b){for(;b&&b.nodeName.toLowerCase()!="html";b=b.parentNode){var d=a.css(b,"background-color");if(d.indexOf("rgb")>=0){var e=d.match(/\d+/g);return"#"+c(e[0])+c(e[1])+c(e[2])}if(d&&d!="transparent")return d}return"#ffffff"}function c(a){a=parseInt(a).toString(16);return a.length<2?"0"+a:a}b.each(function(){a(this).css("background-color",d(this))})}function n(b,c){var d=a(c.pager);a.each(b,function(e,f){a.fn.cycle.createPagerAnchor(e,f,d,b,c)}),a.fn.cycle.updateActivePagerLink(c.pager,c.startingSlide)}function m(b,c){var d=b.elements,e=b.$cont[0],f=e.cycleTimeout;f&&(clearTimeout(f),e.cycleTimeout=0);if(b.random&&c<0)b.randomIndex--,--b.randomIndex==-2?b.randomIndex=d.length-2:b.randomIndex==-1&&(b.randomIndex=d.length-1),b.nextSlide=b.randomMap[b.randomIndex];else if(b.random)++b.randomIndex==d.length&&(b.randomIndex=0),b.nextSlide=b.randomMap[b.randomIndex];else{b.nextSlide=b.currSlide+c;if(b.nextSlide<0){if(b.nowrap)return!1;b.nextSlide=d.length-1}else if(b.nextSlide>=d.length){if(b.nowrap)return!1;b.nextSlide=0}}a.isFunction(b.prevNextClick)&&b.prevNextClick(c>0,b.nextSlide,d[b.nextSlide]),k(d,b,1,c>=0);return!1}function l(a,b,d,e){if(d.timeoutFn){var f=d.timeoutFn(a,b,d,e);while(f-d.speed<250)f+=d.speed;c("calculated timeout: "+f+"; speed: "+d.speed);if(f!==!1)return f}return d.timeout}function k(b,c,d,e){d&&c.busy&&c.manualTrump&&(a(b).stop(!0,!0),c.busy=!1);if(!c.busy){var f=c.$cont[0],g=b[c.currSlide],h=b[c.nextSlide];if(f.cycleStop!=c.stopCount||f.cycleTimeout===0&&!d)return;if(!d&&!f.cyclePause&&(c.autostop&&--c.countdown<=0||c.nowrap&&!c.random&&c.nextSlide<c.currSlide)){c.end&&c.end(c);return}if(d||!f.cyclePause){var i=c.fx;g.cycleH=g.cycleH||a(g).height(),g.cycleW=g.cycleW||a(g).width(),h.cycleH=h.cycleH||a(h).height(),h.cycleW=h.cycleW||a(h).width();if(c.multiFx){if(c.lastFx==undefined||++c.lastFx>=c.fxs.length)c.lastFx=0;i=c.fxs[c.lastFx],c.currFx=i}c.oneTimeFx&&(i=c.oneTimeFx,c.oneTimeFx=null),a.fn.cycle.resetState(c,i),c.before.length&&a.each(c.before,function(a,b){f.cycleStop==c.stopCount&&b.apply(h,[g,h,c,e])});var j=function(){a.each(c.after,function(a,b){f.cycleStop==c.stopCount&&b.apply(h,[g,h,c,e])})};c.nextSlide!=c.currSlide&&(c.busy=1,c.fxFn?c.fxFn(g,h,c,j,e):a.isFunction(a.fn.cycle[c.fx])?a.fn.cycle[c.fx](g,h,c,j):a.fn.cycle.custom(g,h,c,j,d&&c.fastOnEvent)),c.lastSlide=c.currSlide;if(c.random)c.currSlide=c.nextSlide,++c.randomIndex==b.length&&(c.randomIndex=0),c.nextSlide=c.randomMap[c.randomIndex];else{var m=c.nextSlide+1==b.length;c.nextSlide=m?0:c.nextSlide+1,c.currSlide=m?b.length-1:c.nextSlide-1}c.pager&&a.fn.cycle.updateActivePagerLink(c.pager,c.currSlide)}var n=0;c.timeout&&!c.continuous?n=l(g,h,c,e):c.continuous&&f.cyclePause&&(n=10),n>0&&(f.cycleTimeout=setTimeout(function(){k(b,c,0,!c.rev)},n))}}function j(b,c){b.addSlide=function(d,e){var f=a(d),g=f[0];b.autostopCount||b.countdown++,c[e?"unshift":"push"](g),b.els&&b.els[e?"unshift":"push"](g),b.slideCount=c.length,f.css("position","absolute"),f[e?"prependTo":"appendTo"](b.$cont),e&&(b.currSlide++,b.nextSlide++),!a.support.opacity&&b.cleartype&&!b.cleartypeNoBg&&o(f),b.fit&&b.width&&f.width(b.width),b.fit&&b.height&&b.height!="auto"&&$slides.height(b.height),g.cycleH=b.fit&&b.height?b.height:f.height(),g.cycleW=b.fit&&b.width?b.width:f.width(),f.css(b.cssBefore),b.pager&&a.fn.cycle.createPagerAnchor(c.length-1,g,a(b.pager),c,b),a.isFunction(b.onAddSlide)?b.onAddSlide(f):f.hide()}}function i(b){var e,f,g=a.fn.cycle.transitions;if(b.fx.indexOf(",")>0){b.multiFx=!0,b.fxs=b.fx.replace(/\s*/g,"").split(",");for(e=0;e<b.fxs.length;e++){var h=b.fxs[e];f=g[h];if(!f||!g.hasOwnProperty(h)||!a.isFunction(f))d("discarding unknown transition: ",h),b.fxs.splice(e,1),e--}if(!b.fxs.length){d("No valid transitions named; slideshow terminating.");return!1}}else if(b.fx=="all"){b.multiFx=!0,b.fxs=[];for(p in g)f=g[p],g.hasOwnProperty(p)&&a.isFunction(f)&&b.fxs.push(p)}if(b.multiFx&&b.randomizeEffects){var i=Math.floor(Math.random()*20)+30;for(e=0;e<i;e++){var j=Math.floor(Math.random()*b.fxs.length);b.fxs.push(b.fxs.splice(j,1)[0])}c("randomized fx sequence: ",b.fxs)}return!0}function h(b){b.original={before:[],after:[]},b.original.cssBefore=a.extend({},b.cssBefore),b.original.cssAfter=a.extend({},b.cssAfter),b.original.animIn=a.extend({},b.animIn),b.original.animOut=a.extend({},b.animOut),a.each(b.before,function(){b.original.before.push(this)}),a.each(b.after,function(){b.original.after.push(this)})}function g(b,c,e,g,l){var p=a.extend({},a.fn.cycle.defaults,g||{},a.metadata?b.metadata():a.meta?b.data():{});p.autostop&&(p.countdown=p.autostopCount||e.length);var q=b[0];b.data("cycle.opts",p),p.$cont=b,p.stopCount=q.cycleStop,p.elements=e,p.before=p.before?[p.before]:[],p.after=p.after?[p.after]:[],p.after.unshift(function(){p.busy=0}),!a.support.opacity&&p.cleartype&&p.after.push(function(){f(this,p)}),p.continuous&&p.after.push(function(){k(e,p,0,!p.rev)}),h(p),!a.support.opacity&&p.cleartype&&!p.cleartypeNoBg&&o(c),b.css("position")=="static"&&b.css("position","relative"),p.width&&b.width(p.width),p.height&&p.height!="auto"&&b.height(p.height),p.startingSlide&&(p.startingSlide=parseInt(p.startingSlide));if(p.random){p.randomMap=[];for(var r=0;r<e.length;r++)p.randomMap.push(r);p.randomMap.sort(function(a,b){return Math.random()-.5}),p.randomIndex=0,p.startingSlide=p.randomMap[0]}else p.startingSlide>=e.length&&(p.startingSlide=0);p.currSlide=p.startingSlide=p.startingSlide||0;var s=p.startingSlide;c.css({position:"absolute",top:0,left:0}).hide().each(function(b){var c=s?b>=s?e.length-(b-s):s-b:e.length-b;a(this).css("z-index",c)}),a(e[s]).css("opacity",1).show(),f(e[s],p),p.fit&&p.width&&c.width(p.width),p.fit&&p.height&&p.height!="auto"&&c.height(p.height);var t=p.containerResize&&!b.innerHeight();if(t){var u=0,v=0;for(var w=0;w<e.length;w++){var x=a(e[w]),y=x[0],z=x.outerWidth(),A=x.outerHeight();z||(z=y.offsetWidth),A||(A=y.offsetHeight),u=z>u?z:u,v=A>v?A:v}u>0&&v>0&&b.css({width:u+"px",height:v+"px"})}p.pause&&b.hover(function(){this.cyclePause++},function(){this.cyclePause--});if(i(p)===!1)return!1;var B=!1;g.requeueAttempts=g.requeueAttempts||0,c.each(function(){var b=a(this);this.cycleH=p.fit&&p.height?p.height:b.height(),this.cycleW=p.fit&&p.width?p.width:b.width();if(b.is("img")){var c=a.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete,e=a.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete,f=a.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete,h=this.cycleH==0&&this.cycleW==0&&!this.complete;if(c||e||f||h){if(l.s&&p.requeueOnImageNotLoaded&&++g.requeueAttempts<100){d(g.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH),setTimeout(function(){a(l.s,l.c).cycle(g)},p.requeueTimeout),B=!0;return!1}d("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}return!0});if(B)return!1;p.cssBefore=p.cssBefore||{},p.animIn=p.animIn||{},p.animOut=p.animOut||{},c.not(":eq("+s+")").css(p.cssBefore),p.cssFirst&&a(c[s]).css(p.cssFirst);if(p.timeout){p.timeout=parseInt(p.timeout),p.speed.constructor==String&&(p.speed=a.fx.speeds[p.speed]||parseInt(p.speed)),p.sync||(p.speed=p.speed/2);while(p.timeout-p.speed<250)p.timeout+=p.speed}p.easing&&(p.easeIn=p.easeOut=p.easing),p.speedIn||(p.speedIn=p.speed),p.speedOut||(p.speedOut=p.speed),p.slideCount=e.length,p.currSlide=p.lastSlide=s,p.random?(p.nextSlide=p.currSlide,++p.randomIndex==e.length&&(p.randomIndex=0),p.nextSlide=p.randomMap[p.randomIndex]):p.nextSlide=p.startingSlide>=e.length-1?0:p.startingSlide+1;if(!p.multiFx){var C=a.fn.cycle.transitions[p.fx];if(a.isFunction(C))C(b,c,p);else if(p.fx!="custom"&&!p.multiFx){d("unknown transition: "+p.fx,"; slideshow terminating");return!1}}var D=c[s];p.before.length&&p.before[0].apply(D,[D,D,p,!0]),p.after.length>1&&p.after[1].apply(D,[D,D,p,!0]),p.next&&a(p.next).bind(p.prevNextEvent,function(){return m(p,p.rev?-1:1)}),p.prev&&a(p.prev).bind(p.prevNextEvent,function(){return m(p,p.rev?1:-1)}),p.pager&&n(e,p),j(p,e);return p}function f(b,c){if(!a.support.opacity&&c.cleartype&&b.style.filter)try{b.style.removeAttribute("filter")}catch(d){}}function e(b,c,e){b.cycleStop==undefined&&(b.cycleStop=0);if(c===undefined||c===null)c={};if(c.constructor==String){switch(c){case"stop":b.cycleStop++,b.cycleTimeout&&clearTimeout(b.cycleTimeout),b.cycleTimeout=0,a(b).removeData("cycle.opts");return!1;case"pause":b.cyclePause=1;return!1;case"resume":b.cyclePause=0;if(e===!0){c=a(b).data("cycle.opts");if(!c){d("options not found, can not resume");return!1}b.cycleTimeout&&(clearTimeout(b.cycleTimeout),b.cycleTimeout=0),k(c.elements,c,1,1)}return!1;case"prev":case"next":var f=a(b).data("cycle.opts");if(!f){d('options not found, "prev/next" ignored');return!1}a.fn.cycle[c](f);return!1;default:c={fx:c}}return c}if(c.constructor==Number){var g=c;c=a(b).data("cycle.opts");if(!c){d("options not found, can not advance slide");return!1}if(g<0||g>=c.elements.length){d("invalid slide index: "+g);return!1}c.nextSlide=g,b.cycleTimeout&&(clearTimeout(b.cycleTimeout),b.cycleTimeout=0),typeof e=="string"&&(c.oneTimeFx=e),k(c.elements,c,1,g>=c.currSlide);return!1}return c}function d(){window.console&&window.console.log&&window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function c(b){a.fn.cycle.debug&&d(b)}var b="2.72";a.support==undefined&&(a.support={opacity:!a.browser.msie}),a.fn.cycle=function(b,f){var h={s:this.selector,c:this.context};if(this.length===0&&b!="stop"){if(!a.isReady&&h.s){d("DOM not ready, queuing slideshow"),a(function(){a(h.s,h.c).cycle(b,f)});return this}d("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var i=e(this,b,f);if(i!==!1){this.cycleTimeout&&clearTimeout(this.cycleTimeout),this.cycleTimeout=this.cyclePause=0;var j=a(this),m=i.slideExpr?a(i.slideExpr,this):j.children(),n=m.get();if(n.length<2){d("terminating; too few slides: "+n.length);return}var o=g(j,m,n,i,h);if(o===!1)return;var p=o.continuous?10:l(o.currSlide,o.nextSlide,o,!o.rev);p&&(p+=o.delay||0,p<10&&(p=10),c("first timeout: "+p),this.cycleTimeout=setTimeout(function(){k(n,o,0,!o.rev)},p))}})},a.fn.cycle.resetState=function(b,c){c=c||b.fx,b.before=[],b.after=[],b.cssBefore=a.extend({},b.original.cssBefore),b.cssAfter=a.extend({},b.original.cssAfter),b.animIn=a.extend({},b.original.animIn),b.animOut=a.extend({},b.original.animOut)
,b.fxFn=null,a.each(b.original.before,function(){b.before.push(this)}),a.each(b.original.after,function(){b.after.push(this)});var d=a.fn.cycle.transitions[c];a.isFunction(d)&&d(b.$cont,a(b.elements),b)},a.fn.cycle.updateActivePagerLink=function(b,c){a(b).find("a").removeClass("activeSlide").filter("a:eq("+c+")").addClass("activeSlide")},a.fn.cycle.next=function(a){m(a,a.rev?-1:1)},a.fn.cycle.prev=function(a){m(a,a.rev?1:-1)},a.fn.cycle.createPagerAnchor=function(b,c,d,e,f){var g;a.isFunction(f.pagerAnchorBuilder)?g=f.pagerAnchorBuilder(b,c):g='<a href="#">'+(b+1)+"</a>";if(!!g){var h=a(g);if(h.parents("body").length===0){var i=[];d.length>1?(d.each(function(){var b=h.clone(!0);a(this).append(b),i.push(b)}),h=a(i)):h.appendTo(d)}h.bind(f.pagerEvent,function(c){c.preventDefault(),f.nextSlide=b;var d=f.$cont[0],g=d.cycleTimeout;g&&(clearTimeout(g),d.cycleTimeout=0),a.isFunction(f.pagerClick)&&f.pagerClick(f.nextSlide,e[f.nextSlide]),k(e,f,1,f.currSlide<b);return!1}),f.pagerEvent!="click"&&h.click(function(){return!1}),f.pauseOnPagerHover&&h.hover(function(){f.$cont[0].cyclePause++},function(){f.$cont[0].cyclePause--})}},a.fn.cycle.hopsFromLast=function(a,b){var c,d=a.lastSlide,e=a.currSlide;b?c=e>d?e-d:a.slideCount-d:c=e<d?d-e:d+a.slideCount-e;return c},a.fn.cycle.commonReset=function(b,c,d,e,f,g){a(d.elements).not(b).hide(),d.cssBefore.opacity=1,d.cssBefore.display="block",e!==!1&&c.cycleW>0&&(d.cssBefore.width=c.cycleW),f!==!1&&c.cycleH>0&&(d.cssBefore.height=c.cycleH),d.cssAfter=d.cssAfter||{},d.cssAfter.display="none",a(b).css("zIndex",d.slideCount+(g===!0?1:0)),a(c).css("zIndex",d.slideCount+(g===!0?0:1))},a.fn.cycle.custom=function(b,c,d,e,f){var g=a(b),h=a(c),i=d.speedIn,j=d.speedOut,k=d.easeIn,l=d.easeOut;h.css(d.cssBefore),f&&(typeof f=="number"?i=j=f:i=j=1,k=l=null);var m=function(){h.animate(d.animIn,i,k,e)};g.animate(d.animOut,j,l,function(){d.cssAfter&&g.css(d.cssAfter),d.sync||m()}),d.sync&&m()},a.fn.cycle.transitions={fade:function(b,c,d){c.not(":eq("+d.currSlide+")").css("opacity",0),d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d),d.cssBefore.opacity=0}),d.animIn={opacity:1},d.animOut={opacity:0},d.cssBefore={top:0,left:0}}},a.fn.cycle.ver=function(){return b},a.fn.cycle.defaults={fx:"fade",timeout:4e3,timeoutFn:null,continuous:0,speed:1e3,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,prevNextEvent:"click",pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!a.support.opacity,cleartypeNoBg:!0,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:!0,requeueOnImageNotLoaded:!0,requeueTimeout:250}}(jQuery),function(a){a.fn.cycle.transitions.none=function(b,c,d){d.fxFn=function(b,c,d,e){a(c).show(),a(b).hide(),e()}},a.fn.cycle.transitions.scrollUp=function(b,c,d){b.css("overflow","hidden"),d.before.push(a.fn.cycle.commonReset);var e=b.height();d.cssBefore={top:e,left:0},d.cssFirst={top:0},d.animIn={top:0},d.animOut={top:-e}},a.fn.cycle.transitions.scrollDown=function(b,c,d){b.css("overflow","hidden"),d.before.push(a.fn.cycle.commonReset);var e=b.height();d.cssFirst={top:0},d.cssBefore={top:-e,left:0},d.animIn={top:0},d.animOut={top:e}},a.fn.cycle.transitions.scrollLeft=function(b,c,d){b.css("overflow","hidden"),d.before.push(a.fn.cycle.commonReset);var e=b.width();d.cssFirst={left:0},d.cssBefore={left:e,top:0},d.animIn={left:0},d.animOut={left:0-e}},a.fn.cycle.transitions.scrollRight=function(b,c,d){b.css("overflow","hidden"),d.before.push(a.fn.cycle.commonReset);var e=b.width();d.cssFirst={left:0},d.cssBefore={left:-e,top:0},d.animIn={left:0},d.animOut={left:e}},a.fn.cycle.transitions.scrollHorz=function(b,c,d){b.css("overflow","hidden").width(),d.before.push(function(b,c,d,e){a.fn.cycle.commonReset(b,c,d),d.cssBefore.left=e?c.cycleW-1:1-c.cycleW,d.animOut.left=e?-b.cycleW:b.cycleW}),d.cssFirst={left:0},d.cssBefore={top:0},d.animIn={left:0},d.animOut={top:0}},a.fn.cycle.transitions.scrollVert=function(b,c,d){b.css("overflow","hidden"),d.before.push(function(b,c,d,e){a.fn.cycle.commonReset(b,c,d),d.cssBefore.top=e?1-c.cycleH:c.cycleH-1,d.animOut.top=e?b.cycleH:-b.cycleH}),d.cssFirst={top:0},d.cssBefore={left:0},d.animIn={top:0},d.animOut={left:0}},a.fn.cycle.transitions.slideX=function(b,c,d){d.before.push(function(b,c,d){a(d.elements).not(b).hide(),a.fn.cycle.commonReset(b,c,d,!1,!0),d.animIn.width=c.cycleW}),d.cssBefore={left:0,top:0,width:0},d.animIn={width:"show"},d.animOut={width:0}},a.fn.cycle.transitions.slideY=function(b,c,d){d.before.push(function(b,c,d){a(d.elements).not(b).hide(),a.fn.cycle.commonReset(b,c,d,!0,!1),d.animIn.height=c.cycleH}),d.cssBefore={left:0,top:0,height:0},d.animIn={height:"show"},d.animOut={height:0}},a.fn.cycle.transitions.shuffle=function(b,c,d){var e,f=b.css("overflow","visible").width();c.css({left:0,top:0}),d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!0,!0,!0)}),d.speedAdjusted||(d.speed=d.speed/2,d.speedAdjusted=!0),d.random=0,d.shuffle=d.shuffle||{left:-f,top:15},d.els=[];for(e=0;e<c.length;e++)d.els.push(c[e]);for(e=0;e<d.currSlide;e++)d.els.push(d.els.shift());d.fxFn=function(b,c,d,e,f){var g=f?a(b):a(c);a(c).css(d.cssBefore);var h=d.slideCount;g.animate(d.shuffle,d.speedIn,d.easeIn,function(){var c=a.fn.cycle.hopsFromLast(d,f);for(var i=0;i<c;i++)f?d.els.push(d.els.shift()):d.els.unshift(d.els.pop());if(f)for(var j=0,k=d.els.length;j<k;j++)a(d.els[j]).css("z-index",k-j+h);else{var l=a(b).css("z-index");g.css("z-index",parseInt(l)+1+h)}g.animate({left:0,top:0},d.speedOut,d.easeOut,function(){a(f?this:b).hide(),e&&e()})})},d.cssBefore={display:"block",opacity:1,top:0,left:0}},a.fn.cycle.transitions.turnUp=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!0,!1),d.cssBefore.top=c.cycleH,d.animIn.height=c.cycleH}),d.cssFirst={top:0},d.cssBefore={left:0,height:0},d.animIn={top:0},d.animOut={height:0}},a.fn.cycle.transitions.turnDown=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!0,!1),d.animIn.height=c.cycleH,d.animOut.top=b.cycleH}),d.cssFirst={top:0},d.cssBefore={left:0,top:0,height:0},d.animOut={height:0}},a.fn.cycle.transitions.turnLeft=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!1,!0),d.cssBefore.left=c.cycleW,d.animIn.width=c.cycleW}),d.cssBefore={top:0,width:0},d.animIn={left:0},d.animOut={width:0}},a.fn.cycle.transitions.turnRight=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!1,!0),d.animIn.width=c.cycleW,d.animOut.left=b.cycleW}),d.cssBefore={top:0,left:0,width:0},d.animIn={left:0},d.animOut={width:0}},a.fn.cycle.transitions.zoom=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!1,!1,!0),d.cssBefore.top=c.cycleH/2,d.cssBefore.left=c.cycleW/2,d.animIn={top:0,left:0,width:c.cycleW,height:c.cycleH},d.animOut={width:0,height:0,top:b.cycleH/2,left:b.cycleW/2}}),d.cssFirst={top:0,left:0},d.cssBefore={width:0,height:0}},a.fn.cycle.transitions.fadeZoom=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!1,!1),d.cssBefore.left=c.cycleW/2,d.cssBefore.top=c.cycleH/2,d.animIn={top:0,left:0,width:c.cycleW,height:c.cycleH}}),d.cssBefore={width:0,height:0},d.animOut={opacity:0}},a.fn.cycle.transitions.blindX=function(b,c,d){var e=b.css("overflow","hidden").width();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d),d.animIn.width=c.cycleW,d.animOut.left=b.cycleW}),d.cssBefore={left:e,top:0},d.animIn={left:0},d.animOut={left:e}},a.fn.cycle.transitions.blindY=function(b,c,d){var e=b.css("overflow","hidden").height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d),d.animIn.height=c.cycleH,d.animOut.top=b.cycleH}),d.cssBefore={top:e,left:0},d.animIn={top:0},d.animOut={top:e}},a.fn.cycle.transitions.blindZ=function(b,c,d){var e=b.css("overflow","hidden").height(),f=b.width();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d),d.animIn.height=c.cycleH,d.animOut.top=b.cycleH}),d.cssBefore={top:e,left:f},d.animIn={top:0,left:0},d.animOut={top:e,left:f}},a.fn.cycle.transitions.growX=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!1,!0),d.cssBefore.left=this.cycleW/2,d.animIn={left:0,width:this.cycleW},d.animOut={left:0}}),d.cssBefore={width:0,top:0}},a.fn.cycle.transitions.growY=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!0,!1),d.cssBefore.top=this.cycleH/2,d.animIn={top:0,height:this.cycleH},d.animOut={top:0}}),d.cssBefore={height:0,left:0}},a.fn.cycle.transitions.curtainX=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!1,!0,!0),d.cssBefore.left=c.cycleW/2,d.animIn={left:0,width:this.cycleW},d.animOut={left:b.cycleW/2,width:0}}),d.cssBefore={top:0,width:0}},a.fn.cycle.transitions.curtainY=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!0,!1,!0),d.cssBefore.top=c.cycleH/2,d.animIn={top:0,height:c.cycleH},d.animOut={top:b.cycleH/2,height:0}}),d.cssBefore={left:0,height:0}},a.fn.cycle.transitions.cover=function(b,c,d){var e=d.direction||"left",f=b.css("overflow","hidden").width(),g=b.height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d),e=="right"?d.cssBefore.left=-f:e=="up"?d.cssBefore.top=g:e=="down"?d.cssBefore.top=-g:d.cssBefore.left=f}),d.animIn={left:0,top:0},d.animOut={opacity:1},d.cssBefore={top:0,left:0}},a.fn.cycle.transitions.uncover=function(b,c,d){var e=d.direction||"left",f=b.css("overflow","hidden").width(),g=b.height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!0,!0,!0),e=="right"?d.animOut.left=f:e=="up"?d.animOut.top=-g:e=="down"?d.animOut.top=g:d.animOut.left=-f}),d.animIn={left:0,top:0},d.animOut={opacity:1},d.cssBefore={top:0,left:0}},a.fn.cycle.transitions.toss=function(b,c,d){var e=b.css("overflow","visible").width(),f=b.height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,!0,!0,!0),!d.animOut.left&&!d.animOut.top?d.animOut={left:e*2,top:-f/2,opacity:0}:d.animOut.opacity=0}),d.cssBefore={left:0,top:0},d.animIn={left:0}},a.fn.cycle.transitions.wipe=function(b,c,d){var e=b.css("overflow","hidden").width(),f=b.height();d.cssBefore=d.cssBefore||{};var g;if(d.clip)if(/l2r/.test(d.clip))g="rect(0px 0px "+f+"px 0px)";else if(/r2l/.test(d.clip))g="rect(0px "+e+"px "+f+"px "+e+"px)";else if(/t2b/.test(d.clip))g="rect(0px "+e+"px 0px 0px)";else if(/b2t/.test(d.clip))g="rect("+f+"px "+e+"px "+f+"px 0px)";else if(/zoom/.test(d.clip)){var h=parseInt(f/2),i=parseInt(e/2);g="rect("+h+"px "+i+"px "+h+"px "+i+"px)"}d.cssBefore.clip=d.cssBefore.clip||g||"rect(0px 0px 0px 0px)";var j=d.cssBefore.clip.match(/(\d+)/g),k=parseInt(j[0]),l=parseInt(j[1]),m=parseInt(j[2]),n=parseInt(j[3]);d.before.push(function(b,c,d){if(b!=c){var g=a(b),h=a(c);a.fn.cycle.commonReset(b,c,d,!0,!0,!1),d.cssAfter.display="block";var i=1,j=parseInt(d.speedIn/13)-1;(function a(){var b=k?k-parseInt(i*(k/j)):0,c=n?n-parseInt(i*(n/j)):0,d=m<f?m+parseInt(i*((f-m)/j||1)):f,o=l<e?l+parseInt(i*((e-l)/j||1)):e;h.css({clip:"rect("+b+"px "+o+"px "+d+"px "+c+"px)"}),i++<=j?setTimeout(a,13):g.css("display","none")})()}}),d.cssBefore={display:"block",opacity:1,top:0,left:0},d.animIn={left:0},d.animOut={left:0}}}(jQuery),$(document).ready(function(){function a(a){var b=jQuery;b("#loader").fadeIn();var d=b(a).serialize(),e=b("#Note");b.ajax({type:"POST",url:"send.php",data:d,success:function(a){e.height()?e.fadeIn("fast",function(){b(this).hide()}):e.hide(),b("#LoadingGraphic").fadeOut("fast",function(){a==="success"&&b(".field").animate({opacity:0},"fast"),result="",c="",a==="success"&&(result="Your message has been sent. Thank you!",c="success"),e.removeClass("success").removeClass("error").text("");var d=setInterval(function(){e.is(":visible")||(e.html(result).addClass(c).slideDown("fast"),clearInterval(d))},40)})}});return!1}jQuery(".ambitios_slider").fadeIn(300),$("#s4").length&&($.fn.cycle.defaults.timeout=6e3,$(function(){$("#s4").before('<div id="nav" class="nav">').cycle({fx:"fade",speed:"slow",autostopCount:4,autostop:4,timeout:6e3,pager:"#nav"})})),$("#featureCarousel").length&&$(document).ready(function(){$("#featureCarousel").featureCarousel({})}),$.fn.equalHeight=function(){var a=this;$(window).bind("resize",function(){var b=0;$(a).height("auto").each(function(){b=Math.max(b,$(this).height())}).height(b)}).trigger("resize")},$(".ambitios_lightbox_image").length&&$("a[rel^='prettyPhoto']").prettyPhoto({theme:"facebook"}),$(".ambitios_lightbox_image").append("<span></span>"),$(".ambitios_lightbox_image").hover(function(){$(this).find("img").stop().animate({opacity:.5},"normal")},function(){$(this).find("img").stop().animate({opacity:1},"normal")}),$(".ambitios_lightbox_video").append("<span></span>"),$(".ambitios_lightbox_video").hover(function(){$(this).find("img").stop().animate({opacity:.5},"normal")},function(){$(this).find("img").stop().animate({opacity:1},"normal")}),$("#toc a").click(function(){$.scrollTo(this.hash,1500),$(this.hash).find("#options-examples").text(this.title);return!1}),$(".ambitios_height").equalHeight(),jQuery("ul.ambitios_menu").superfish(),$("#contactform").length&&jQuery("#contactform").validate({submitHandler:function(b){a(b);return!1},messages:{formname:"Please specify your name.",formcomments:"Please enter your message.",formemail:{required:"We need your email address to contact you.",email:"Your email address must be in the format of name@domain.com"}}})}),$(document).ready(function(){function a(a){var b=jQuery;b("#loader2").fadeIn();var d=b(a).serialize(),e=b("#Note2");b.ajax({type:"POST",url:"send.php",data:d,success:function(a){e.height()?e.fadeIn("fast",function(){b(this).hide()}):e.hide(),b("#LoadingGraphic2").fadeOut("fast",function(){a==="success"&&(b(".field2").animate({opacity:0},"fast"),b(".ambitios_input").animate({opacity:0},"fast")),result="",c="",a==="success"&&(result="Your message has been sent. Thank you!",c="success"),e.removeClass("success").removeClass("error").text("");var d=setInterval(function(){e.is(":visible")||(e.html(result).addClass(c).slideDown("fast"),clearInterval(d))},40)})}});return!1}$("#contactform2").length&&jQuery("#contactform2").validate({submitHandler:function(b){a(b);return!1},messages:{formname:"Please specify your name.",formcomments:"Please enter your message.",formemail:{required:"We need your email address to contact you.",email:"Your email address must be in the format of name@domain.com"}}})});
