﻿


jQuery(document).ready(function () {

    // open all video in a pop up
    $(".video").fancybox({
        'padding': 0,
        'autoScale': false,
        'transitionIn': 'none',
        'transitionOut': 'none',
        'swf': { 'wmode': 'transparent', 'loop': false, 'menu': false, 'play': true }
    });

    // menu
    jQuery('ul.superfish').superfish({
        delay: 200,                            // one second delay on mouseout 
        animation: { opacity: 'show', height: 'show' },  // fade-in and slide-down animation 
        speed: 'fast',                          // faster animation speed 
        autoArrows: true,                           // disable generation of arrow mark-up 
        dropShadows: false                            // disable drop shadows 
    });


    $('#ImgGallery').css("visibility", "visible");

    // banner 
    $('#ImgGallery').cycle({
        fx: 'fade',
        speed: 5000
    });


    // init
    $("h3.section").next().hide();

    // toggle
    $("h3.section").click(function () {
        var isAlreadyOpen = $(this).next().css("display") == "block";

        $("h3.section").next().hide("normal");
        $("h3.section").removeClass("open");

        if (!isAlreadyOpen) { // do not display a block that user want to hide
            $(this).next().show("blind");
            $(this).addClass("open");
        }
    });

});

