 $(document).ready(function() {
	
	
	/* Set the background color */
	var colors = 
				[	
					"#F6F7F8",
					"#F6F1F4",
					"#FBF8FB",
					"#F3F5F8",
					"#F7F6F8",
					"#F5F9FB",
					"#FFFAF6"
				]
	
	var color = colors[Math.floor(Math.random()*colors.length)]
	$("body:not(.home, #under_construction)").css({'background':color});
	$("body.home, body#under_comstruction").css({"background":"white"});
	$(".issue_img img").removeAttr('width').removeAttr('height').attr('width', 150);
 
 
 	/*NOT RECOMMENDED */
 	$("a").removeAttr('title');
 	$("a>img").removeAttr('title');
 	
 	$("#menu>li>a").hover(
 		function(){
 			$(this).append($("<span style='display:none;'>&nbsp;</span>"));
			$(this).find("span:last").show('fast'); 			
 		},
 		function(){
 			$(this).find("span:last").remove();	
 		}
 	);
 	
 
	$(".title_img img").imgCenter();	

 	
 	/*$("#menu>li>a:odd").tipTip({defaultPosition:"right"});
 	$("#menu>li>a:even").tipTip({defaultPosition:"left"});
	
	$(".sb_members a").tipTip({defaultPosition:"top"});
 	*/
 	/* Display Tweet in .twitter div */
 	$(".twitter").tweet({
	        username:"newtral_sheet",
	        join_text: "auto",
	        avatar_size: 32,
	       	count: 10, 
	        auto_join_text_default: "",
	        auto_join_text_ed: "",
	        auto_join_text_ing: "",
	        auto_join_text_reply: "",
	        auto_join_text_url: "",
	        loading_text: "loading tweets...",
	        query: ""        	
     });

     /* Kinda remove the avator */
     $(".tweet_avatar>img").hide();
     
     
     
     /* magic code used for the contact on uderconstrction page*/
     $("label.inlined + span > .input-text").each(function (type) {
		/*( Event.observe(window, 'load', function () {
			setTimeout(function(){
				if (!input.value.empty()) {
					input.previous().addClassName('has-text');
				}
			}, 200);
		});*/
				 
		$(this).focus(function () {
			$(this).parent("span").prev("label.inlined").addClass("focus");
		});
			 
		$(this).keypress(function () {
			$(this).parent("span").prev("label.inlined").addClass("has-text").removeClass("focus");
		});
			 
		$(this).blur(function () {
			if($(this).val() == "") {
				$(this).parent("span").prev("label.inlined").removeClass("has-text").removeClass("focus");
			}
		});
	});
 });