$(document).ready(function(){
	//FADE
	$('#banner').innerfade({
		speed: 1500,
		timeout: 5000,
		type: 'sequence',
		containerwidth: '883px',
		containerheight: '240px'
	});
	
	//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
	if($.browser.msie){
		$('#logo').css('cursor', 'pointer').bind({
			click: function(){
				window.location = './?page=home';	
			}
		});	
	}else{
		$('#logo').css('cursor', 'pointer').bind({
			click: function(){
				window.location = './?page=home';	
			}
		});	
	}
	
	//SHOW LISTEN LIVE
	$('#listen').click(function(){
		window.location = './?page=listen';
	});

	
	//BUTTONS TOP
	$('.top_buttons').css('cursor', 'pointer').bind({
		click: function(){
			if($(this).attr('rel') == undefined){
				//;
			}else{
				window.open($(this).attr('rel'));
			}			
		}
	});
	
	//CLEANING UP MARGINS AND JUNK
	
	//TRADING POST
	$('#right_container div a:odd').css('background-image', 'none');
});
