$(document).ready(function(){
var default_content = "";
$(function() {
    checkURL();
    $('ul li a').click(function(e) {
        checkURL(this.hash);});
    default_content = $('#pageContent').html();
    setInterval("checkURL()", 250);});});
var lasturl = "";
function checkURL(hash) {
    if (!hash) hash = window.location.hash;
    if (hash != lasturl) {
        lasturl = hash;
        if (hash == "") $('#pageContent').html(default_content);
        else loadPage(hash);}}
function loadPage(url) {
    url = url.replace('#page', '');
    $('#loading').css('visibility', 'visible');
    $.ajax({
        type: "POST",
        url: "/ru/load_page.php",
        data: 'page=' + url,
        dataType: "html",
        success: function(msg) {
            if (parseInt(msg) != 0) {
                $('#pageContent').html(msg);
                $('#loading').css('visibility', 'hidden');
            }}});}
$(function() {
    $('ul#qm0 li').hover(function() {
        $('div', this).css('display', 'block');},
    function() {
        $('div', this).css('display', 'none');});
$(function() {
			$("a[href='/ru/spain.html']").attr('href', '#page49');	
		$("a[href='/ru/gb.html']").attr('href', '#page48');	
		$("a[href='/ru/gr.html']").attr('href', '#page47');
		$("a[href='/ru/hol.html']").attr('href', '#page46');
		$("a[href='/ru/dan.html']").attr('href', '#page45');
		$("a[href='/ru/belg.html']").attr('href', '#page44');
		$("a[href='/ru/swz.html']").attr('href', '#page43');
		$("a[href='/ru/sw.html']").attr('href', '#page42');
		$("a[href='/ru/port.html']").attr('href', '#page41');
		$("a[href='/ru/austr.html']").attr('href', '#page40');
		$("a[href='/ru/it.html']").attr('href', '#page39');
		$("a[href='/ru/fr.html']").attr('href', '#page38');
		$("a[href='/ru/ger.html']").attr('href', '#page37');
		$("a[href='/ru/maps-index.html']").attr('href', '#page36');
		$("a[href='/ru/incoterms.html']").attr('href', '#page34');
		$("a[href='/ru/fiatadoc.html']").attr('href', '#page35');
		$("a[href='/index.html']").attr('href', '#page8');
		$("a[href='/ru/legal_services.html']").attr('href', '#page1');
		$("a[href='/ru/customs.html']").attr('href', '#page2');
		$("a[href='/ru/store.html']").attr('href', '#page3');
		$("a[href='/ru/sea_transportation.html']").attr('href', '#page4');
		$("a[href='/ru/rail_transportation.html']").attr('href', '#page5');
		$("a[href='/ru/motor_transportation.html']").attr('href', '#page6');
		$("a[href='/ru/container_traffic.html']").attr('href', '#page7');
		$("a[href='/ru/about_us.html']").attr('href', '#page9');
		$("a[href='/ru/documents.html']").attr('href', '#page10');
		$("a[href='/ru/details.html']").attr('href', '#page11');
		$("a[href='/ru/photos.html']").attr('href', '#page15');
		$("a[href='/ru/legislation.html']").attr('href', '#page12');
		$("a[href='/ru/contact.html']").attr('href', '#page14');
		$("a[href='/ru/address.html']").attr('href', '#page13');
		$("a[href='/ru/photos1.html']").attr('href', '#page16');
		$("a[href='/ru/photos1-1.html']").attr('href', '#page26');
		$("a[href='/ru/photos1-2.html']").attr('href', '#page27');
		$("a[href='/ru/photos1-3.html']").attr('href', '#page28');
		$("a[href='/ru/photos2.html']").attr('href', '#page17');
		$("a[href='/ru/photos2-1.html']").attr('href', '#page29');
		$("a[href='/ru/photos3.html']").attr('href', '#page18');
		$("a[href='/ru/photos3-1.html']").attr('href', '#page30');
		$("a[href='/ru/photos3-2.html']").attr('href', '#page31');
		$("a[href='/ru/photos3-3.html']").attr('href', '#page32');
		$("a[href='/ru/photos3-4.html']").attr('href', '#page33');
		$("a[href='/ru/contact-1.html']").attr('href', '#page19');
		$("a[href='/ru/contact-2.html']").attr('href', '#page20');
		$("a[href='/ru/contact-3.html']").attr('href', '#page21');
		$("a[href='/ru/contact-4.html']").attr('href', '#page22');
		$("a[href='/ru/contact-5.html']").attr('href', '#page23');
		$("a[href='/ru/contact-6.html']").attr('href', '#page24');
		$("a[href='/ru/contact-7.html']").attr('href', '#page25');
		});
		$("a#cls").click(function(){$("div#mnuu").hide();});
});

