var stime = 500;
$(document).ready(function() {
	$('.leftblock li a').click(function() {
		var self= this;
		var $ul = $(this).parent().children('ul');
		var go = function() { location.href=self.href; };
		if ( $ul.length ) {
			$ul.slideDown(stime,go);
			go = function() {};
		}
		var $close = $(this).parent().parent().parent().find('ul li.selected > ul');
		if ( $close.length ) {
			$close.slideUp(stime,go);
		} else {
			go();
		}
		return false;
	});
	$('#login_form form').bind('afterSubmit',function(evt,validator,xhrstatus,data) { if( xhrstatus && data.status) { location.href='/'; return false; } });
	// p-issues
	$('.inline p:last-child').css({'margin-bottom':0,'display':'inline'});
	$('.newsletter').validate();
});


