var body = document.getElementsByTagName('body')
var stylesheet = document.createElement('link');
+var host = 'www.wolnelektury.pl';
+
/* set attributes of created elements */
stylesheet.setAttribute('type', 'text/css');
stylesheet.setAttribute('rel', 'stylesheet');
-stylesheet.setAttribute('href', 'http://lektury.staging.nowoczesnapolska.org.pl/static/css/widget.css');
-linkLogo.setAttribute('href', 'http://lektury.staging.nowoczesnapolska.org.pl');
-logo.setAttribute('src', 'http://lektury.staging.nowoczesnapolska.org.pl/static/img/logo.png');
-form.setAttribute('action', 'http://lektury.staging.nowoczesnapolska.org.pl/katalog/szukaj/');
+stylesheet.setAttribute('href', 'http://'+host+'/static/css/widget.css');
+linkLogo.setAttribute('href', 'http://'+host);
+logo.setAttribute('src', 'http://'+host+'/static/img/logo.png');
+form.setAttribute('action', 'http://'+host+'/katalog/szukaj/');
form.setAttribute('method', 'get');
form.setAttribute('accept-charset', 'utf-8');
form.setAttribute('id', 'wl-form');
inputText.setAttribute('id', 'id_qq');
inputText.setAttribute('size', '13');
inputSubmit.setAttribute('type', 'image');
-inputSubmit.setAttribute('src', 'http://lektury.staging.nowoczesnapolska.org.pl/static/img/search.png');
+inputSubmit.setAttribute('src', 'http://'+host+'/static/img/search.png');
inputSubmit.setAttribute('style', 'position:relative; top:5px; margin-left:5px');
/* import jquery and autocomplete */
var scriptJ = document.createElement('script');
scriptJ.setAttribute('type', 'text/javascript');
-scriptJ.setAttribute('src', 'http://lektury.staging.nowoczesnapolska.org.pl/static/js/jquery.js');
+scriptJ.setAttribute('src', 'http://'+host+'/static/js/jquery.js');
var scriptAutoComplete = document.createElement('script');
scriptAutoComplete.setAttribute('type', 'text/javascript');
-scriptAutoComplete.setAttribute('src', 'http://lektury.staging.nowoczesnapolska.org.pl/static/js/jquery-ui-1.8.2.custom.min.js');
+scriptAutoComplete.setAttribute('src', 'http://'+host+'/static/js/jquery-ui-1.8.2.custom.min.js');
var scriptInit = document.createElement('script');
scriptInit.setAttribute('type', 'text/javascript');
-scriptInit.setAttribute('src', 'http://lektury.staging.nowoczesnapolska.org.pl/static/js/widgetInit.js');
+scriptInit.setAttribute('src', 'http://'+host+'/static/js/widgetInit.js');
body[0].appendChild(scriptJ);
body[0].appendChild(scriptAutoComplete);