$(function () {
	$('.overlabel label').addClass('isoverlabel').filter( function () {
	return $('input#'+$(this).attr('for')).val().length > 0;
	}).hide();
	
	$('.overlabel').addClass('isoverlabel');
	$('.isoverlabel input')
		.focus( function () { $('label[@for='+ this.id +']', '.isoverlabel').hide(); })
		.blur( function () { if(!this.value) $('label[@for='+ this.id +']', '.isoverlabel').show(); });

	$('.scroll_pane').jScrollPane();
});

$(document).ready(function() {
	var x = 0;
	$(".sites ul li").each( function(){
		x += 1;
		$(this).addClass("carousel" + x);
	});
	
	$(".before").click( function() {
		if ($(".shown").hasClass("carousel1") ){
			$(".shown").slideDown("slow").hide("slow").addClass("hidden").removeClass("shown");
			$(".hidden:last").slideDown("slow").removeClass("hidden").addClass("shown");
		} else {
			$(".shown").slideDown("slow").hide("slow").addClass("hidden").removeClass("shown").prev(".hidden").slideDown("slow").removeClass("hidden").addClass("shown");
		};
	});
	
	$(".after").click( function() {
		if ($(".shown").hasClass("carousel"+x) ){
			$(".shown").slideDown("slow").hide("slow").addClass("hidden").removeClass("shown");
			$(".hidden:first").slideDown("slow").removeClass("hidden").addClass("shown");
		} else {
			$(".shown").slideDown("slow").hide("slow").addClass("hidden").removeClass("shown").next(".hidden").slideDown("slow").removeClass("hidden").addClass("shown");
		};
	});
});