// JavaScript Document

function open_login_panel() {
	$lp = $("#left-panel-login")
	if($lp.attr('style')=='display: block;') {
		$lp.fadeOut("slow");
		
	} else {
		$lp.fadeIn("slow");
		
	}
}

function open_recomended(e) {
	$e = $(e);
	$('.recommend-outer, .recommend-long').css('display','none');
	$e.next('.recommend-outer').css('display','block').find('.recommend-long').css('display','block');
}

//instant execution
$(function(){
	$('a.login-link').click(function(){open_login_panel(this);return false;});
	$('#ns_field').focus(function() { this.value = (this.value)=='search'?'':this.value }).blur(function() { this.value = (this.value)==''?'search':this.value });
	
	$('.recommend-panel h5').click(function(){open_recomended(this);return false;});

});
