$(document).ready(function(){
	
var timeBetween = 4000;
var fadeSpeed = 1000;
var duration = timeBetween + fadeSpeed

function imageSlideshow() {
	var slideshow = $(".home #slideshow");
	var firstImage = $(".home #slideshow img:last")
	var lastImage = $(".home #slideshow img:first")
	//alert ("hello");
	
	$(firstImage).animate({
		opacity:0
	}, fadeSpeed, function(){
		$(firstImage).insertBefore(lastImage);
		$(firstImage).css("opacity", 1)
	} 
	);
	
	
}

setInterval(imageSlideshow, duration);

if ($(".scroll").length ) {
	$(".scroll").jStockTicker({interval: 45});
}

var browser = BrowserDetect.OS;

if (browser == 'Mac') {
	$('#menu ul li.sel a').css({'padding-top' : '4px', 'padding-bottom' : '4px'});
	$('#menu ul li.sel a:visited').css({'padding-top' : '4px', 'padding-bottom' : '4px'});
}

	
})
