$(document).ready(function() {


	$('.signin-link').click(function() {
		$('#page-header .signup-block').toggle();
		$('#page-header .signin-block').toggle().find('INPUT:first')[0].focus();
	});
	$('.close-sign-in').click(function() {
		$('#page-header .signup-block').show();
		$('#page-header .signin-block').hide();
	});
	

	$('#page-header .signin-block.error').animate({'backgroundColor': '#ffffff'}, 600, function() {
		$(this).css('backgroundColor', '#ffffff');
		$(this).animate({'backgroundColor': '#ffffff'}, 300, function() {
			$(this).css('backgroundColor', '#ff0000');
			$(this).animate({'backgroundColor': '#ffffff'}, 300, function() {
				$(this).css('backgroundColor', '#ffffff');
				$(this).animate({'backgroundColor': '#ffffff'}, 300, function() {
					$(this).css('backgroundColor', '#ff0000');
					$(this).animate({'backgroundColor': '#ffffff'}, 300, function() {
						$(this).css('backgroundColor', '#ffffff');
					});
				});
			});
		});
	})

	$('.upload-form A').click(function() {
		$(this).hide().next().show();
		return false;
	});
	
	include("ribbon-scroller.js");
	include("registration.js");
	include("profile-form.js");

	$('.small-photo-ribbon').ribbonScroller();
	$('.big-photo-ribbon').ribbonScroller();
	$('#registration-window').registration();
	$('#profile-window').profileForm();

});

