$(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);
		}
	});
			

	//MARGINS and WHATNOT
	$('#navbar').last().css({
		'padding-right' : '0px'
	}).end().eq(0).css('padding-left', '0px')
	
	$('.button').eq(0).css('margin-left', '0px').end().last().css('margin-right', '0px').end().hover(function(){
		$('div,', this).css('background-color', 'black');
	},function(){
		$('div,', this).css('background-color', 'transparent');
	});

	//PLAYLIST
	$('.playlist li a').click(function(){
		var inner = $(this).html();
		
		if(inner == 'play'){
			$(this).html('playing');
		}else{
			if(inner == 'playing'){
				$(this).html('paused (click to play)');
			}else{
				$(this).html('playing');
			}
		}
	});
			
	//SHOW HIDDEN
	$('.show_hidden').toggle(function(){
		$(this).next().slideDown('slow');
	},function(){
		$(this).next().slideUp('fast');	
	});
});
