﻿
(function($) {
    $.fn.preview = function(options) {
        var defaults = { xOffset: 9, yOffset: 32, speed: 600 }; var options = $.extend(defaults, options); return this.each(function(i) {
            this.t = this.title; $.preload([this.rel]); $(this).hover(function(e) {
                this.title = ''; var href = $(this).attr('href'); var c = (this.t != '') ? '<br />' + this.t : ''; href = (href != null) ? href : 'javascript: void(0);'; if ($.browser.msie) $(this).append('<span id="jq-PreviewHover"><a href="' + href + '" target="' + $(this).attr('target') + '"><img src="' + this.rel + '" alt="' + this.t + '" /></a><span class="jq-PreviewDescription">' + c + '</span></span>'); else
                    $(this).append('<span id="jq-PreviewHover"><img src="' + this.rel + '" alt="' + this.t + '" /><span class="jq-PreviewDescription">' + c + '</span></span>'); this.top = $('#jq-PreviewHover').height() + options.yOffset; this.left = ($('#jq-PreviewHover').width() - $(this).width()) / 2 + options.xOffset; $('#jq-PreviewHover').fadeIn('fast'); $(this).addClass('hover');
                $('.bp-FeaturePromo').css("z-index", "1");
            }, function() { $('.bp-FeaturePromo').css("z-index", "2"); $('#jq-PreviewHover').remove(); $(this).removeClass('hover'); });
        });
    };
})(jQuery);