(function(){ //block miniheader creation if device = mobile if (navigator.userAgent.match(/(Android|webOS|iPhone|iPod|BlackBerry|Windows Phone)/i) && (window.screen.width < 768)) return; /* head */ var H = document.getElementsByTagName('head')[0]; /* body */ var B = document.getElementsByTagName('body')[0]; /* style */ var S = document.createElement("STYLE"); var S_rules = document.createTextNode('#Leonardo_Navigation {height:40px;z-index:10002; position:fixed; top:0;left:0; width:100%;font-family:Verdana!important;line-height:normal!important;text-align:center;background-color:#8FB7FB;}#Leonardo_Navigation {background: -webkit-linear-gradient(#8FB7FB, #608CD7); background: -o-linear-gradient(#8FB7FB, #608CD7); background: -moz-linear-gradient(#8FB7FB, #608CD7); background: linear-gradient(#8FB7FB, #608CD7);}#Leonardo_Navigation-Wrapper {height:40px;width:996px;margin:0 auto;}#Leonardo_Navigation-text {float:left;padding-top:13px;font-size:13px;color:;}#Leonardo_Navigation-logo {height:40px;float:left;}#Leonardo_Navigation-logo-img {height:40px;float:left;}#Leonardo_Navigation-logo-img img {max-height:40px;border:0;margin:0;margin-left:-20px;}#Leonardo_Navigation-Wrapper ul {-webkit-padding-start:0;float:right; padding-top:16px; font-family:"Trebuchet MS"!important;margin:0!important;font-size:8px!important;}#Leonardo_Navigation-Wrapper ul li {display:inline;margin:0;padding:0;list-style-type:none;font-size:8px!important;border-left:1px solid #a5a5a5; }#Leonardo_Navigation-Wrapper ul li a {color:#FFFFFF;font-family: "Trebuchet MS"!important;text-decoration:none;font-size:11px!important;font-weight:bold;padding-left:4px;padding-right:4px;white-space:nowrap }#Leonardo_Navigation-Wrapper ul li a:hover { color:#a5a5a5;background-color:transparent!important;}#Leonardo_Navigation-custom-logo, #Leonardo_Navigation-share {height:40px;float:right;margin-left:10px!important}#Leonardo_Navigation-custom-logo img, #Leonardo_Navigation-share img {max-height:38px;border:0;}'); S.appendChild(S_rules); /* Insert style to head */ H.appendChild(S); /* Miniheader */ var MH = document.createElement('div'); /* main container */ MH.id = 'Leonardo_Navigation'; /* Insert miniheader wrapper */ var W = document.createElement('div'); /* contenitore interno centrato */ W.id = 'Leonardo_Navigation-Wrapper'; /* Container logo and text */ var L = document.createElement('div'); /* contenitore logo Leonardo */ L.id = 'Leonardo_Navigation-logo'; /* Text container */ var T = document.createElement('div'); T.id = 'Leonardo_Navigation-text'; T.appendChild(document.createTextNode("")) /* Logo link container */ var A_L = document.createElement('a'); A_L.href = 'http://www.leonardo.it'; A_L.title = 'Visita http://www.leonardo.it'; A_L.rel = 'nofollow'; /* Logo container */ var L_I = document.createElement('div'); L_I.id = 'Leonardo_Navigation-logo-img'; /* Img logo Leonardo */ var I = document.createElement('img'); I.src = '//www.leonardo.it/script/img/leo_leonardo.png'; I.alt = 'Leonardo.it'; /* Insert image to link tag */ A_L.appendChild(I); /* Insert link+image to logo container */ L_I.appendChild(A_L); W.appendChild(L); L.appendChild(T); L.appendChild(L_I); /* FB share button */ if(typeof fbLikeUrl == 'string'){ var FBW = document.createElement('div'); FBW.id = 'Leonardo_Navigation-share'; var FBA = document.createElement('a'); FBA.href = 'https://www.facebook.com/sharer/sharer.php?u='+fbLikeUrl; FBA.target = '_blank'; FBW.appendChild(FBA); var FBI = document.createElement('img'); FBI.src = '//www.leonardo.it/script/img/fblike.png'; FBA.appendChild(FBI); W.appendChild(FBW); } /* Custom logo */ if(typeof customLogo == 'string'){ var CLW = document.createElement('div'); CLW.id = 'Leonardo_Navigation-custom-logo'; var CL = document.createElement('img'); CL.src = customLogo; CLW.appendChild(CL); W.appendChild(CLW); } /* custom links */ if(typeof custom_links == 'object') W.appendChild(LNKS); /* Insert miniheader content */ MH.appendChild(W); /* Insert miniheader to body */ var delay = 1 setTimeout(function(){ B.insertBefore(MH, B.childNodes[0]); var spacer = document.createElement("DIV"); spacer.id = 'Leonardo_Navigation_spacer'; spacer.setAttribute('style','width:100%;height:40px;clear:both;'); B.insertBefore(spacer, B.childNodes[0]); }, delay); })();