$(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
	
	//FIND LOGO
	$('#logo').css('cursor', 'pointer').bind('click', function(){
		window.location = './?page=home';
	});

	//$('#fader li').css({'width' : '340px', 'text-align' : 'center', 'margin' : '0 auto'});
	$('#fade_inner').innerfade({
		speed: 1500,
		timeout: 4000,
		type: 'sequence',
		containerwidth: '405px',
		containerheight: '197px'
	});
	
	$('#quote_rotate').innerfade({
		speed: 1500,
		timeout: 4000,
		type: 'sequence',
		containerheight: '77px'
	});

	//FIXING HTML
	$('#navbar a:last').css('padding-right', '0px');
	$('#foot_nav a:last').css({'padding-right' : '0px', 'border-right' : 'none'});
	$('#foot_content a:last').css({'padding-right' : '0px', 'border-right' : 'none'});
	$('#inner a:last').css({'padding-bottom' : '0px', 'border-bottom' : 'none', 'margin-bottom' : '0px'});

	//SLIDER
	$(document).ready(function(){	
		$("#slider").easySlider({
			auto: true, 
			continuous: true
		});
	});
	
	$('#slider ul li').each(function(){
		if(typeof($(this).attr('rel')) == 'undefined'){
			'';
		}else{
			$(this).css('cursor', 'pointer');
			$(this).bind('click', function(){
				window.parent.location = $(this).attr('rel');
			});		
		}
	});
	
	//PHOTO GALLERY STUFF
	$("a[rel='example1']").colorbox();	
});
