/** * Left right image slideshow gallery * Copyright (C) 2011 - 2014 www.gopiplus.com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ jQuery.noConflict() function Lrisg_Show(options){ var $=jQuery this.setting={Lrisg_Displaymode:{type:'auto', pause:2000, cycles:2, pauseonmouseover:true}, Lrisg_Orientation:'h', Lrisg_Persist:true, slideduration:500} //default settings jQuery.extend(this.setting, options) //merge default settings with options var curslide=(this.setting.Lrisg_Persist)? Lrisg_Show.routines.getCookie("slider-"+this.setting.Lrisg_Wrapperid) : 0 this.curslide=(curslide==null || curslide>this.setting.Lrisg_ImageArray.length-1)? 0 : parseInt(curslide) //make sure curslide index is within bounds this.curstep=0 this.zIndex=1 this.animation_isrunning=false //variable to indicate whether an image is currently being slided in this.posprop=(this.setting.Lrisg_Orientation=="h")? "left" : "top" options=null var slideshow=this, setting=this.setting, preloadimages=[], slidesHTML='' for (var i=0; ithis.$imageslides.length-1)? 0 : targetslide //wrap around if (this.animation_isrunning==false) this.slide(targetslide, dir) }, rotate:function(){ var slideshow=this if (this.ismouseover){ //pause slideshow onmouseover this.rotatetimer=setTimeout(function(){slideshow.rotate()}, this.setting.Lrisg_Displaymode.pause) return } var nextslide=(this.curslide' : '' //hyperlink slide? layerHTML+='' layerHTML+=(imgref[1])? '' : '' return '
' +'
' +layerHTML +'
' //return HTML for this layer }, getCookie:function(Name){ var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair if (document.cookie.match(re)) //if cookie found return document.cookie.match(re)[0].split("=")[1] //return its value return null }, setCookie:function(name, value){ document.cookie = name+"=" + value + ";path=/" }, createobj:function(){ var obj={} for (var i=0; i