(function ($) {
		$.fn.cross = function (options) {
			return this.each(function (i) { 
				var $$ = $(this);
				var target = $$.css('backgroundImage').replace(/^url|[\(\)'"]/g, '');
				$$.wrap('<span style="position: relative; margin: -4px;"></span>')
					.parent()
					.prepend('<img>')
					.find(':first-child')
					.attr('src', target);
					
				if ($.browser.mozilla) {
					$$.css({
						'position' : 'absolute',
						'left' : 0,
						'background' : '',
						'top' : this.offsetTop
					});
					} else if ($.browser.msie && $.browser.version < 7) {
					$$.css({
						'position' : 'absolute',
						'left' : 0,
						'background' : '',
						'top' : "0",
						'margin-left' : -4
					});
					} else if ($.browser.msie && $.browser.version > 6) {
					$$.css({
						'position' : 'absolute',
						'left' : 0,
						'background' : '',
						'top' : "0",
						'margin-left' : 0
					});					
					} else if ($.browser.opera) {       
					$$.css({
						'display' : 'none'
					});
				} else {
					$$.css({
						'position' : 'absolute', 
						'left' : 0,
						'background' : ''
					});
				}

				$$.hover(function () {
					$$.stop().animate({
						opacity: 0
					}, 500);
				}, function () {
					$$.stop().animate({
						opacity: 1
				}, 1000);
			});
		});
	};
})(jQuery);

$(window).bind('load', function () {
	$('img.fade').cross();
});
