var curr_hash="",last_loaded_hash="";
function loadSurveyComments(b){var c=new Date,a=/.*apklausos\/(\d+)-.*.html.*/gi.exec(window.location.href),a=a!=null?a.length>1?a[1]:$("#curr_survey_id").val():$("#curr_survey_id").val();$href=gen_local_url("surveys","comments_fast","s_id="+a+"&cur_page="+b);$("#comments_content").load($href+($href.indexOf("no_header")!=-1?"":($href.indexOf("?")!=-1?"&":"?")+"no_header=1")+"&tms="+c.getHours()+""+c.getMinutes()+""+c.getSeconds()+""+Math.random(),null,function(){typeof $.fn.colorbox=="function"&&
$("#comments_content a.colorbox").colorbox(colorbox_settings);$("#loading").css("display","none")})}function checkUrlHash(){if(window.location.hash!=curr_hash&&window.location.hash!=""&&last_loaded_hash!=window.location.href){var b=/comment_page=(\d+)/gi.exec(window.location.hash);if(b!=null&&b.length>1)loadSurveyComments(b[1]),last_loaded_hash=curr_hash=window.location.hash}else window.location.hash==""&&curr_hash==""&&(curr_hash="comment_page=1",loadSurveyComments(1))}
$(document).ready(function(){setInterval(checkUrlHash,100)});
function navigate_survey_comment(b,c,a){var d=$(c).attr("rev");if(d!=null&&d!=""&&!confirm(d))return!1;$("#loading").css("top",a.pageY+15).css("left",a.pageX).css("display","block");var a=new Date,e=$(c).attr("rel"),b=/.*apklausos\/(\d+)-.*.html#comment_page=(\d+)/gi.exec(b),d=b[1],f=b[2],g=$(c).attr("more");$href=gen_local_url("surveys","comments_fast","s_id="+d+"&cur_page="+f);$("#"+e).load($href+($href.indexOf("no_header")!=-1?"":($href.indexOf("?")!=-1?"&":"?")+"no_header=1")+"&tms="+a.getHours()+
""+a.getMinutes()+""+a.getSeconds()+""+Math.random(),null,function(){typeof $.fn.colorbox=="function"&&$("#"+e+" a.colorbox").colorbox(colorbox_settings);g!=null&&eval(g+"('"+e+"')");$("#loading").css("display","none");last_loaded_hash="comment_page="+f});window.location.hash="#comment_page="+f;return!1};

