
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - ufo.js - */
// http://www.midlandsailingclub.org.uk/portal_javascripts/ufo.js?original=1
var UFO={req:["movie","width","height","majorversion","build"],opt:["play","loop","menu","quality","scale","salign","wmode","bgcolor","base","flashvars","devicefont","allowscriptaccess","seamlesstabbing","allowfullscreen","allownetworking"],optAtt:["id","name","align"],optExc:["swliveconnect"],ximovie:"ufo.swf",xiwidth:"215",xiheight:"138",ua:navigator.userAgent.toLowerCase(),pluginType:"",fv:[0,0],foList:[],create: function(FO,id){if(!UFO.uaHas("w3cdom")||UFO.uaHas("ieMac")) return;UFO.getFlashVersion();UFO.foList[id]=UFO.updateFO(FO);UFO.createCSS("#"+id,"visibility:hidden;");UFO.domLoad(id)},updateFO: function(FO){if(typeof FO.xi!="undefined"&&FO.xi=="true"){if(typeof FO.ximovie=="undefined") FO.ximovie=UFO.ximovie;if(typeof FO.xiwidth=="undefined") FO.xiwidth=UFO.xiwidth;if(typeof FO.xiheight=="undefined") FO.xiheight=UFO.xiheight}
FO.mainCalled=false;return FO},domLoad: function(id){var _t=setInterval(function(){if((document.getElementsByTagName("body")[0]!=null||document.body!=null)&&document.getElementById(id)!=null){UFO.main(id);clearInterval(_t)}},250);if(typeof document.addEventListener!="undefined"){document.addEventListener("DOMContentLoaded", function(){UFO.main(id);clearInterval(_t)},null)}},main: function(id){var _fo=UFO.foList[id];if(_fo.mainCalled) return;UFO.foList[id].mainCalled=true;document.getElementById(id).style.visibility="hidden";if(UFO.hasRequired(id)){if(UFO.hasFlashVersion(parseInt(_fo.majorversion,10),parseInt(_fo.build,10))){if(typeof _fo.setcontainercss!="undefined"&&_fo.setcontainercss=="true") UFO.setContainerCSS(id);UFO.writeSWF(id)}
else if(_fo.xi=="true"&&UFO.hasFlashVersion(6,65)){UFO.createDialog(id)}}
document.getElementById(id).style.visibility="visible"},createCSS: function(selector,declaration){var _h=document.getElementsByTagName("head")[0];var _s=UFO.createElement("style");if(!UFO.uaHas("ieWin")) _s.appendChild(document.createTextNode(selector+" {"+declaration+"}"));_s.setAttribute("type","text/css");_s.setAttribute("media","screen");_h.appendChild(_s);if(UFO.uaHas("ieWin")&&document.styleSheets&&document.styleSheets.length>0){var _ls=document.styleSheets[document.styleSheets.length-1];if(typeof _ls.addRule=="object") _ls.addRule(selector,declaration)}},setContainerCSS: function(id){var _fo=UFO.foList[id];var _w=/%/.test(_fo.width)?"":"px";var _h=/%/.test(_fo.height)?"":"px";UFO.createCSS("#"+id,"width:"+_fo.width+_w+"; height:"+_fo.height+_h+";");if(_fo.width=="100%"){UFO.createCSS("body","margin-left:0; margin-right:0; padding-left:0; padding-right:0;")}
if(_fo.height=="100%"){UFO.createCSS("html","height:100%; overflow:hidden;");UFO.createCSS("body","margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; height:100%;")}},createElement: function(el){return(UFO.uaHas("xml")&&typeof document.createElementNS!="undefined")?document.createElementNS("http://www.w3.org/1999/xhtml",el):document.createElement(el)},createObjParam: function(el,aName,aValue){var _p=UFO.createElement("param");_p.setAttribute("name",aName);_p.setAttribute("value",aValue);el.appendChild(_p)},uaHas: function(ft){var _u=UFO.ua;switch(ft){case "w3cdom":return(typeof document.getElementById!="undefined"&&typeof document.getElementsByTagName!="undefined"&&(typeof document.createElement!="undefined"||typeof document.createElementNS!="undefined"));case "xml":var _m=document.getElementsByTagName("meta");var _l=_m.length;for(var i=0;i<_l;i++){if (/content-type/i.test(_m[i].getAttribute("http-equiv"))&&/xml/i.test(_m[i].getAttribute("content"))) return true}
return false;case "ieMac":return/msie/.test(_u) && !/opera/.test(_u) && /mac/.test(_u);case "ieWin":return/msie/.test(_u) && !/opera/.test(_u) && /win/.test(_u);case "gecko":return/gecko/.test(_u) && !/applewebkit/.test(_u);case "opera":return/opera/.test(_u);case "safari":return/applewebkit/.test(_u);default:return false}},getFlashVersion: function(){if(UFO.fv[0]!=0) return;if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){UFO.pluginType="npapi";var _d=navigator.plugins["Shockwave Flash"].description;if(typeof _d!="undefined"){_d=_d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var _m=parseInt(_d.replace(/^(.*)\..*$/,"$1"),10);var _r=/r/.test(_d) ? parseInt(_d.replace(/^.*r(.*)$/,"$1"),10):0;UFO.fv=[_m,_r]}}
else if(window.ActiveXObject){UFO.pluginType="ax";try{var _a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}
catch(e){try{var _a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");UFO.fv=[6,0];_a.AllowScriptAccess="always"}
catch(e){if(UFO.fv[0]==6) return}
try{var _a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}
catch(e){}}
if(typeof _a=="object"){var _d=_a.GetVariable("$version");if(typeof _d!="undefined"){_d=_d.replace(/^\S+\s+(.*)$/,"$1").split(",");UFO.fv=[parseInt(_d[0],10),parseInt(_d[2],10)]}}}},hasRequired: function(id){var _l=UFO.req.length;for(var i=0;i<_l;i++){if(typeof UFO.foList[id][UFO.req[i]]=="undefined") return false}
return true},hasFlashVersion: function(major,release){return(UFO.fv[0]>major||(UFO.fv[0]==major&&UFO.fv[1]>=release))?true:false},writeSWF: function(id){var _fo=UFO.foList[id];var _e=document.getElementById(id);if(UFO.pluginType=="npapi"){if(UFO.uaHas("gecko")||UFO.uaHas("xml")){while(_e.hasChildNodes()){_e.removeChild(_e.firstChild)}
var _obj=UFO.createElement("object");_obj.setAttribute("type","application/x-shockwave-flash");_obj.setAttribute("data",_fo.movie);_obj.setAttribute("width",_fo.width);_obj.setAttribute("height",_fo.height);var _l=UFO.optAtt.length;for(var i=0;i<_l;i++){if(typeof _fo[UFO.optAtt[i]]!="undefined") _obj.setAttribute(UFO.optAtt[i],_fo[UFO.optAtt[i]])}
var _o=UFO.opt.concat(UFO.optExc);var _l=_o.length;for(var i=0;i<_l;i++){if(typeof _fo[_o[i]]!="undefined") UFO.createObjParam(_obj,_o[i],_fo[_o[i]])}
_e.appendChild(_obj)}
else{var _emb="";var _o=UFO.opt.concat(UFO.optAtt).concat(UFO.optExc);var _l=_o.length;for(var i=0;i<_l;i++){if(typeof _fo[_o[i]]!="undefined") _emb+=' '+_o[i]+'="'+_fo[_o[i]]+'"'}
_e.innerHTML='<embed type="application/x-shockwave-flash" src="'+_fo.movie+'" width="'+_fo.width+'" height="'+_fo.height+'" pluginspage="http://www.macromedia.com/go/getflashplayer"'+_emb+'></embed>'}}
else if(UFO.pluginType=="ax"){var _objAtt="";var _l=UFO.optAtt.length;for(var i=0;i<_l;i++){if(typeof _fo[UFO.optAtt[i]]!="undefined") _objAtt+=' '+UFO.optAtt[i]+'="'+_fo[UFO.optAtt[i]]+'"'}
var _objPar="";var _l=UFO.opt.length;for(var i=0;i<_l;i++){if(typeof _fo[UFO.opt[i]]!="undefined") _objPar+='<param name="'+UFO.opt[i]+'" value="'+_fo[UFO.opt[i]]+'" />'}
var _p=window.location.protocol=="https:"?"https:":"http:";_e.innerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+_objAtt+' width="'+_fo.width+'" height="'+_fo.height+'" codebase="'+_p+'//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+_fo.majorversion+',0,'+_fo.build+',0"><param name="movie" value="'+_fo.movie+'" />'+_objPar+'</object>'}},createDialog: function(id){var _fo=UFO.foList[id];UFO.createCSS("html","height:100%; overflow:hidden;");UFO.createCSS("body","height:100%; overflow:hidden;");UFO.createCSS("#xi-con","position:absolute; left:0; top:0; z-index:1000; width:100%; height:100%; background-color:#fff; filter:alpha(opacity:75); opacity:0.75;");UFO.createCSS("#xi-dia","position:absolute; left:50%; top:50%; margin-left: -"+Math.round(parseInt(_fo.xiwidth,10)/ 2) + "px; margin-top: -" + Math.round(parseInt(_fo.xiheight, 10) / 2)+"px; width:"+_fo.xiwidth+"px; height:"+_fo.xiheight+"px;");var _b=document.getElementsByTagName("body")[0];var _c=UFO.createElement("div");_c.setAttribute("id","xi-con");var _d=UFO.createElement("div");_d.setAttribute("id","xi-dia");_c.appendChild(_d);_b.appendChild(_c);var _mmu=window.location;if(UFO.uaHas("xml")&&UFO.uaHas("safari")){var _mmd=document.getElementsByTagName("title")[0].firstChild.nodeValue=document.getElementsByTagName("title")[0].firstChild.nodeValue.slice(0,47)+" - Flash Player Installation"}
else{var _mmd=document.title=document.title.slice(0,47)+" - Flash Player Installation"}
var _mmp=UFO.pluginType=="ax"?"ActiveX":"PlugIn";var _uc=typeof _fo.xiurlcancel!="undefined"?"&xiUrlCancel="+_fo.xiurlcancel:"";var _uf=typeof _fo.xiurlfailed!="undefined"?"&xiUrlFailed="+_fo.xiurlfailed:"";UFO.foList["xi-dia"]={movie:_fo.ximovie,width:_fo.xiwidth,height:_fo.xiheight,majorversion:"6",build:"65",flashvars:"MMredirectURL="+_mmu+"&MMplayerType="+_mmp+"&MMdoctitle="+_mmd+_uc+_uf};UFO.writeSWF("xi-dia")},expressInstallCallback: function(){var _b=document.getElementsByTagName("body")[0];var _c=document.getElementById("xi-con");_b.removeChild(_c);UFO.createCSS("body","height:auto; overflow:auto;");UFO.createCSS("html","height:auto; overflow:auto;")},cleanupIELeaks: function(){var _o=document.getElementsByTagName("object");var _l=_o.length
for(var i=0;i<_l;i++){_o[i].style.display="none";for(var x in _o[i]){if(typeof _o[i][x]=="function"){_o[i][x]=null}}}}};if(typeof window.attachEvent!="undefined"&&UFO.uaHas("ieWin")){window.attachEvent("onunload",UFO.cleanupIELeaks)}


/* - jquery.rs.slideshow.js - */
// http://www.midlandsailingclub.org.uk/portal_javascripts/jquery.rs.slideshow.js?original=1
(function($){var methods={init: function(options){return this.each(function(){var slideshow=this,$slideshow=$(this),data=$slideshow.data('rsf_slideshow'),settings;if(!data){settings=$.extend(true,{},$.rsfSlideshow.defaults);if(typeof options==='object'){$.extend(true,settings,options)}
$slideshow.data('rsf_slideshow',{slides:[],this_slide:0,effect_iterator:{this_effect:-1,direction:1},settings:settings,interval_id:false,loaded_imgs:[],queued:0});data=$slideshow.data('rsf_slideshow')}
settings=data.settings;$slideshow.rsfSlideshow('getSlidesFromMarkup');if(settings.slides.length){$slideshow.rsfSlideshow('addSlides',settings.slides);settings.slides=[]}
if(typeof settings.eventHandlers==='object'){$.each(settings.eventHandlers, function(evnt,fn){$slideshow.bind(evnt, function(e){fn($slideshow,e)})})}
if(settings.controls.playPause.auto){$slideshow.rsfSlideshow('addControl','playPause')}
if(settings.controls.previousSlide.auto){$slideshow.rsfSlideshow('addControl','previousSlide')}
if(settings.controls.index.auto){$slideshow.rsfSlideshow('addControl','index')}
if(settings.controls.nextSlide.auto){$slideshow.rsfSlideshow('addControl','nextSlide')}
if(settings.autostart){$slideshow.rsfSlideshow('startShow')}})},addSlides: function(slides){if(slides instanceof Array){for(var i=0,len=slides.length;i<len;i++){RssPrivateMethods._addSlide(this,slides[i])}}
else{RssPrivateMethods._addSlide(this,slides)}
return this},removeSlides: function(slide_keys){if(slide_keys===undefined){return this.each(function(){$(this).data('rsf_slideshow').slides=[]})}
else if(slide_keys instanceof Array){slide_keys.sort(function(a,b){return b-a});var removed=[];return this.each(function(){for(var i=0,len=slide_keys.length;i<len;i++){if($.inArray(slide_keys[i],removed)===-1){RssPrivateMethods._removeSlide($(this),slide_keys[i]);removed.push(slide_keys[i])}}})}
else{return this.each(function(){RssPrivateMethods._removeSlide($(this),slide_keys)})}},getSlideData: function(key){if(key===undefined){return this.data('rsf_slideshow').slides}
if(this.data('rsf_slideshow').slides[key]){return this.data('rsf_slideshow').slides[key]}
return false},startShow: function(interval,instant){var $slideshow=this;var data=$slideshow.data('rsf_slideshow');if(!data.interval_id){if(instant){$slideshow.rsfSlideshow('nextSlide')}
if(!interval){interval=data.settings.interval}
data.interval_id=setInterval(function(){$slideshow.rsfSlideshow('nextSlide')},interval * 1000);RssPrivateMethods._trigger($slideshow,'rsStartShow')}
return this},stopShow: function(){var data=this.data('rsf_slideshow');if(data.interval_id){clearInterval(data.interval_id);data.interval_id=false;RssPrivateMethods._trigger(this,'rsStopShow')}
return this},toggleShow: function(){if(this.rsfSlideshow('isRunning')){this.rsfSlideshow('stopShow')}
else{this.rsfSlideshow('startShow')}},isRunning: function(){if(this.data('rsf_slideshow').interval_id){return true}
return false},currentSlideKey: function(){var data=this.data('rsf_slideshow');return data.this_slide},totalSlides: function(){var data=this.data('rsf_slideshow');return data.slides.length},getSlidesFromMarkup: function(options){var data=this.data('rsf_slideshow');if(!options){options={}}
if(!options.data_container){options.data_container=data.settings.data_container}
var $cntnr;if(options.data_container.charAt(0)==='#'){$cntnr=$(options.data_container)}
else{$cntnr=$(this).children(options.data_container)}
if(!$cntnr.length){return false}
if(!options.slide_data_container){options.slide_data_container=data.settings.slide_data_container}
var slide_data_selectors=$.extend(true,{},data.settings.slide_data_selectors);if(options.slide_data_selectors){$.extend(true,slide_data_selectors,options.slide_data_selectors)}
options.slide_data_selectors=slide_data_selectors;var self=this;$cntnr.children(options.slide_data_container).each(function(){var slide=RssPrivateMethods._findData($(this),options.slide_data_selectors);$(self).rsfSlideshow('addSlides',slide)});return this},nextSlide: function(){var data=this.data('rsf_slideshow');data.this_slide++;if(data.this_slide>=data.slides.length){if(data.settings.loop){data.this_slide=0}
else{data.this_slide=data.slides.length-1;this.rsfSlideshow('stopShow');return this}}
this.rsfSlideshow('showSlide',data.slides[data.this_slide]);return this},previousSlide: function(){var data=this.data('rsf_slideshow');data.this_slide--;if(data.this_slide<0){if(data.settings.loop){data.this_slide=data.slides.length-1}
else{data.this_slide=0;this.rsfSlideshow('stopShow');return this}}
this.rsfSlideshow('showSlide',data.slides[data.this_slide]);return this},goToSlide: function(key){var data=this.data('rsf_slideshow');if(typeof data.slides[key]==='object'){data.this_slide=key;this.rsfSlideshow('showSlide',data.slides[data.this_slide])}
return this},showSlide: function(slide,_queue_id){var $slideshow=this,data=$slideshow.data('rsf_slideshow');if(!_queue_id){data.queued+=1;_queue_id=data.queued;RssPrivateMethods._trigger($slideshow,'rsPreTransition')}
else if(_queue_id!==data.queued){return}
var containerWidth=$slideshow.width();var containerHeight=$slideshow.height();$slideshow.children('img:first').css('z-index',0);var newImg=new Image();newImg.src=slide.url;var whenLoaded=function(img){var $img=$(img);$img.addClass('rsf-slideshow-image');$slideshow.prepend($img);var width=$img.outerWidth();var height=$img.outerHeight();$img.clone();$img.remove();if(!width||!height){setTimeout(function(){$slideshow.rsfSlideshow('showSlide',slide,_queue_id)},200);return}
if($.inArray(slide.url,data.loaded_imgs)<0){data.loaded_imgs.push(slide.url)}
RssPrivateMethods._trigger($slideshow,'rsImageReady');var leftOffset=Math.ceil((containerWidth/ 2) - (width / 2));var topOffset=Math.ceil((containerHeight/ 2) - (height / 2));$img.css({left:leftOffset});$img.css({top:topOffset});if(slide.link_to){$img=$('<a href="'+slide.link_to+'"></a>').append($img)}
var $slideEl=$('<div></div>');$slideEl.addClass(data.settings.slide_container_class);$slideEl.append($img).css('display','none');if(slide.caption){var $capt=$('<span>'+slide.caption+'</span>');$capt.addClass(data.settings.slide_caption_class);$capt.appendTo($slideEl)}
var effect=data.settings.effect;if(slide.effect){effect=slide.effect}
$slideEl.appendTo($slideshow);RssPrivateMethods._transitionWith($slideshow,$slideEl,effect);return true};if($.inArray(slide.url,data.loaded_imgs)<0){if(newImg.width){whenLoaded(newImg)}
else{$(newImg).bind('load', function(){whenLoaded(newImg)})}}
else{whenLoaded(newImg)}
return this},addControl: function(type){return this.each(function(){var $slideshow=$(this),settings=$slideshow.data('rsf_slideshow').settings;var $control=settings.controls[type].generate($slideshow);RssPrivateMethods._controlsContainer($slideshow);settings.controls[type].place($slideshow,$control);var bind_method='bind'+type.substr(0,1).toUpperCase()+type.substr(1,type.length);$slideshow.rsfSlideshow(bind_method,$control)})},bindPlayPause: function($playPause){return this.each(function(){var $slideshow=$(this);var data=$slideshow.data('rsf_slideshow');$playPause.bind('click.rsfSlideshow', function(e){e.preventDefault();$slideshow.rsfSlideshow('toggleShow')})})},bindPreviousSlide: function($prev,autostop){return this.each(function(){var $slideshow=$(this);var data=$slideshow.data('rsf_slideshow');if(!autostop){autostop=data.settings.controls.previousSlide.autostop}
$prev.bind('click.rsfSlideshow', function(e){e.preventDefault();$slideshow.rsfSlideshow('previousSlide');if(autostop){$slideshow.rsfSlideshow('stopShow')}})})},bindNextSlide: function($next,autostop){return this.each(function(){var $slideshow=$(this);var data=$slideshow.data('rsf_slideshow');if(!autostop){autostop=data.settings.controls.nextSlide.autostop}
$next.bind('click.rsfSlideshow', function(e){e.preventDefault();$slideshow.rsfSlideshow('nextSlide');if(autostop){$slideshow.rsfSlideshow('stopShow')}})})},bindIndex: function($index,autostop){return this.each(function(){var $slideshow=$(this),settings=$slideshow.data('rsf_slideshow').settings;if(!autostop){autostop=settings.controls.index.autostop}
var $indexLinks=settings.controls.index.getEach($slideshow);$indexLinks.bind('click.rsfSlideshow', function(e){e.preventDefault();var slide_key=settings.controls.index.getSlideKey($(this));if(slide_key){$slideshow.rsfSlideshow('goToSlide',slide_key);if(autostop){$slideshow.rsfSlideshow('stopShow')}}});RssPrivateMethods._bindActiveIndex($slideshow)})}};$.fn.rsfSlideshow=function(method){if(!this.length){return this}
if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1))}
else if(typeof method==='object'||!method){return methods.init.apply(this,arguments)}
else{$.error('Method '+method+' does not exist on jQuery.rsfSlidehow')}};var RssPrivateMethods={_findData: function($slideData,slide_data_selectors){var slide={};var slide_attr;for(var key in slide_data_selectors){if(slide_data_selectors.hasOwnProperty(key)){var $slideDataClone=$.extend(true,{},$slideData);if(slide_data_selectors[key].selector){$slideDataClone=$slideDataClone.children(slide_data_selectors[key].selector)}
if(slide_data_selectors[key].attr){slide_attr=$slideDataClone.attr(slide_data_selectors[key].attr)}
else{slide_attr=$slideDataClone.text()}
slide[key]=slide_attr}}
return slide},_addSlide: function($slideshow,slide){var data=$slideshow.data('rsf_slideshow');if(typeof slide==='string'){var url=$.trim(slide);data.slides.push({url:url})}
else if(slide.url){for(var key in slide){if(slide.hasOwnProperty(key)){slide[key]=$.trim(slide[key])}}
data.slides.push(slide)}},_removeSlide: function($slideshow,key){$slideshow.data('rsf_slideshow').slides.splice(key,1)},_transitionWith: function($slideshow,$slide,effect){var data=$slideshow.data('rsf_slideshow');var $previousSlide=$slideshow.children('div.'+data.settings.slide_container_class+':first');var effect_iteration='random';if(typeof effect==='object'&&effect.iteration&&effect.effects){effect_iteration=effect.iteration;effect=effect.effects}
if(effect instanceof Array){switch(effect_iteration){case 'loop':data.effect_iterator.this_effect++;if(data.effect_iterator.this_effect>effect.length-1){data.effect_iterator.this_effect=0}
break;case 'backAndForth':data.effect_iterator.this_effect+=data.effect_iterator.direction;if(data.effect_iterator.this_effect<0){data.effect_iterator.this_effect=1;data.effect_iterator.direction=data.effect_iterator.direction *-1}
if(data.effect_iterator.this_effect>effect.length-1){data.effect_iterator.this_effect=effect.length-2;data.effect_iterator.direction=data.effect_iterator.direction *-1}
break;default:data.effect_iterator.this_effect=Math.floor(Math.random() * effect.length);break}
effect=effect[data.effect_iterator.this_effect]}
var left_offset,top_offset;switch(effect){case 'none':$slide.css('display','block');RssPrivateMethods._endTransition($slideshow);break;case 'fade':$slide.fadeIn(data.settings.transition, function(){RssPrivateMethods._endTransition($slideshow)});break;case 'slideLeft':left_offset=$slide.outerWidth();RssPrivateMethods._doSlide($slideshow,$slide,$previousSlide,left_offset,0);break;case 'slideRight':left_offset=(0-$slide.outerWidth());RssPrivateMethods._doSlide($slideshow,$slide,$previousSlide,left_offset,0);break;case 'slideUp':top_offset=$slide.outerHeight();RssPrivateMethods._doSlide($slideshow,$slide,$previousSlide,0,top_offset);break;case 'slideDown':top_offset=(0-$slide.outerHeight());RssPrivateMethods._doSlide($slideshow,$slide,$previousSlide,0,top_offset);break}},_doSlide: function($slideshow,$slide,$previousSlide,left_offset,top_offset){var data=$slideshow.data('rsf_slideshow');$slide.css({top:top_offset,left:left_offset});$slide.css('display','block');$slide.stop().animate({top:0,left:0},data.settings.transition,data.settings.easing,
function(){RssPrivateMethods._endTransition($slideshow)});$previousSlide.stop().animate({top:(0-top_offset),left:(0-left_offset)},data.settings.transition,data.settings.easing)},_endTransition: function($slideshow){var data=$slideshow.data('rsf_slideshow');$slideshow.children('div.'+data.settings.slide_container_class+':not(:last-child)').remove();RssPrivateMethods._trigger($slideshow,'rsPostTransition');if($slideshow.rsfSlideshow('currentSlideKey')===$slideshow.rsfSlideshow('totalSlides')-1){RssPrivateMethods._trigger($slideshow,'rsLastSlide')}
else if($slideshow.rsfSlideshow('currentSlideKey')===0){RssPrivateMethods._trigger($slideshow,'rsFirstSlide')}},_bindActiveIndex: function($slideshow){var indexSettings=$slideshow.data('rsf_slideshow').settings.controls.index;$slideshow.bind('rsPreTransition', function(){var current_slide_key=$(this).rsfSlideshow('currentSlideKey');indexSettings.getEach($slideshow).removeClass(indexSettings.active_class);indexSettings.getSingleByKey($slideshow,current_slide_key).addClass(indexSettings.active_class)})},_controlsContainer: function($slideshow){var settings=$slideshow.data('rsf_slideshow').settings;if(!settings.controls.container.get($slideshow).length){var $container=settings.controls.container.generate($slideshow);settings.controls.container.place($slideshow,$container)}},_trigger: function($slideshow,e,event_data){var data=$slideshow.data('rsf_slideshow');if(typeof event_data!=='object'){event_data={}}
$.extend(event_data,{slide_key:data.this_slide,slide:data.slides[data.this_slide]});$slideshow.trigger(e,event_data)}};$.rsfSlideshow={defaults:{interval:5,transition:1000,effect:'fade',easing:'swing',loop:true,autostart:true,slides:[],slide_container_class:'slide-container',slide_caption_class:'slide-caption',data_container:'ol.slides',slide_data_container:'li',slide_data_selectors:{url:{selector:'a',attr:'href'},caption:{selector:'a',attr:'title'},link_to:{selector:'a',attr:'data-link-to'},effect:{selector:'a',attr:'data-effect'}},eventHandlers:{rsStartShow: function(rssObj,e){var controlSettings=$(rssObj).data('rsf_slideshow').settings.controls.playPause;var $playPause=controlSettings.get($(rssObj));$playPause.html('Pause').addClass(controlSettings.playing_class)},rsStopShow: function(rssObj,e){var controlSettings=$(rssObj).data('rsf_slideshow').settings.controls.playPause;var $playPause=controlSettings.get($(rssObj));$playPause.html('Play').addClass(controlSettings.paused_class)}},controls:{playPause:{generate: function($slideshow){return $('<a href="#" class="rs-play-pause" data-control-for="'+$slideshow.attr('id')+'">Pause</a>')},place: function($slideshow,$control){var $container=$slideshow.data('rsf_slideshow').settings.controls.container.get($slideshow);$container.append($control)},get: function($slideshow){return $('.rs-play-pause[data-control-for="'+$slideshow.attr('id')+'"]')},playing_class:'rs-playing',paused_class:'rs-paused',auto:false},previousSlide:{generate: function($slideshow){return $('<a href="#" class="rs-prev" data-control-for="'+$slideshow.attr('id')+'">&lt;</a>')},place: function($slideshow,$control){var $container=$slideshow.data('rsf_slideshow').settings.controls.container.get($slideshow);$container.append($control)},get: function($slideshow){return $('.rs-prev[data-control-for="'+$slideshow.attr('id')+'"]')},autostop:true,auto:false},nextSlide:{generate: function($slideshow){return $('<a href="#" class="rs-next" data-control-for="'+$slideshow.attr('id')+'">&gt;</a>')},place: function($slideshow,$control){var $container=$slideshow.data('rsf_slideshow').settings.controls.container.get($slideshow);$container.append($control)},get: function($slideshow){return $('.rs-next[data-control-for="'+$slideshow.attr('id')+'"]')},autostop:true,auto:false},index:{generate: function($slideshow){var slide_count=$slideshow.rsfSlideshow('totalSlides'),$indexControl=$('<ul class="rs-index-list clearfix"></ul>');$indexControl.attr('data-control-for',$slideshow.attr('id'));for(var i=0;i<slide_count;i++){var $link=$('<a href="#"></a>');$link.addClass('rs-index');$link.attr('data-control-for',$slideshow.attr('id'));$link.attr('data-slide-key',i);$link.append(i+1);if(i===$slideshow.rsfSlideshow('currentSlideKey')){$link.addClass('rs-active')}
var $li=$('<li></li>');$li.append($link);$indexControl.append($li)}
return $indexControl},place: function($slideshow,$control){var $container=$slideshow.data('rsf_slideshow').settings.controls.container.get($slideshow);$container.append($control)},get: function($slideshow){return $('.rs-index-list[data-control-for="'+$slideshow.attr('id')+'"]')},getEach: function($slideshow){return $('.rs-index[data-control-for="'+$slideshow.attr('id')+'"]')},getSingleByKey: function($slideshow,slide_key){return $('.rs-index[data-control-for="'+$slideshow.attr('id')+'"][data-slide-key="'+slide_key+'"]')},getSlideKey: function($controlItem){return $controlItem.attr('data-slide-key')},active_class:'rs-active',autostop:true,auto:false},container:{generate: function($slideshow){return $('<div class="rs-controls clearfix" id="rs-controls-'+$slideshow.attr('id')+'"></div>')},place: function($slideshow,$control){$slideshow.after($control)},get: function($slideshow){return $('#rs-controls-'+$slideshow.attr('id'))}}}}}})(jQuery);

