(function(){
	
$.fn.tiper = function(){
	//debug(this);
	$(this).hover($.fn.tiper.over,$.fn.tiper.out);	
};// end tiper
  
$.fn.tiper.over = function over(opt){
		var data = {
			width	:	$(this).width(),
			height	:	$(this).height(),
			data	:	$(this).attr("rel")	
		};
		
		if(data.data){
			$(this).after('<span id="tiper" style="height:'+data.height+'px; line-height:'+data.height+'px">'+data.data+'</span>');
			var tiper = $("#tiper");
			tiper.fadeIn('fast').css({marginLeft : 1});
			tiper.animate({marginLeft : 10},150);
			tiper.animate({marginLeft : 0},100);
			tiper.animate({marginLeft : 7},75);
			tiper.animate({marginLeft : 1},20);
		}// ako postoji sadrzaj koji treba prikazati
	};// end over
	
	// funkcija OUT
	$.fn.tiper.out = function(){
		$("#tiper").remove();
	};
		  })(jQuery);