(function($) { $.fn.cross = function(options) { return this.each(function(i) { var $$ = $(this); var target = $$.css('backgroundImage').replace(/^url|[\(\)'"]/g, ''); $$.wrap('<' + 'span style="position: relative; top:0;"><' + '/span>').parent().prepend('<img class="b0">').find(':first-child').attr('src', target); if ($.browser.msie) { $$.css({ 'position': 'absolute', 'left': '0', 'z-index': '9999', 'background': '', 'top': '0' }) } else if ($.browser.mozilla) { $$.css({ 'position': 'absolute', 'left': '0', 'z-index': '9999' }) } else if ($.browser.opera && $.browser.version < 9.5) { $$.css({ 'position': 'absolute', 'left': '0', 'background': '', 'top': "0" }) } else { $$.css({ 'position': 'absolute', 'left': '0', 'border': 'none', 'background': '' }) } $$.hover(function() { $$.stop().animate({ opacity: 0 }, 250) }, function() { $$.stop().animate({ opacity: 1 }, 250) }) }) } })(jQuery);
