/* Copyright (c) 2010 Christopher Gooley http://christophergooley.com
 * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * FolioInfo - sliding photo caption
 * Version: 1.0 (April 25, 2010)
 * Requires: jQuery 1.2+
 */
 
(function ($) {

    $.fn.folioinfo = function (options) {
        var opts = $.extend({}, $.fn.folioinfo.defaults, options);
        $(this).each(function (i) {
            $("." + opts.infoclass, this).css({ top: $(this).height() + 'px', opacity: 0 });
            $(this).hover(function () {
                var up_top = $(this).height() - $("." + opts.infoclass, this).height();
                $("." + opts.infoclass, this).stop().animate({ top: up_top + 'px', opacity: 'inherit' }, { queue: false, duration: opts.duration });
            }, function () {
                $("." + opts.infoclass, this).stop().animate({ top: $(this).height() + 'px' }, { queue: false, duration: opts.duration });
            });
        });
    };

    $.fn.folioinfo.defaults = {
        infoclass: "feature-info",
        duration: 160
    };

})(jQuery);

