jQuery.fn.inputText = function(options){
    var options = jQuery.extend({
	    txt: '232321'
	  },options);
	  return this.each(function() {

        if($(this).attr('rel') != undefined){
            options.txt = $(this).attr('rel');
            $(this).val(options.txt)
            $(this).focus(function(){
                //alert($(this).val());
                if($(this).val() == options.txt){
                    $(this).val('');
                }
            });
            $(this).blur(function(){
                if($(this).val() == ''){
                    $(this).val(options.txt);
                }
            });
        }

    });
};

$(document).ready(function(){
    var animated = 0;
    $('.news-link-right').click(function(){
        var li = ($('.news-list li').length - 1) * -30;
        if(animated == 0){
          if(parseInt($('.news-list').css('top')) > li){
              animated = 1;
              $('.news-list').animate({top: '-=30'}, 300, function(){
                  animated = 0;
              });
          }
        }
        return false;
    });
    $('.news-link-left').click(function(){
        if(animated == 0){
          if(parseInt($('.news-list').css('top')) < 0){
              animated = 1;
              $('.news-list').animate({top: '+=30'}, 300, function(){
                  animated = 0;
              });
          }
        }
        return false;
    });
$('input').inputText();
});
