(function($){$.fn.visArts=function(options){return this.each(function(){$.visArts(this,options)})};$.visArts=function(container,options){var opts={'transition_speed':1000,'transition_timeout':12000,'hide_overlay':0,'hide_controls':0,'panel_background_color':'transparent','panel_height':300,'panel_width':800,'overlay_height':70,'overlay_opacity':.5,'overlay_text_size':'1em','overlay_text_color':'#ffffff'};if(options){$.extend(opts,options)}$('img',container).css({'border-style':'none'});$('p',container).css({'margin':'0px','padding':'0px'});$('h4',container).css({'margin':'0px','padding':'0px'});$(container).css({'position':'absolute','width':opts.panel_width+'px','height':opts.panel_height+'px','margin-left':'100px','margin-top':'100px'});pic_count=$(container).children('.panel').size();$('.pics',container).css({'width':opts.panel_width+'px','height':opts.panel_height+'px','position':'absolute','left':'0','line-height':(opts.panel_height+1)+'px','overflow':'hidden','background-color':opts.panel_background_color,'display':'none'});tt=false;tt2=false;paused=false;if(opts.hide_overlay==0){$('.panel-overlay',container).css({'position':'absolute','z-index':'20','width':opts.panel_width+'px','height':opts.overlay_height+'px','top':(opts.panel_height-opts.overlay_height)+'px','left':'0','line-height':'normal','padding-top':'10px','padding-left':'10px','padding-right':'0px','color':opts.overlay_text_color,'font-size':opts.overlay_text_size,'overflow':'hidden','display':'none'});$('.panel-overlay a',container).css({'color':'#ffffff','text-decoration':'none'});$('.overlay',container).css({'position':'absolute','z-index':'10','width':opts.panel_width+'px','height':opts.overlay_height+'px','top':(opts.panel_height-opts.overlay_height)+'px','left':'0','cursor':'pointer','background-color':'#000000','opacity':opts.overlay_opacity,'overflow':'hidden','display':'none'})}else{$('.panel-overlay',container).text('');$('.panel-overlay',container).css({'position':'absolute','z-index':'20','width':opts.panel_width+'px','height':opts.overlay_height+'px','top':(opts.panel_height-opts.overlay_height)+'px','left':'0','line-height':'normal','padding-top':'10px','padding-left':'10px','padding-right':'200px','color':opts.overlay_text_color,'font-size':opts.overlay_text_size,'overflow':'hidden','display':'none'});$('.overlay',container).css({'position':'absolute','z-index':'10','width':opts.panel_width+'px','height':opts.overlay_height+'px','top':(opts.panel_height-opts.overlay_height)+'px','left':'0','cursor':'pointer','background-color':'#000000','opacity':0,'overflow':'hidden','display':'none'})}if(opts.hide_controls==0){$('.pics <img />',container).addClass('nav-overlay').attr('src','slideshow_images/arrr.png').appendTo(container).css({'position':'absolute','z-index':'30','top':((opts.panel_height-opts.overlay_height)+30)+'px','right':'15px','cursor':'pointer'}).click(function(){tt=true});$('.pics <img />',container).addClass('nav-overlay').attr('src','slideshow_images/arrl.png').appendTo(container).css({'position':'absolute','z-index':'30','top':((opts.panel_height-opts.overlay_height)+30)+'px','left':(opts.panel_width-65)+'px','cursor':'pointer'}).click(function(){tt2=true})}function setCurrent(i){current=i}setCurrent(0);function getCurrent(){return current}function upCurrent(){current=getCurrent()+1}function getNext(){var temp;temp=getCurrent();temp+=1;return temp}function getCount(){return pic_count}function getPrevious(){var temp2;temp2=getCurrent()+pic_count-2;return temp2}visArts(false,true,false);function visArts(continuet,rr,ll){if(continuet==true&&rr==false&&ll==false){if(paused==false){$('.pics').fadeOut(opts.transition_speed).eq(getCurrent()%pic_count).fadeIn(opts.transition_speed).eq(getNext()%pic_count);$('.panel-overlay').fadeOut(200).eq(getCurrent()%pic_count).fadeIn(200).eq(getNext()%pic_count);$('.overlay').fadeOut(opts.transition_speed).eq(getCurrent()%pic_count).fadeIn(opts.transition_speed).eq(getNext()%pic_count);upCurrent()}setTimeout(function(){visArts(true,false,false)},opts.transition_timeout)}if(continuet==true&&rr==true&&ll==false){$('.pics').fadeOut(opts.transition_speed).eq(getCurrent()%pic_count).fadeIn(opts.transition_speed).eq(getNext()%pic_count);$('.panel-overlay').fadeOut(200).eq(getCurrent()%pic_count).fadeIn(200).eq(getNext()%pic_count);$('.overlay').fadeOut(opts.transition_speed).eq(getCurrent()%pic_count).fadeIn(opts.transition_speed).eq(getNext()%pic_count);upCurrent()}if(continuet==true&&rr==true&&ll==true){$('.pics').fadeOut(opts.transition_speed).eq(getPrevious()%pic_count).fadeIn(opts.transition_speed).eq(getPrevious()%pic_count);$('.panel-overlay').fadeOut(200).eq(getPrevious()%pic_count).fadeIn(200).eq(getPrevious()%pic_count);$('.overlay').fadeOut(opts.transition_speed).eq(getPrevious()%pic_count).fadeIn(opts.transition_speed).eq(getPrevious()%pic_count);setCurrent(getPrevious()+1)}if(continuet==false&&rr==true&&ll==false){$('.pics').fadeOut(1).eq(getCurrent()).fadeIn(1).eq(getCurrent());$('.panel-overlay').fadeOut(1).eq(getCurrent()).fadeIn(1).eq(getCurrent());$('.overlay').fadeOut(1).eq(getCurrent()).fadeIn(1).eq(getCurrent());upCurrent();setTimeout(function(){visArts(true,false,false)},opts.transition_timeout)}if(tt==true){tt=false;setTimeout(function(){visArts(true,true,false)},1)}if(tt2==true){tt2=false;setTimeout(function(){visArts(true,true,true)},1)}setTimeout(function(){visArts(false,false,false)},1)}}})(jQuery);
