Код
<style>
.cuzadpn, .subapoadminpanel {
-o-transition:margin-top .3s ease;
-webkit-transition:margin-top .3s ease;
-moz-transition:margin-top .3s ease;
}
#puzadpn {
-o-transition:height .3s ease;
-webkit-transition:height .3s ease;
-moz-transition:height .3s ease
}
.subapoadminpanel {
width: 100%;
height: 7px;
position: fixed;
background: rgb(200, 200, 200);
z-index: 999;
margin-top: 24px;
box-shadow: 0px 1px 3px #777;
cursor:pointer;
}
.subapoadminpanel:hover {
background: rgb(190, 190, 190);
}
</style>
<script>
// apo-ucoz.com
function setCookie(name, value, days) {
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
var expires = "; expires=" + date.toGMTString();
}
else var expires = "";
document.cookie = name + "=" + value + expires + "; path=/";
}
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
function eraseCookie(name) {
setCookie(name, "", -1);
};
$(document).ready(function() {
$('#puzadpn').before('<div class="subapoadminpanel"></div>');
if(getCookie('hideapoadmin')) {
$('#puzadpn').attr('style', 'height:0px;');
$('.cuzadpn').attr('style', 'margin-top:-24px;');
$('.subapoadminpanel').attr('style', 'margin-top:0px;');
apohider = 1;
} else {
apohider = 0;
$('#puzadpn').attr('style', 'height:24px;');
$('.cuzadpn').attr('style', 'margin-top:0px;');
$('.subapoadminpanel').attr('style', 'margin-top:24px;');
}
$('.subapoadminpanel').click(function() {
if(apohider == 1) {
apohider = 0;
$('#puzadpn').attr('style', 'height:24px;');
$(this).attr('style', 'margin-top:24px;');
$('.cuzadpn').attr('style', 'margin-top:0px;z-index:' + _uWnd.getTopZ());
eraseCookie('hideapoadmin');
}
else
{
apohider = 1;
$('#puzadpn').attr('style', 'height:0px;');
$(this).attr('style', 'margin-top:0px;');
$('.cuzadpn').attr('style', 'margin-top:-24px;');
setCookie('hideapoadmin', 1, 365);
};
});
});
// ApoTeam (c) 2013
</script>