(function($) {
    $.titleBlock = {
        defaults: {
            removeTitle: true,
            thefontSize: "14px"
        }
    }
    $.fn.extend({
        titleBlock:function(config) {
            var config = $.extend({}, $.titleBlock.defaults, config);
            return this.each(function() {
                var theImage    = $(this),
                    removeTitle = config.removeTitle,
                    theFontSizeValue = config.thefontSize;
                theImage
				.wrap("<div class='graf'>")
				.parent()
				.append("<h5>&nbsp;</h5>")
				.find("h5")
				.html(theImage.attr('title'))
				.wrapInner("<span></span>");
                if (removeTitle) {
                    theImage
                        .removeAttr("title");
                }
            })
        }
    })
})(jQuery);
