$(document).ready(function () {

    $('a[href*=#story], a[href*=#kontakt], a[href*=#galerie], a[href*=#modelle], , a[href*=#top], a[href*=#shop').click(function () {

        if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname)

        {
            $("img#img_story").attr({
                src: $imgpath + "b_story_dn.jpg"
            });
            $("img#img_modelle").attr({
                src: $imgpath + "b_modelle_dn.jpg"
            });
            $("img#img_galerie").attr({
                src: $imgpath + "b_galerie_dn.jpg"
            });
            $("img#img_kontakt").attr({
                src: $imgpath + "b_kontakt_dn.jpg"
            });
            $("img#img_shop").attr({
                src: $imgpath + "b_shop_dn.jpg"
            });

            var a = $(this.hash);
            var b = this.hash.split("#")[1];

            $("img#img_" + b).attr({
                src: $imgpath + "b_" + b + "_ov.jpg"
            });

            $("div#selected").text(b);
            a = a.length && a || $('[name=' + this.hash.slice(1) + ']');

            if (a.length) {
                var c = a.offset().top;
                $('html,body').animate({
                    scrollTop: c
                },
                600);
                return false
            }
        }
    })

});
function stop() {
    return false
}
document.onmousewheel = stop;
