var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
 //document.write(escape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));




$(function () {
    $(".cookiesDiv").dialog({
        title: 'Om cookies',
        autoOpen: false,
        bgiframe: true,
        modal: true,
        position: [20, 20]
    });
});



function showOmCookies() {
    $('.cookiesDiv').dialog('open');
}

var runBlocker = false;
var ajaxTimer;

function showBlocker() {
    $.blockUI({
        message: $('img#WaitImage'),
        css: {
            top: ($(window).height() - 100) / 2 + 'px',
            left: ($(window).width() - 100) / 2 + 'px',
            width: '100px'
        }
    });
}


$().ajaxStart(function () {
    runBlocker = true;
    ajaxTimer = setTimeout("showBlocker()", 1500);
});

$().ajaxStop(function () {
    $.unblockUI();
    runBlocker = false;
    clearTimeout(ajaxTimer);
});
    


