﻿
App = function () {

    /* Private */

    /* Properties */

    var cmp = {};





    /* Defaults */

    TVI.debug = true;





    /* Methods */

    var init = function () {

        /* Constructor */

        $('#nav LI A').hover(function () {

            $(this).siblings('SPAN').clearQueue().animate({ height: 30 }, 100);

        }, function () {

            if (!$(this).parent().hasClass('selected')) {
                $(this).siblings('SPAN').animate({ height: 5 }, 100);
            }

        });

        if ($('.cycle').length != 0) {
            $(window).load(function () {
                $('.cycle').cycle();
            });
        }

    };


    var menu = function (name) {
        TVI.ready(function () {

            $('#nav' + name).addClass('selected');

        });
    };


    /* Public */

    TVI.apply(cmp, {

        /* Properties */

        menu: function (name) {

            menu(name);

        }

    });


    TVI.ready(init);


    return cmp;


} ();
