        function checkFeedContent(fb,w){
                 if(fb=='focus') {
                    if(w=="What's new?") {
                          $('#feed-input').val('').css('color','#000000').next().show();
                    }
                 }
                 if(fb=='blur') {
                    if(w=="") {
                    	 $('#feed-input').css({color:'#cccccc',height:'23px'}).attr('disabled', '').val("What's new?").next().hide();
                    }
                 }
        }

         function postToMicroBlog() {
         	var da = $('#feed-input').val();
                 $('#feed-input, .feed-post-button').attr('disabled','disabled');
                 $('.feed-post-button').val('Sharing...');
		$.get('nu1/functions/home/funk.php',{f:'postToMicroBlog',content:da}, function(data) {
			$('.feed-post-button').attr('disabled', '').val('Share');
                         checkFeedContent('blur','');
                         countLength('1');
                         $(data).insertAfter('.feed-post:first');
                         $('.feed-post:first').next().fadeIn();

                 });
         }

function countLength(l) {
        		var str = l;
		var l = l.length;
                 var tl = l;
                 var l = 18-l;

                 //make the box bigger?
		if(tl>100){
                       $('#feed-input').css('height','180px');
                 }else if(tl>66){
                       $('#feed-input').css('height','93px');
                 }else if(tl>33){
                       $('#feed-input').css('height','63px');
                 }else if(tl<33){
                       $('#feed-input').css('height','23px');
                 }
        }
