jQuery(function (){

	// help for search
	$("label.inlined + #input").each(function (type) {
		$(this).focus(function () {
	 		$(this).prev("label.inlined").addClass("focus");
     	});
	 	$(this).keypress(function () {
	 		$(this).prev("label.inlined").addClass("has-text").removeClass("focus");
	 	});
	 	$(this).blur(function () {
	  		if($(this).val() == "") {
	  			$(this).prev("label.inlined").removeClass("has-text").removeClass("focus");
	 		}
 		});
	});

	//slideshow
	$(".slideshow img:gt(0)").hide();
	setInterval(function () {
		$(".slideshow :first-child").fadeOut(1000)
		.next("img").fadeIn(1000)
		.end().appendTo(".slideshow");	
	}, 5000);

	//slideshow2
	$(".slideshow2 .img:gt(0)").hide();
	setInterval(function () {
		$(".slideshow2 .img:first-child").fadeOut(1000)
		.next(".img").fadeIn(1000)
		.end().appendTo(".slideshow2");	
	}, 3000);

});
