

    var script = {

        self: this,

        menuTop: function()
        {
            var config = {
                 over: this.makeTall, // function = onMouseOver callback (REQUIRED)
                 timeout: 50, // number = milliseconds delay before onMouseOut
                 out: this.makeShort // function = onMouseOut callback (REQUIRED)
            };

            $("#menu-left li").stop().hoverIntent(config);
        },

        makeTall: function()
        {
            $(this).addClass('active');
            $('ul', this).eq(0).slideToggle('fast');
        },
        
        makeShort: function()
        {
            $(this).removeClass('active');
            $('ul', this).eq(0).slideToggle('fast');
        },

        formHelper: function()
        {
            $('input[type="text"], input[type="password"], textarea').each(function() {
                var default_value = this.value;
                $(this).focus(function() {
                    if (!$(this).hasClass('dirty'))
                        this.value = (this.value == default_value)? ''  : this.value;

                    $(this).parents('form').addClass('active');
                });

                $(this).blur(function() {
                    if (!$(this).hasClass('dirty'))
                        this.value= (this.value== '') ? default_value   : this.value;

                    if ($(this).val().length == 0 || !$(this).hasClass('dirty'))
                        $(this).parents('form').removeClass('active');
                });
            });
        },

        messageOne: function()
        {
            $("#messageOne").fancybox({
                    'titlePosition'		: 'inside',
                    'transitionIn'		: 'none',
                    'transitionOut'		: 'none'
            });

            var num = 123456789;
            $('#messageOne').bind('click', function() {
                  href = $(this).attr('href');
                  hash = href.split('#');
                  content = $('#content-'+hash[1]).html();
                  $.cookie(url,num, {path: '/'});
            });

            if($.cookie(url) == num) {

            } else {
                $('#messageOne').trigger('click');
            }
        },

        gallery: function()
        {
            $("a[rel=lightbox-tour]").fancybox({
                    'transitionIn'		: 'none',
                    'transitionOut'		: 'none',
                    'titlePosition' 	: 'over',
                    'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
                        return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + ' ' + title + '</span>';
                    }
            });
        }
    };


    /* jQuery
    ``````````````````````````````````````````````````````````````````````````` */

        $(document).ready(function() {

            script.menuTop();
            script.messageOne();
            script.gallery();
            script.formHelper();

        });
