var actionURL = '/get_all_comments'; var commentsOrder = 'oldest_first'; commentsCurrentPage = 0; loadSavedComment = function(id, page) { document.location.hash="#" + page + "/comment/" + id; commentsCurrentPage = 0; $.history.check(); } jQuery(function($) { $.history.init(function(hash){ if(commentsCurrentPage == -1) { commentsCurrentPage = 1; reloadComments(); return false; } var urlParams = /^(\d+)?\/?(comment\/(\d+))?$/.exec(hash); if(!urlParams) return false; var prevPage = commentsCurrentPage; commentsCurrentPage = urlParams[1] ? urlParams[1] : 1; if(urlParams[3]) { highlightComment = '#comment_' + urlParams[3]; } if(prevPage != commentsCurrentPage) { reloadComments(); } }, { unescape: ",/" }); $('div.filter input:radio').checkbox({cls:'jquery-radiobutton-dark', empty: '/skin/images/empty.png'}).bind('change', function(){ Spinner.show(); commentsOrder = $(this).val(); document.location.hash="#1"; commentsCurrentPage = 0; $.history.check(); return false; }); });