(function(){

var SETTINGS = {
site: '//http://www.google.com',
x: 0,
y: 0,
w: 200,
h: 300,
};

var div = document.createElement("div");
div.style.zIndex = '2';
div.style.opacity = '0.5';
div.style.position = 'fixed';
div.style.background = 'black';
div.style.color = 'white';
div.style.left = SETTINGS.x + 'px';
div.style.top = SETTINGS.y + 'px';
div.style.width = SETTINGS.w + 'px';
div.style.height = SETTINGS.h + 'px';

var iframe = document.createElement('iframe');
iframe.src = SETTINGS.site;
iframe.className = 'DekitaChatFrame'
iframe.style.zIndex = '3';
iframe.style.position = 'fixed';
iframe.style.left = SETTINGS.x + 'px';
iframe.style.top = SETTINGS.y + 'px';
iframe.width = SETTINGS.w + 'px';
iframe.height = SETTINGS.h + 'px';
iframe.style.border = 'none';

// Appennd iframe to div
div.appendChild(iframe);

// Alias for Graphics.initialize
var initialize = Graphics.initialize;
Graphics.initialize = function() {
initialize.apply(this, arguments);
// Must append the div to document AFTER other elements have been created.
// Oteriwse the element seems to be created underneath the game canvas.
document.body.appendChild(div);
};

})();

