cookie = {
set: function (c, d, b) {
if (b) {
var a = new Date;
a.setTime(a.getTime() + b * 24 * 60 * 60 * 1E3);
b = "; expires=" + a.toGMTString()
} else b = "";
document.cookie = c + "=" + d + b + "; path=/"
},
get: function (c) {
c = c + "=";
for (var d = document.cookie.split(";"), b = 0; b < d.length; b++) {
for (var a = d[b]; a.charAt(0) == " ";) a = a.substring(1, a.length);
if (a.indexOf(c) == 0) return a.substring(c.length, a.length)
}
return null
},
del: function (c) {
cookie.set(c, "", -1)
}
};
$('.bclick').click(function () {
$(this).attr('class') == 'bclick bclose' ? $(this).attr('class', 'bclick bopen') : $(this).attr('class', 'bclick bclose');
$('#' + $(this).attr('rel')).toggle();
cookie.set($(this).attr('rel'), $('#' + $(this).attr('rel') + ':hidden').length ? 1 : 0, 365);
});
var hblocks;
$(document).ready(function () {
$('.bcontent').each(function () {
hblocks = cookie.get($(this).attr('id'));
$('.bclick[rel="' + $(this).attr('id') + '"]').attr('class', hblocks == 1 ? 'bclick bopen': 'bclick bclose');
hblocks == 1 ? $(this).hide() : '';
});
});