$(document).ready(function(){
	//INPUT ELEMENTS	
		var st = '#4c4c4c';
		var en = '#9a9a9a';
		
		$('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', st);
			}
		});
		
		//CHECKBOX
		$('input[type=checkbox]').each(function(){
			$(this).css({'display' : 'inline', 'width' : 'auto', 'padding' : '0px', 'margin-right' : '5px'});
		});
	//INPUT ELEMENTS
	
	//FINDING NAV STUFF
	$('#buttons a').each(function(initIndex){
		if($(this).attr('rel') == 'true'){
			$(this).children().attr('src', 'images/navbar/'+$(this).children().attr('alt')+'_alt.png')
		}else{
			$(this).bind({
				mouseenter: function(){
					$(this).children().attr('src', 'images/navbar/'+$(this).children().attr('alt')+'_alt.png')
				},
				mouseleave: function(){
					$(this).children().attr('src', 'images/navbar/'+$(this).children().attr('alt')+'.png')				
				}
			});
		}
	});

	
	//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);
		}
	});
		
	//CLEANING UP MARGINS AND JUNK
	$('#navbar a:first').css('margin-right', '2px');
	
	
	//COLORBOX
	$("a[rel='example1']").colorbox();
});