(this.JPy_Slider=function(){ss_fade=function(a){var d=jQuery;a.duration=a.duration||1000;var e=[];var b=0;this.init=function(f){e=d("img",f).get();d(e).each(function(g){if(!g){d(this).show()}else{d(this).hide()}})};this.go=function(f){d(e).each(function(g){if(g==f){d(this).fadeIn(a.duration)}if(g==b){d(this).fadeOut(a.duration)}});b=f}};Slider=function(g){var h=jQuery;g=g||{};var w=h("#jpy_slider_images A");w.each(function(f){var d=h(this).html()||"";var t=d.indexOf(">",d);if(t>=0){h(this).data("descr",d.substr(t+1));if(t<d.length-1){h(this).html(d.substr(0,t+1))}}h(this).css({"font-size":0})});var r=w.length;var y=h("#jpy_slider_container");var k=h("A#jpy_slider_frame").get(0);var e=0;function q(d){if(e==d){return}e=d;p(d);var f=m.go(d)||w[d];if(g.caption){i(f)}}function p(d){if(g.bullets){l(d)}if(k){k.setAttribute("href",w.get(d).href)}}var n;function u(){s();if(g.autoPlay){n=setTimeout(function(){q(e<r-1?e+1:0);u()},g.delay+g.duration)}}function s(){if(n){clearTimeout(n)}n=null}var m=new window["ss_"+g.effect](g);m.init(h("#jpy_slider_images"));w.find("IMG").css({visibility:"visible"});var o=c=h("jpy_slider_images");var j="";c=j?h("<div></div>"):0;if(c){c.css({position:"absolute",right:"2px",bottom:"2px",padding:"0 0 0 0"});o.append(c)}if(c&&document.all){var v=h('<iframe src="javascript:false"></iframe>');v.css({position:"absolute",left:0,top:0,width:"100%",height:"100%",filter:"alpha(opacity=0)"});v.attr({scrolling:"no",framespacing:0,border:0,frameBorder:"no"});c.append(v)}var x=c?h(document.createElement("A")):c;if(x){x.css({position:"relative",display:"block","background-color":"#E4EFEB",color:"#837F80","font-family":"Lucida Grande,sans-serif","font-size":"11px","font-weight":"normal","font-style":"normal","-moz-border-radius":"3px","-webkit-border-radius":"3px","border-radius":"3px",padding:"1px 3px",width:"auto",height:"auto",margin:"0 0 0 0",outline:"none"});x.attr({href:"http://"+j.toLowerCase()});x.html(j);x.bind("contextmenu",function(d){return false});c.append(x)}if(g.controls){var b=h('<a href="#" class="jpy_slide_next">'+g.next+"</a>");var a=h('<a href="#" class="jpy_slide_prev">'+g.prev+"</a>");y.append(b);y.append(a);b.bind("click",function(d){s();d.preventDefault();q(e<r-1?e+1:0);u()});a.bind("click",function(d){s();d.preventDefault();q(e>0?e-1:r-1);u()})}function z(){var f=h('<div href="#" class="jpy_slide_bullets"></div>');y.append(f);for(var d=0;d<r;d++){(function(t){f.append(h('<a href="#"></a>').bind("click",function(A){s();A.preventDefault();q(t);u()}))})(d)}}function l(d){h(".jpy_slide_bullets A",y).each(function(f){if(f==d){h(this).addClass("jpy_slide_selected_bullet")}else{h(this).removeClass("jpy_slide_selected_bullet")}})}if(g.caption){$caption=h('<div class="jpy_slide_title" style="display:none"></div>');y.append($caption);$caption.bind("mouseover",function(d){s()});$caption.bind("mouseout",function(d){u()})}function i(d){var B=h("img",d).attr("title");var t=h(d).data("descr");var f=h(".jpy_slide_title",y);f.hide();if(B||t){f.html((B?"<span>"+B+"</span>":"")+(t?"<div>"+t+"</div>":""));f.fadeIn(400,function(){if(h.browser.msie){h(this).get(0).style.removeAttribute("filter")}})}}if(g.bullets){z()}p(0);if(g.caption){i(w[0])}u()};this.slider=new Slider({effect:"fade",prev:"",next:"",duration:10*100,delay:60*100,outWidth:500,outHeight:380,width:600,height:360,caption:false,controls:false,autoPlay:true,bullets:true})})(jQuery(this.JPy_Slider));
