File: /home/harmonyg/www/js/hgjscript.js
$(document).ready(function(){
var thisUri = getThisUri()?getThisUri():'?option=menu&id_menu=1';
history.replaceState({uri:thisUri}, null, thisUri);
$(".menu a, .widget-area a").each(function(index) {
var uri = $(this).attr('href');
if(uri.indexOf('id_menu') !== -1 || uri.indexOf('id_submenu') !== -1 ) {
//if(uri.substring(uri.indexOf('id_menu=')+8) !== '1' ) {
$(this).unbind('click');
$(this).click(function(event) {
var file2='menu1.php';
if(uri.indexOf('id_menu') !== -1) file2='menu1.php';
if(uri.indexOf('id_submenu') !== -1 ) file2='submenu1.php';
event.preventDefault();
history.pushState({uri:uri}, null, uri);
openPage(uri,file2);
return false;
});
//}
}
});
$(window).bind('popstate', function(event) {
uri1=history.state.uri;
var file3='menu1.php';
if(uri1.indexOf('id_menu') !== -1) file3='menu1.php';
if(uri1.indexOf('id_submenu') !== -1 ) file3='submenu1.php';
openPage(uri1,file3);
});
function openPage(uri,file1){
$.ajax({ type: 'get',url: file1,data: "'"+uri+"'",dataType: 'html', success: function(data) {
$('#post-467').html(data);
$("a[rel^='prettyPhoto']").prettyPhoto({animationSpeed: 'normal',showTitle: true,allowresize: false,counter_separator_label: '/',theme: 'light_rounded',autoplay: false,overlay_gallery: false, hideflash: false,deeplinking: false,modal: false,social_tools: false });
$('html, body').animate({scrollTop:0}, 'fast');
} });
}
function getThisUri(){
var loc = (event.location || (event.originalEvent && event.originalEvent.location) || document.location);
return loc.pathname.substr(1);
}
})