function removeWhiteSpace(a){var b=a.replace(/[\r+\n+\t+]\s\s+/g,"");return b}function simpleSlideAction(a,b){jQuery(function(c){function p(a,e,f){c('.simpleSlide-tray[rel="'+b+'"]').animate({marginLeft:a},d,"swing");c('.simpleSlideStatus-window .simpleSlideStatus-tray[rel="'+b+'"]').animate({marginLeft:f},d,"swing");c('.simpleSlideStatus-tray .simpleSlideStatus-window[rel="'+b+'"]').animate({marginLeft:e},d,"swing")}var d=c.ss_options.set_speed;var e=c('.simpleSlide-window[rel="'+b+'"]').find(".simpleSlide-slide").size();var f=c('.simpleSlide-window[rel="'+b+'"]').innerWidth();var g=c('.simpleSlideStatus-window[rel="'+b+'"]').innerWidth();var h=g*e;var i=parseInt(c('.simpleSlide-tray[rel="'+b+'"]').css("marginLeft"),10);var j=parseInt(c('.simpleSlideStatus-tray .simpleSlideStatus-window[rel="'+b+'"]').css("marginLeft"),10);var k=parseInt(c('.simpleSlideStatus-window .simpleSlideStatus-tray[rel="'+b+'"]').css("marginLeft"),10);if(c(a).is(".jump-to")){var l=c(a).attr("alt");var m=(l-1)*f*-1;var n=(l-1)*g*-1;var o=(l-1)*g;p(m,o,n)}if(c(a).is(".left-button")){if(i==0){var m=i-(e-1)*f;var n=k-(e-1)*g;var o=j+(e-1)*g}else{var m=i+f;var n=k+g;var o=j-g}p(m,o,n)}if(c(a).is(".right-button")){if(i==(e-1)*f*-1){var m=0;var n=0;var o=0}else{var m=i-f;var n=k-g;var o=j+g}p(m,o,n)}})}function simpleSwipe(a){var b={threshold:{x:$(a).width()*.15,y:$(a).height()*.1},swipeLeft:function(){simpleSlideAction(".right-button",$(a).attr("rel"))},swipeRight:function(){simpleSlideAction(".left-button",$(a).attr("rel"))},preventDefaultEvents:true};var c=$.extend(b,c);if(!a)return false;return $(a).each(function(){function i(a){console.log("Canceling swipe gesture...")}function h(a){var c=d.y-e.y;if(c<b.threshold.y&&c>b.threshold.y*-1){changeX=d.x-e.x;if(changeX>b.threshold.x){b.swipeLeft()}if(changeX<b.threshold.x*-1){b.swipeRight()}}}function g(a){if(b.preventDefaultEvents){a.preventDefault()}e.x=a.targetTouches[0].pageX;e.y=a.targetTouches[0].pageY}function f(a){d.x=a.targetTouches[0].pageX;d.y=a.targetTouches[0].pageY}var c=$(a);var d={x:0,y:0};var e={x:0,y:0};a.addEventListener("touchstart",f,false);a.addEventListener("touchmove",g,false);a.addEventListener("touchend",h,false);a.addEventListener("touchcancel",i,false)})}function ssInit(){jQuery(function(a){function e(b,c,d,e){var f=a.ss_options.status_width/d;var g=f*c;a('.simpleSlideStatus-tray[rel="'+b+'"]').css({width:a.ss_options.status_width*e,height:g,"background-color":a.ss_options.status_color_outside});a('.simpleSlideStatus-window[rel="'+b+'"]').css({width:a.ss_options.status_width,height:g,"background-color":a.ss_options.status_color_inside});if(jQuery.support.opacity){a('.simpleSlideStatus-window .simpleSlideStatus-tray[rel="'+b+'"]').css({opacity:".5","background-color":a.ss_options.status_color_inside})}if(!jQuery.support.opacity){a('.simpleSlideStatus-window .simpleSlideStatus-tray[rel="'+b+'"]').css({filter:"alpha(opacity=50)","background-color":a.ss_options.status_color_inside})}}function d(b,c,d){var e=c*d;a(b).find(".simpleSlide-tray").css({width:e+"px"});a(b).find(".simpleSlide-slide").css("display","inline-block")}function c(b){var c=new Image;c.src=a(b).find("img").first().attr("src");var d=a(window).width()/a(window).height();var e=c.width/c.height;var f=a(window).height();var g=a(window).width();if(d>e){var h=g/c.width*c.height;var i=(h-f)/2;a(b).find("img").attr("width",g).attr("height",h).css("marginLeft",0);a(b).css({marginLeft:0,marginTop:"-"+i+"px",height:f+i});a(b).find(".simpleSlide-slide").css({width:g,height:h,overflow:"hidden"})}else{var j=f/c.height*c.width;var k=(j-g)/2;a(b).find("img").attr("height",f).attr("width",j);a(b).find("img").css({marginLeft:"-"+k+"px"});a(b).find(".simpleSlide-slide").css({width:g,height:f,overflow:"hidden"});a(b).css({marginTop:0,height:f})}a(b).find(".simpleSlide-tray").css("marginLeft",0)}function b(b){var c=1;a(b).find(".simpleSlide-slide").each(function(){a(this).attr("alt",c);c++})}a(".simpleSlide-window").each(function(){if(a.ss_options.fullscreen=="true"){a("body").css("overflow","hidden")}var f=a(this).html();var g=removeWhiteSpace(f);a(this).html(g);var h=a(this).find(".simpleSlide-slide").size();a(this).find(".simpleSlide-slide").css("display","block");var i=a(this).find(".simpleSlide-slide").first().outerHeight();if(a.ss_options.fullscreen=="true"){c(this)}a(this).find(".simpleSlide-slide").css({display:"inline","float":"left"});var j=a(this).find(".simpleSlide-slide").first().outerWidth();var k=a(this).attr("rel");if(a.ss_options.fullscreen=="false"){a(this).css({height:i,width:j,position:"relative"})}a(this).css("overflow","hidden");d(this,h,j);e(k,i,j,h);b(this);a(this).find("#ssLoading").remove();if(a.ss_options.swipe=="true"&&!a.browser.msie){simpleSwipe(this)}a(this).find(".simpleSlide-slide").animate({opacity:"1"},300,"swing")});if(typeof a.ss_options.callback=="function"){a.ss_options.callback.call(this)}a(".left-button, .right-button, .jump-to").live("click",function(){var b=a(this).attr("rel");if(!a('div.simpleSlide-tray[rel="'+b+'"]').is(":animated")){simpleSlideAction(this,b)}})})}function simpleSlide(a){jQuery(function(b){var c={status_width:20,status_color_inside:"#fff",status_color_outside:"#aaa",set_speed:500,fullscreen:"false",swipe:"false",callback:"function()"};b.extend(c,a);b.ss_options=c;b(".simpleSlide-slide").css("opacity","0");b(".simpleSlide-tray").css("margin","0");b(".simpleSlide-window").prepend('<span id="ssLoading" style="color: #808080;font-family:Helvetica, Arial, sans-serif;font-size: 12px; margin: 10px 0 0 10px;display: block">Loading slides...</span>');var d=b(".simpleSlide-slide img").size();if(d>0){var e=new Array;var f=0;b(".simpleSlide-slide img").each(function(){e[f]=b(this).attr("src");f++});f=0;b(e).each(function(){var a=new Image;a.src=e[f];if(a.complete){d--;f++;if(d==0){ssInit()}}else{b(a).load(function(){d--;f++;if(d==0){ssInit()}})}})}else{ssInit()}})}


