$(document).ready(function() {
	$('a.more').wrap('<span class="wrapmore"></span>');
	$('#nav ul li').hover(function() {
		$(this).addClass('sfhover'); },
		function() {
			$(this).removeClass('sfhover');
			});
	//Form label replace
	var searchLabel = $('form#search label').remove().text();
		$('form#search input#q').addClass('helpertext').val(searchLabel).focus(function(){
			if (this.value == searchLabel) {
				$(this).removeClass('helpertext').val('');
			};
			}).blur(function(){
				if (this.value == '') {
					$(this).addClass('helpertext').val(searchLabel);
				};
			});
	$('form#search').submit(function(){
		if ($('form#search input #q').val == searchLabel) {
			$('form#search input #q').val('');
			}
		});
	//Slider
		$('#slider .slides img:gt(0)').hide();
		var moveSlides = function() {
		var $slides = $('#slider .slides img');
		var autoRotate = function() {
			$slides.eq(0).fadeOut(2000, function() {
				$(this).appendTo('#slider .slides');
				moveSlides();
				});
			$slides.eq(1).fadeIn(2000);
			};
			setTimeout(autoRotate, 5000);
		};
		moveSlides();
});
