var Pic_cnt = 1; var timer; var delay = 6000; var img_cnt = 11; var n = 1; jQuery(document).ready(function() { try{ if ($('.slideshow').length > 0) { jQuery('.slideshow').cycle({ fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, scrollLeft,etc... speed: 'slow', timeout: 6000, pager: '#nav', slideExpr: 'img', cleartype : 0, pause: true, //random : 1 //pauseOnPagerHover : true }); jQuery(".slideshow").show(); } } catch(e) { } for(i = 1; i <= img_cnt; i++) { var k = jQuery('#pic_cnt').val(); if(k == i) jQuery("#pic"+i).attr({"src":"http://fileham.com/ham_html/img_images/evt_slider_on.png","class":"iePngFix"}); else jQuery("#pic"+i).attr({"src":"http://fileham.com/ham_html/img_images/evt_slider_off.png","class":"iePngFix"}); } timer = setTimeout('auto_swap()', delay); jQuery('.small_tb').bind('mouseover',function(){ clearTimeout(timer); Pic_cnt = Number(n); jQuery('#pic_cnt').val(n) - 1; jQuery('#pic'+n).trigger('click'); //alert(n); for(i = 1; i <= img_cnt; i++) { jQuery(".slideshow #imgsrc"+i).show(); if(n == i) jQuery("#pic"+i).attr({"src":"http://fileham.com/ham_html/img_images/evt_slider_on.png"}); else jQuery("#pic"+i).attr({"src":"http://fileham.com/ham_html/img_images/evt_slider_off.png"}); } timer = setTimeout('auto_swap()', delay); Clearto(); }); jQuery('.slideshow').bind('mouseover',function(){ Clearto(); }); jQuery('.slideshow').bind('mouseleave',function(){ var n = jQuery('#pic_cnt').val(); jQuery('#pic'+n).trigger('click'); timer = setTimeout('auto_swap()', delay); }); }); function auto_swap() { Pic_cnt++; if(Pic_cnt > img_cnt) Pic_cnt = 1; jQuery('#pic_cnt').val(Pic_cnt); for(i = 1; i <= img_cnt; i++) { var k = jQuery('#pic_cnt').val(); jQuery(".slideshow #imgsrc"+i).show(); if(k == i) jQuery("#pic"+i).attr({"src":"http://fileham.com/ham_html/img_images/evt_slider_on.png","class":"iePngFix"}); else jQuery("#pic"+i).attr({"src":"http://fileham.com/ham_html/img_images/evt_slider_off.png","class":"iePngFix"}); } timer = setTimeout('auto_swap()', delay); delay = 6000; } function click_fadeTo(k) { clearTimeout(timer); Pic_cnt = Number(k); jQuery('#pic_cnt').val(k); jQuery('#pic'+n).trigger('click'); //alert(n); for(i = 1; i <= img_cnt; i++) { if(n == i) { jQuery(".slideshow #imgsrc"+i).show(); //alert(n +"//"+ i) n = k; jQuery("#pic"+i).attr({"src":"http://fileham.com/ham_html/img_images/evt_slider_on.png","class":"iePngFix"}); //alert(jQuery("#pic"+i).attr("src")); } else { jQuery("#pic"+i).attr({"src":"http://fileham.com/ham_html/img_images/evt_slider_off.png","class":"iePngFix"}); } } timer = setTimeout('auto_swap()', delay); } function Clearto() { clearTimeout(timer); }