$(document).ready(function() {
    // animace rozbaleni ostatnich pripadovych studii a referenci
    $("#case_study_more").click(function () {
        $("#page_case_study div.next_others").slideToggle();
        return false;
    });
    $("#reference_more").click(function () {
        $("#more-references").slideToggle();
        return false;
    });

    // animace rozbaleni kontaktniho formulare v sekci Nase sluzby
    $("#contact-form-switch").click(function () {
        $("#quick_contact #contact-form").slideToggle();
        $(this).blur();
        return false;
    });

    // otevreni mapy Google po vyplneni "Kudy k nam" v kontaktech
    $("#map_form").submit(function () {
        var address = $("#map_form #address").val();
        
        if ('' != address) {
            address = "http://maps.google.com/maps?q=from:" + address + " to:Mariánské náměstí 1 Brno";
            window.open(address);
        }

        return false;
    });

    var options =
      // horizontal Dock with images expanding downwards in the vertical axis...
    { align: 'middle'
      // set the maximum minor axis (vertical) image dimension to 48px
    , size: 16
      // add labels..
    , labels: false
      // This controls the relationship between the distance from the cursor and the amount of expansion of any affected image within that distance.
    , coefficient: 1.1
      // Attenuation distance from cursor, ie the distance (in pixels) from the cursor that an image has to be within in order to have any expansion applied.
    , distance: 20
    };

    $('#icons').jqDock(options);
});

function slideUpContactForm()
{
    $("#quick_contact #contact-form").slideUp();
}

