//Determine browser
var ua = window.navigator.userAgent;
var is_ie = /MSIE|Trident/.test(ua);

if (! is_ie ) {
    if(window.location.href.indexOf("file:///") > -1) {
        $('.loader').css('display','none');
    }
    else {
        //Create loader div
        $('<div class="loader"></div>').appendTo('body');
    }    
}

//fade out after the window is loaded
$(window).on("load", (function() {
    $(".loader").fadeOut("slow");
}));

//Remove the loader completely
$('.loader').remove();