Alexanderos,
Нун вот так:
$(document).ready(function(){
var panelHeight = $("#panel .region-inner").height();
var panelTop = panelHeight - 20;
if (($.cookie('cookie_panel_status')) == 'active') {
*!*
$("#panel .region-inner").animate({top: 0 + "px"}, 1, "linear", function(){
$('#btn-panel-slide').click()
});
*/!*
}
else {
$("#panel .region-inner").animate({top: "-" + panelTop + "px"}, 1);
}
$('#btn-panel-slide').toggle(function () {
$('#btn-panel-slide').addClass("active");
$.cookie('cookie_panel_status', 'active', { expires: 7, path: '/' });
$("#panel .region-inner").animate({top: 0 + "px"}, 500);
}, function() {
$("#panel .region-inner").animate({top: "-" + panelTop + "px"}, 500);
$('#btn-panel-slide').removeClass("active");
$.cookie('cookie_panel_status', '', { expires: 7, path: '/' });
});
});