/**
 * TikiCMS
 * Copyright (C) 2009-2010, Tiki Web Inteligente Ltda.
 * @requires jQuery 1.3.2 or latter
 *
 * $Id: application_controller_home.js 12 2010-03-03 20:53:29Z caio $
 */

Application.Controller.Home = (function() {

    // gambiarra enquanto não consigo mandar o objeto jQuery como argumento desta função
    var $ = jQuery;

    function index() {

        $("a[rel^='prettyPhoto']").prettyPhoto({theme:'light_rounded'});

        $("#cases").jCarouselLite({
            btnNext: "#btNext",
            btnPrev: "#btPrev",
            speed: 700,
            visible: 1,
            scroll: 1,
            circular: false
        });

        //BOX LARANJA DO PORTIFÓLIO
        speed = 100;
        $('#cases li ul li').hover(function(){
            $(this).find('div').animate({
                top: '-54px'
                }, speed, function(){
                    $(this).find('p').fadeIn(50);
                }
            );
        },function(){
            $(this).find('p').fadeOut(50, function(){
                $(this).parent().animate({
                    top: '0'
                }, speed);
            });

        });
    }

    return {
        'index': index
    };

})();
