/*
 * JS awesome courtesy of Ferenc Radius (ferenz1@gmail.com)
 *
 * @author: lang.huxley
 * @version: 7.0.1
 *
 */

$.requireCache = false;

$.require([
    "core/Class.js",
    "core/dom-extend.js",
    "mvc/Controller.js"
    ]);

mvc.add(new mvc.Urls(""),
    [
        "cufon/cufon-yui.1.0.9.js",
        "cufon/droid.font.js",
        "jquery/jcarousel.js"
    ],
        new mvc.Action(
    {
        onload: function() {

            Cufon.replace("#navigation a, h1, h2, h3, caption", { hover: true, textShadow: "2px 1px 0 #000" });

        },
        success: function() {

            $('tbody tr:odd').addClass('odd');
            $('tbody tr:even').addClass('even');

            $(".carousel ul").jcarousel({
                animation: 'fast',
                wrap: 'both'
            });

        }
    })
);

mvc.add(new mvc.Urls("en/Location"),
    [
        "outline/maps.js"            
    ],
        new mvc.Action(
    {
        success: function() {

            initialize();

        }
    })
);

mvc.add(new mvc.Urls("reg"),
    [
        "jquery/jquery.tipsy.js"
    ],
        new mvc.Action(
    {
        success: function() {

            $('#navigation li:last-child').addClass('active');

            $("label em, legend em").tipsy({ gravity: 'w', fade: true });

        }
    })
);

mvc.add(new mvc.Urls("(/|Home)$"),
    [
        "jquery/jquery.tweet.js",
        "jquery/jquery.easing.1.3.js",
        "jquery/jquery.cycle.all.min.js"
    ],
        new mvc.Action(
    {
        success: function() {

            $("#tweet").tweet({
                avatar_size: 40,
                query: "from:outline2010+OR+to:outline2010",
                count: 10,
                loading_text: "Searching for tweets..."
            });

            $("#homepage-banner").after('<div id="pager-nav">').cycle({
                fx: 'scrollLeft',
                pause: 1,
                pager: '#pager-nav',
                timeout: 6000
            });

        }
    })
);


