//Load stylesheet (function(){ var css = '#sortere-plugin-wrapper { min-width: 200px; padding: 0 15px 15px; border-radius: 3px; } .sortere-plugin-inline-block { display: inline-block; vertical-align: middle; } #sortere-plugin-header img { border: none; border-radius: 0; box-shadow: none; margin: 0 20px 0 0; } #sortere-plugin-form form { background: #fff; border: 1px solid #e6e6e7; border-radius: 3px; height: 32px; cursor: text; } #sortere-plugin-form form .outside-me { background: url("https://sortere.no/wp-content/plugins/sortere-mini/images/hint.png") no-repeat top left transparent; } #sortere-plugin-form form .inside-me { background: none; } #search_for { border:none; height: auto; width: 75%; height: 26px; font-size: 16px; padding: 3px 0 3px 15px; margin: 3px 0 3px 3px; } #search_for:focus { outline: none; } #sortere-go-button { float: right; height: 30px; width: 34px; background: url("https://sortere.no/wp-content/plugins/sortere-mini/images/go-sortere.png") no-repeat top left; border: 0; box-shadow: none; } @media screen and (max-width: 765px) { #sortere-plugin-form form .outside-me { background: url("https://sortere.no/wp-content/plugins/sortere-mini/images/hint-small.png") no-repeat top left transparent; } }#sortere-plugin-wrapper { background: #efeeea; border: 1px solid #e6e6e7; } #sortere-plugin-form form { box-shadow: 1px 1px 3px #ccc; } #sortere-plugin-form form input{ height: 28px; } #sortere-plugin-form form input#sortere-go-button{ height: 32px; }'; var style = document.createElement('style'); style.setAttribute('type', 'text/css'); if(style.styleSheet)style.styleSheet.cssText = css; //IE else style.appendChild(document.createTextNode(css)); //Other document.getElementsByTagName('head')[0].appendChild(style); })(); var htmlOutput = '
sortere.no logo
Hva vil du kildesortere?
'; var formContainer = document.getElementById('sortere-search'); formContainer.innerHTML = htmlOutput; function goSortere(e) { var term = document.getElementById('search_for').value; var url = 'https://sortere.no/privat/sok/' + term; window.open(url,'_blank'); } function sortereSearchInputFocus() { var d = document.getElementById("search_for"); d.className = "inside-me"; } function sortereSearchInputBlur() { var d = document.getElementById("search_for"); var c = d.value; if(c == "") { d.className = "outside-me"; } } function focusInputSortere() { document.getElementById('search_for').focus(); }