(function() { var session_storage = window.sessionStorage || {}; var menubar=jQuery("#menubar"), menuswitcher, content=jQuery("#the_page > .content"), pcontent=jQuery("#content"), imageInfos=jQuery("#imageInfos"), infoswitcher, theImage=jQuery("#theImage"), comments=jQuery("#thePicturePage #comments"), comments_button, commentsswitcher, comments_add, comments_top_offset = 0; if (session_storage['picture-menu'] == 'visible') { jQuery("head").append(''); } else { jQuery("head").append(''); } function hideMenu(delay) { menubar.hide(delay); menuswitcher.addClass("menuhidden").removeClass("menushown"); content.addClass("menuhidden").removeClass("menushown"); pcontent.addClass("menuhidden").removeClass("menushown"); session_storage['picture-menu'] = 'hidden'; } function showMenu(delay) { menubar.show(delay); menuswitcher.addClass("menushown").removeClass("menuhidden"); content.addClass("menushown").removeClass("menuhidden"); pcontent.addClass("menushown").removeClass("menuhidden"); session_storage['picture-menu'] = 'visible'; } function hideInfo(delay) { imageInfos.hide(delay); infoswitcher.addClass("infohidden").removeClass("infoshown"); theImage.addClass("infohidden").removeClass("infoshown"); session_storage['side-info'] = 'hidden'; } function showInfo(delay) { imageInfos.show(delay); infoswitcher.addClass("infoshown").removeClass("infohidden"); theImage.addClass("infoshown").removeClass("infohidden"); session_storage['side-info'] = 'visible'; } function commentsToggle() { if (comments.hasClass("commentshidden")) { comments.removeClass("commentshidden").addClass("commentsshown"); comments_button.addClass("comments_toggle_off").removeClass("comments_toggle_on");; session_storage['comments'] = 'visible'; comments_top_offset = comments_add.offset().top - parseFloat(comments_add.css('marginTop').replace(/auto/, 0)); } else { comments.addClass("commentshidden").removeClass("commentsshown"); comments_button.addClass("comments_toggle_on").removeClass("comments_toggle_off");; session_storage['comments'] = 'hidden'; } } jQuery(function(){ // side-menu show/hide if (menubar.length == 1 && p_main_menu!="disabled") { menuswitcher=jQuery("#menuSwitcher"); menuswitcher.html('