﻿(function ($) {
    $.fn.scrollToMe = function (duration) {
        if (!duration) duration = 2000;
        $('html, body').animate({
            scrollTop: $(this).offset().top
        }, duration);
        return $(this);
    };
})(jQuery);

if (typeof (console) === "undefined") { console = { log: function () { } }; }

$(document)
    .ajaxStart(function () {
            $('div#content').css('opacity', '0.5')
            //changeFavicon('/Content/images/ajax-loader.gif')
        })
    .ajaxComplete(function () {
            $('div#content').css('opacity', '1')
            //changeFavicon('/favicon.ico')
        });

function changeFavicon(imagepath) {
    $('link[type=image/x-icon]').remove();
    $('<link type="image/x-icon" rel="shortcut icon" href="' + imagepath + '" />').insertAfter('head');
} 


