// file: lf-imageoverlay.js
// author: magnus.forsberg@ottboni.se
// modified 2009-11-16: added function to control height and hide text - Jouni Pakarinen
// modified 2009-11-17: removed need for hover to start - Ricardo Demanet, Jouni Pakarinen

$(document).ready(function(){
    var overlayTimer = {};
    var imageOverlayWidth = $('.lf-Content-imageOverlay').outerWidth();
    $('.lf-Content-imageOverlay').css("right","-"+imageOverlayWidth+"px");
    
    overlayTimer = $.timer(2500,function(){
        if($.browser.msie){
            $('.lf-Content-imageOverlay').animate({ right:'-1px' }, {queue:false, duration:750, easing: 'easeOutCubic'});
        }
        else{
            $('.lf-Content-imageOverlay').animate({ right:'0px' }, {queue:false, duration:750, easing: 'easeOutCubic'});
        }
    });
    
    var overlayIntroHeight = $('.lf-Content-imageOverlay .Intro');
    
    if (overlayIntroHeight.height() > 100){
        overlayIntroHeight.height('100px');
    }
});