﻿jQuery(document).ready(function () {
    $(window).resize(function () {
        if ($(window).width() < 960) {
            $(".navi_bar").hide();
        }

        else if ($(window).width() >= 960) {
            $(".navi_bar").show();
        }
    });

    $(".shadow").css("height", $(document).height()-4).hide();




    $("a.ToogleSidebar").click().toggle(function () {
        //		        $('.main').fadeOut(1000);
        $('.sidebar').animate({
            width: 'show',
            opacity: 'show'
        }, 'slow');
//        $('.navi_bar').css("width", "937px");
        

    }, function () {
        $('.sidebar').animate({
            width: 'hide'
        }, 'slow');
//        $('.navi_bar').animate({
//            width: '37px'
//        }, 'slow');

        //                $('.main').fadeIn(1000);  
    });

    $(".button").hover(function () {
        $(this).attr("src", "img/navi_button_right_hover.png");
    }, function () {
        $(this).attr("src", "img/navi_button_right.png");
    });

    $("a.ToogleSidebar").click(function () {
        $(".shadow").toggle();
    });
});

//$(window).scroll(function () {
//    //            $(".navi_bar").css("right", $(window).scrollLeft() + "px");
//    if ($(window).scrollLeft() > 0) {
//        $(".navi_bar").css("right", "-" + $(window).scrollLeft() + "px");
//    }
//    else if ($(window).scrollLeft() == 0) {
//        $(".navi_bar").css("right", "0px");    
//    }
//});


