google.setOnLoadCallback(function() {
	jQuery(function($) {
		$('ul.scroller').each(function() {
			var scroller = $(this),
				items = scroller.children().hide().toArray(),
				active = $(items.shift());

			scroller.css('overflow', 'hidden');

			function scroll() {
				active.detach().prependTo(scroller).slideDown(500);
				items.push(active);
				active = $(items.shift());
				scroller.children().slice(5).fadeOut(500);
				scroll.timer = setTimeout(scroll, 5000);
			}
			scroll();
			$(window).blur(function() { clearTimeout(scroll.timer); }).focus(scroll);
		});

		$('div.simpleform input.text').each(function() {
			var input = $(this),
				label = input.closest('div.field').find('label');
			input.focus(function() {
				label.hide();
			})
			.blur(function() {
				if(input.val() == '') {
					label.show();
				}
			});
		});


	}(jQuery));
});

