


var link = document.createElement('link');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('type', 'text/css');
link.setAttribute('href', 'http://cdn.mobstac.com/mss/2.17/static/badge/badge.css?v=');

var mobile = document.createElement('img');
mobile.setAttribute('src', 'http://cdn.mobstac.com/static/2.15/images/mobile.png');

var mobileholder = document.createElement('div');
mobileholder.appendChild(mobile);

var logo = document.createElement('img');
logo.setAttribute('src', 'http://cdn.mobstac.com/static/2.15/images/mobstac_logo_small.png');

var banner = document.createElement('div');
banner.innerHTML += "<small>My blog is mobile friendly</small><br/><br/>";
banner.appendChild(logo);
banner.setAttribute('id', 'mstacbadge');

var linkholder = document.createElement('div');
linkholder.appendChild(mobileholder);
linkholder.appendChild(banner);
linkholder.setAttribute('id', 'badgebox');

var anch = document.createElement('a');
anch.setAttribute('href', 'http://mobstac.com/b');
anch.setAttribute('target', '_blank');
anch.appendChild(linkholder);

document.getElementById('mobStacBadge').appendChild(link);
document.getElementById('mobStacBadge').appendChild(anch);

