sidebarjs.attr('src', 'http://de.memory-alpha.org/wiki/MediaWiki:Fusion/scripts/Sidebar.js?action=raw&ctype=text/javascript');
$('head').append(sidebarjs);
});
})(jQuery);
(function ($) {
$(function() {var fullImage = $('#file > a');
var regionBrowser = $('<div />', {
id: 'region-browser'
});
fullImage.after(regionBrowser);
$('.region-info').each(function() {
var that = $(this);
var src = $('.fullMedia > a').attr('href');
var c = that.attr('title').split(' ');
var thumbHeight = 100;
svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
svg.setAttribute('preserveAspectRatio', 'none');
var ratio = thumbHeight / c[3];
svg.setAttribute('viewBox', (c[0] - (c[2] / 2)) + ' ' + (c[1] - (c[3] / 2)) + ' ' + c[2] + ' ' + c[3]);
svg.setAttribute('height', thumbHeight);
svg.setAttribute('width', (c[2] * 1.5) * ratio);
image = document.createElementNS("http://www.w3.org/2000/svg", "image");
image.setAttribute('width', 100);
image.setAttribute('height', 100);
image.setAttribute('preserveAspectRatio', 'none');
image.setAttributeNS('http://www.w3.org/1999/xlink', 'href', src);
$(image).appendTo(svg);
$(svg).appendTo(regionBrowser);
});
});
})(jQuery);