$(document).ready(function() {

var userlistheight = $('#userlist').height();
var windowheight = $(window).height();
if(windowheight <= userlistheight) {
    $('#bg').css('min-height', userlistheight + "px");
}else{
    $('#bg').css('min-height', windowheight + "px");
}
//document.getElementById('bg').style.min-height = userlistheight + "px";
	
$("div.button").hover(function() { //On hover...
		$(this).stop().animate({'backgroundColor' : '#fff', 'color' : '#333333'},800);
		$(this).find("a").stop().animate({'color' : '#333333'},800);

	} , function() { //on hover out...
		//Fade the image to full opacity 
		$(this).stop().animate({'backgroundColor' : '#333333', 'color' : '#fff' },800);
		$(this).find("a").stop().animate({'color' : '#fff'},800);
	});
	

	
$("div.cpbutton").hover(function() { //On hover...
		$(this).stop().animate({'backgroundColor' : '#fff', 'color' : '#333333'},800);
		$(this).find("a").stop().animate({'color' : '#333333'},800);

	} , function() { //on hover out...
		//Fade the image to full opacity 
		$(this).stop().animate({'backgroundColor' : '#333333', 'color' : '#fff' },800);
		$(this).find("a").stop().animate({'color' : '#fff'},800);
	});	


var $div = $('#loginbox');
var height = $div.height();
$div.hide().css({ height : 0 });

$('#login').click(function () {
  if ( $div.is(':visible') ) {
    $div.animate({ 'height': 0, 'padding': '0px 10px' }, { duration: 500, complete: function () {
        $div.hide();
      } 
    });
  } else {
  	$div.css('padding','10px');
    $div.show().animate({ 'height' : height }, { duration: 800, easing: 'easeOutBounce'});
  }
    
  return false;
});

$('#noup').click(function () {
    $('#content').empty();
    $('#content').text("You must login to upload PSDs.");
  });


	
});
