$(document).ready(function(){
	//INPUT ELEMENTS	
		var st = '#263035';
		var en = '#636a6e';
		var fn = '#999da0';
		
		$('input[type=hidden]').each(function(){
			$(this).css('display', 'none');
		});
			
		$(':input').focus(function(){
			if($(this).val() == $(this).attr('rel')){
				$(this).css('color', en);
				$(this).keydown(function(){
					if($(this).val() == $(this).attr('rel')){					
						$(this).val('');
						$(this).css('color', st);
					}
				});
			}
		}).blur(function(){
			if($(this).val() == '' || $(this).val() == $(this).attr('rel')){
				var atty = $(this).attr('rel');
				$(this).val(atty).css('color', fn);
			}
		});
		
		//CHECKBOX
		$('input[type=checkbox]').each(function(){
			$(this).css({'display' : 'inline', 'width' : 'auto', 'padding' : '0px', 'margin-right' : '5px'});
		});
	//INPUT ELEMENTS
	
	//FIND LOGO
	$('#logo').css('cursor', 'pointer').bind({
		click: function(){
			window.location = './?page=home';	
		},
		mouseenter: function(){
			$(this).fadeTo(500, 0.5);
		},
		mouseleave: function(){
			$(this).fadeTo(500, 1.0);
		}
	});
	
	$('#foot_logo').css('cursor', 'pointer').bind({
		click: function(){
			window.location = './?page=home';	
		},
		mouseenter: function(){
			$(this).fadeTo(500, 0.5);
		},
		mouseleave: function(){
			$(this).fadeTo(500, 1.0);
		}
	});
	
	//buttons
		$('#buttons a').hover(function(){
			$(this).fadeTo(500, 1.0);
		},function(){
			$(this).fadeTo(500, 0.57);		
		});
	//buttons

	//MARGINS and WHATNOT
	$('#navbar a:last').css({
		'padding-right' : '0px'
	});
	
	$('#inner a:last').css({
		'padding-bottom' : '0px',
		'margin-bottom' : '0px',
		'border-bottom' : 'none'
	});
	
	$('.right_button:last').css({
		'padding-bottom' : '0px',
		'margin-bottom' : '0px',
		'border-bottom' : 'none'
	});
	
	$('#buttons a:first').css('margin-left', '0px');
	$('#buttons a:last').css('margin-right', '0px');
	
	//LEFT & RIGHT HEIGHT
	lH = $('#left').height();
	rH = $('#right').height();
	if(lH > rH){
		$('#right').css('height', lH+'px');
	}else{
		$('#left').css('height', rH+'px');	
	}
		
	//SHOW HIDDEN
	$('.show_hidden').toggle(function(){
		$(this).next().slideDown('slow');
	},function(){
		$(this).next().slideUp('fast');	
	});
});
