$(document).ready(function(){
	$('#fader').innerfade({
		speed: 1500,
		timeout: 4000,
		type: 'sequence',
		containerheight: '350px',
		containerwidth: '938px'
	});

	//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
	
	//FIND LOGO
	$('#logo').css('cursor', 'pointer').bind('click', function(){
		window.location = './?page=home';
	});
	$('#foot_logo').css('cursor', 'pointer').bind('click', function(){
		window.location = './?page=home';
	});
	
	//CLEANING UP MARGINS AND JUNK
	$('#navbar a:first').css('padding-left', '0px');
	$('#navbar a:last').css('padding-right', '0px');
	$('#foot_nav a:last').css({'padding-right' : '0px', 'border-right' : 'none'});
	$('#foot_right a:last').css({'padding-right' : '0px', 'border-right' : 'none'});
	$('#inner_nav a:first').css({'-moz-border-radius-topleft' : '5px', '-webkit-border-top-left-radius' : '5px', '-moz-border-radius-topright' : '5px', '-webkit-border-top-right-radius' : '5px'});
	$('#inner_nav a:last').css({'-moz-border-radius-bottomleft' : '5px', '-webkit-border-bottom-left-radius' : '5px', '-moz-border-radius-bottomright' : '5px', '-webkit-border-bottom-right-radius' : '5px'});
	
	//BUTTONS
	$('.button:last').css('margin-right', '0px');
	$('.button').each(function(){
		$(this).bind('mouseover', function(){
			$(this).children().css({'color' : '#ffffff'});
		});
		$(this).bind('mouseout', function(){
			$(this).children().css({'color' : '#ffc41b'});		
		});
		$(this).bind('click', function(){
			window.location = $(this).attr('rel');
		});
	});
	
	//SHOW TOP
	$('.showTop').toggle(function(){
		$('#topVideo').slideDown('slow');
	},function(){
		$('#topVideo').slideDown(1000);	
	});
});