var TICKETFLOW_module = { host: 'www.ticketflow.com', affiliate_code: false, width: 300, height: 400, size: false, init: function(code) { this.affiliate_code = code; include_css('http://'+this.host+'/modules/widget/_template/css/iframe.css') document.write(''); }, change_widget_size: function(size) { if (size=="350x250") { this.size = size; this.width = 350; this.height = 250; } else if (size=="300x250") { this.size = size; this.width = 300; this.height = 250; } else { alert("Not a supported widget size"); } } } function get_module() { $.get('http://dev.ticketflow.local/widget/', function(html) { $('#ticketflow-widget').html(html); }); } function include_css(p_file) { var v_css = document.createElement('link'); v_css.rel = 'stylesheet' v_css.type = 'text/css'; v_css.href = p_file; document.getElementsByTagName('head')[0].appendChild(v_css); }