	   var sh = 983;
       var s = 0;
       var total_w = 0;
       var img_i = 1;
       var auto = true;
function slider(m,stop){
        if (!auto && !stop){ return false; }
        
        //auto = stop;
        
        if (m=='right'){ s=s+sh; img_i++; } else { s=s-sh; img_i--;}
        if (s<0){
            s = total_w-sh; img_i = $("#slider img").length;
        }
        
        if ((s+sh)>total_w){
            
            s = 0; img_i=1;
        }
        
        ss = 0-s;
        $("#slider div").stop().animate({marginLeft:ss},'slow');
        alt = $('#slideimg'+img_i).attr('alt');
        if (alt=='') alt = '&nbsp;';
        $("#slider_title p").html(alt);
        
	}

$(document).ready(function()	{
    $("#header nav li").click(function(){  a = $(this).children("a");  window.location.href = $(a).attr('href'); });
    var i = 1;
    total_w =  $("#slider img").length * sh;
    $("#nav_larr,#nav_rarr").css('opacity',0.5).hover(function(){$(this).css('opacity',1);},function(){$(this).css('opacity',0.5);});
	$("#nav_larr").click(function(){slider('left',true); auto = false;});
    $("#nav_rarr").click(function(){slider('right',true); auto = false;});
    if ($("#slider img").length>0){
        $("#slider img").each(function(){
            $(this).attr('id','slideimg'+i);
            i++;
        })
          setInterval("slider('right',false)",4000);
    }

				});
