(function() {
var $current = null;
+ var menu_loaded = false;
$('.hidden-box-wrapper').each(function() {
var $hidden = $('.hidden-box', this);
$('.hidden-box-trigger', this).click(function(event) {
$current && $current.hide('fast');
$hidden.show('fast');
$current = $hidden;
+ if ($(this).hasClass('load-menu') && !menu_loaded) {
+ $.ajax({
+ url: '/katalog/',
+ dataType: "json",
+ }).done(function(data) {
+ $.each(data, function(index, value) {
+ $('#menu-' + index).html(value);
+ });
+ menu_loaded = true;
+ });
+ }
}
});
});
})();
+$('#show-menu').click(function(event) {
+ event.preventDefault();
+ $('#menu').toggle('slow');
+});
+$('#book-list-nav h2').click(function(event) {
+ event.preventDefault();
+ $('#book-list-nav-index').toggle();
+});
$('#themes-list-toggle').click(function(event) {