$(document).ready(function () {

    // Logo intro
    $("#logo a").mouseenter(function () {
        $(this).stop().animate({
            "top": "-3"
        },
        "fast");
    }).mouseleave(function () {
        $(this).stop().animate({
            "top": "0"
        },
        "fast");
    });

    // Linked images
    $("a img").mouseenter(function () {
        $(this).stop().fadeTo("fast", .7);

    }).mouseleave(function () {
        $(this).stop().fadeTo("fast", 1);
    });

    // Lazy load
    $("img").lazyload({
        placeholder: "/img/work/load_thumb.png",
        effect: "fadeIn",
        threshold: -100
    });

    // Shadowbox
    Shadowbox.init({
        language: 'en',
        players: ['img', 'swf', 'flv']
    });

    // Work - Section toggles
    $("#section_interfaces .toggle_btn").toggle(
    function () {
        $(this).addClass("active");
        $("#section_interfaces").stop().animate({ height: 351 }, 1000);
    },
    function () {
        $(this).removeClass("active");
        $("#section_interfaces").stop().animate({ height: 110 }, 1000);
    });

    $("#section_web .toggle_btn").toggle(
    function () {
        $(this).addClass("active");
        $("#section_web").stop().animate({
            height: 351
        },
        1000);
    },
    function () {
        $(this).removeClass("active");
        $("#section_web").stop().animate({
            height: 110
        },
        1000);
    });
    $("#section_design .toggle_btn").toggle(
    function () {
        $(this).addClass("active");
        $("#section_design").stop().animate({
            height: 351
        },
        1000);
    },
    function () {
        $(this).removeClass("active");
        $("#section_design").stop().animate({
            height: 110
        },
        1000);
    });
    $("#section_logo_icon .toggle_btn").toggle(
    function () {
        $(this).addClass("active");
        $("#section_logo_icon").stop().animate({
            height: 351
        },
        1000);
    },
    function () {
        $(this).removeClass("active");
        $("#section_logo_icon").stop().animate({
            height: 110
        },
        1000);
    });
    $("#section_illustration .toggle_btn").toggle(
    function () {
        $(this).addClass("active");
        $("#section_illustration").stop().animate({
            height: 351
        },
        1000);
    },
    function () {
        $(this).removeClass("active");
        $("#section_illustration").stop().animate({
            height: 110
        },
        1000);
    });
    $("#section_presentations .toggle_btn").toggle(
    function () {
        $(this).addClass("active");
        $("#section_presentations").stop().animate({
            height: 351
        },
        1000);
    },
    function () {
        $(this).removeClass("active");
        $("#section_presentations").stop().animate({
            height: 110
        },
        1000);
    });
});