/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$(document).ready(function() {
    retrieve_twitter();
    var $news = $('#news');
    $news.serialScroll({
        items:'div',
        duration:10000,
        force:true,
        axis:'y',
        easing:'linear',
        lazy:true,
        interval:1,
        step:2
    });
    $news.hover(function(){$(this).trigger('stop')},function(){$(this).trigger('start')});

    function retrieve_twitter() {
        var _base = "assets/snippets/twitterretrieve/";
    var first_sent = 0;
    var count = 0;
    while(count !=2)
        {
            if(first_sent != 0)
        {
            var refresh_twitter = setInterval(
            function ()
            {
                $('#news').load(_base +'interact.php');
            },300000);
        }
    else
        {
            $('#news').load(_base +'interact.php');
            first_sent =1;
        }
        count++;
        }
    }
     

     // or just call it like:
     // $('#widget').newsScroll();  
})


