blits,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style>#strochka {position:fixed; font-family:Tahoma; border-bottom:1px dashed;
background:white; top:0px; right:0px; width:100%; height:34px; z-index:99999; overflow:hidden;}
#strochka_link { float:left; text-align:left; display:block;width:100%; height:32px; line-height:32px; padding-left: 20px; }
#strochka_link a { display:block; color:#0061c1; text-decoration:none; font-weight:normal; font-size:23px; }
#strochka_link a:hover { text-decoration:underline; font-weight:500; color:red;}
#strochka_add { float:right; width:28%; text-align:left; height:34px; line-height:34px; color:#0061c1; }
#strochka_add a { display:block; color:gray; padding-left:32px; background:url(http://nolix.ru/a/q.png) 6px 4px no-repeat; font-size:12px; text-decoration:none; font-weight:normal; }
#strochka_add a:hover { text-decoration:underline; }
body {padding-top:34px !important;}</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
jQuery.fn.hide_by_click = (function() {
var arrSelector = [],
tracking = function(event) {
$.map(arrSelector, function(el) {
if (event.target != el && !$(el).has(event.target).length) $(el).fadeOut()
})
}
return function(add) {
$(document).off({'click' : tracking });
this.each(function(indx, el) {
if (add) arrSelector.push(el);
else {
var indx = $.inArray(el, arrSelector);
if (indx != -1) arrSelector.splice(indx, 1)
}
});
arrSelector.length && $(document).on({'click' : tracking });
return this
}
}())
$(function() {
$("#strochka_link").hide_by_click(true);
});
</script>
</head>
<body>
<div class="wrap">
<div id="strochka">
<div id="strochka_link"><a href="/" title="http://poleznietovari.info/readme/offers?group_id=contextbar&sub_id=part1" rel="nofollow" target="_blank">Реклама :)</a></div>
</div>
<p>Строчка</p><p>Строчка</p><p>Строчка</p><p>Строчка</p><p>Строчка</p><p>Строчка</p><p>Строчка</p><p>Строчка</p><p>Строчка</p><p>Строчка</p><p>Строчка</p><p>Строчка</p><p>Строчка</p><p>Строчка</p><br>
</div>
</body>
</html>