$(document).ready(function(){$("p.emailise").each(function(){$(this).html($(this).html().replace(/([a-z0-9-_]+@[a-z0-9-_.]+)/ig,'<a href="mailto:$1">$1</a>'))}),$("img#mainlogo").click(function(){document.location="/"}),$("ul#bigmenu li").each(function(){var a;a=$(this).find("a").attr("href"),$(this).click(function(){document.location=a})}),$("div#slideshow").slideshow(),soundManager.url="/swf/",soundManager.flashVersion=9,soundManager.useFlashBlock=!1,soundManager.onload=function(){soundManager.createSound({id:"cameraclick",url:"/sounds/camera-click-1.mp3",autoLoad:!0,autoPlay:!1,volume:50})}}),function(a){var b=function(b){var c=this;this.arraySlides=new Array,this.container=b,this.leftClicker=b.find("#leftclicker"),this.rightClicker=b.find("#rightclicker"),this.viewFrame=b.find("#viewframe"),this.imageRow=this.viewFrame.find("#imagerow"),this.imageRow.children().each(function(){c.arraySlides.push(a(this))}),this.slideWidth=this.imageRow.find("img").width(),this.slideHeight=this.imageRow.find("img").height(),this.currentSlide=0;if(this.arraySlides.length){var d;this.imageRow.width(this.slideWidth*(this.arraySlides.length+2)),this.imageRow.prepend('<div class="slide">'+this.arraySlides[this.arraySlides.length-1].html()+"</div>"),this.imageRow.append('<div class="slide">'+this.arraySlides[0].html()+"</div>"),this.imageRow.css("marginLeft",-this.slideWidth+"px")}};b.prototype.bind=function(){var a=this;if(this.arraySlides.length==0)return;this.leftClicker.click(function(){a.previous()}),this.rightClicker.click(function(){a.next()})},b.prototype.next=function(){var a=this,b;this.currentSlide++,b=-((this.currentSlide+1)*this.slideWidth),this.currentSlide==this.arraySlides.length?(this.imageRow.animate({marginLeft:b+"px"},"slow",function(){a.imageRow.css("marginLeft",-a.slideWidth+"px")}),this.currentSlide=0):this.imageRow.animate({marginLeft:b+"px"},"slow"),soundManager.play("cameraclick")},b.prototype.previous=function(){var a=this,b;this.currentSlide--,b=-((this.currentSlide+1)*this.slideWidth),this.currentSlide<0?(this.imageRow.animate({marginLeft:b+"px"},"slow",function(){a.imageRow.css("marginLeft",-(a.arraySlides.length*a.slideWidth)+"px")}),this.currentSlide=a.arraySlides.length-1):this.imageRow.animate({marginLeft:b+"px"},"slow"),soundManager.play("cameraclick")},a.fn.slideshow=function(){return this.each(function(){var c=new b(a(this));c.bind()})}}(jQuery)
