$(function() {
	$('#Slideshow li').css('display', 'none');
	window.setTimeout('slideShow(5000)',2000);
});

function slideShow(speed) {
	$('#Slideshow li:first').addClass('Active').fadeIn(1000);
	$('#Slideshow').css('background-image','none');
    var timer = setInterval('slideSwitch()', speed);
	$('#Slideshow').hover(
		function () { clearInterval(timer); }, function () {
			timer = setInterval('slideSwitch()', speed); }
	);
};

function slideSwitch() {
    var $active = $('#Slideshow li.Active');
    if ( $active.length == 0 ) $active = $('#Slideshow li:last');
    var $next =  $active.next().length ? $active.next() : $('#Slideshow li:first');
	$active.fadeOut(1000).removeClass('Active');
	$next.css('display','none').addClass('Active').fadeIn(1000);
}

Cufon.set('fontFamily', 'RotisSerif').replace(['#Header h2'], { hover: true });

$(function() {
	$('form input#Q').focus(function() {
		if($(this).val() == 'SEARCH') $(this).val('');
	});
	$('form input#Q').blur(function() {
		if($(this).val() == '') $(this).val('SEARCH');
	});
});

$(function() {
	if ($.browser.msie) {
		var elm = $(".Container");
		var pos = elm.position();
		elm.after("<div class='ie-shadow'></div>");
		$(".ie-shadow").height($(elm).height());
	}
});

