$(document).ready(function(){
$('#menu li:not(.active):not(.home):not(.sep):not(.last)')
		.css( {backgroundPosition: "0 -50px"} )
		.mouseover(function(){
			$(this).stop().addClass('hover').animate({backgroundPosition:"(0 0)"}, {duration:300})
		})
		.mouseout(function(){
			$(this).stop().removeClass('hover').animate({backgroundPosition:"(0 -50px)"}, {duration:100})
		});

$('#menu li.home:not(.active)')
		.css( {backgroundPosition: "0 -50px"} )
		.mouseover(function(){
			$(this).stop().addClass('hover').animate({backgroundPosition:"(0 0)"}, {duration:300})
		})
		.mouseout(function(){
			$(this).stop().removeClass('hover').animate({backgroundPosition:"(0 -50px)"}, {duration:100})
		});
$('#menu li.last:not(.active)')
		.css( {backgroundPosition: "100% -50px"} )
		.mouseover(function(){
			$(this).stop().addClass('hover').animate({backgroundPosition:"(100% 0)"}, {duration:300})
		})
		.mouseout(function(){
			$(this).stop().removeClass('hover').animate({backgroundPosition:"(100% -50px)"}, {duration:100})
		});

	$('.delete_com').live("click",function(){
		if(!confirm('Are you sure?')) return false;
		$.get(this.href);
		$(this).parents(".kid_block").remove();
		return false;
	});
	$('.delete').live("click",function(){
		if(!confirm('Are you sure?')) return false;
		return true;
	});
	$('#subscribe .blue_but').click( function(){
		$.ajax({
			url: "/auth/signup/"+new Date().getTime(),
			type: "POST",
			data: ({name: $('#signup_name').val(), email: $('#signup_email').val()}),
			success: function(){ 
					$('#subscribe').empty();
					$('<p style="text-align:left" class="success">Successfully signed up</p>').appendTo('#subscribe');}
			});
		return false;
	});

});