$(document).ready(function() {
		
		$("#frontpage_adrotator_tabs").removeClass("hide");
		$("#frontpage_adrotator_tabs").addClass("show");
		
		$(function() {
		
		var counter = 1;
		var timer = setInterval( showDiv,8000);
		
		  function showDiv() {
			  
			counter++;
			if (counter > sitefpctacount) { counter = 1 }

			$('div','#frontpage_adrotator_container')
			.hide()
			.filter( function() { return this.id.match('frontpage_adrotator_tab' + counter); })   
			.fadeIn("slow")
				$("#frontpage_adrotator_tabs li").removeClass("selected");
				$("#frontpage_adrotator_tabs li[rel='#frontpage_adrotator_tab"+counter+"']").addClass("selected");
			
		  }
		
			//when the anchor is clicked content gets faded
			
			$("#frontpage_adrotator_container").hover(
		      function () {
		         clearInterval(timer);
		      }, 
		      function () {
				 timer = setInterval( showDiv,8000);
			  }
		    );
	
			$("#frontpage_adrotator_tabs li").click(function()
				{
				  $('.frontpage_adrotator_msgbody').fadeOut("slow");
				  clearInterval(timer)
				  $($(this).attr("rel")).fadeIn("slow");
				  $("#frontpage_adrotator_tabs li").removeClass("selected")
				  $($(this).addClass("selected"));
				});
			});
			
$('.pics').cycle({ 
    fx:      'fade',
	timeout:       6000
});
$('.customers').cycle({ 
    fx:      'scrollRight',
	timeout:      3500
});
});


$(function() {
	$('.rollover').hover(function() {
		var currentImg = $(this).attr('src');
		$(this).attr('src', $(this).attr('hover'));
		$(this).attr('hover', currentImg);
	}, function() {
		var currentImg = $(this).attr('src');
		$(this).attr('src', $(this).attr('hover'));
		$(this).attr('hover', currentImg);
	});			
			
			
		});