//Ajax Handlers for Updating Videos (being watched, hot videos etc) on the Home Page
function update_hot_videos(){
	killVideoThumbs();
	$('#hot_videos').html('<div style="margin-top:139px;text-align:center;width:100%;"><img src="images/spinna.gif" alt="Loading your request" /></div>');

    $.ajax({
        type: "GET",
        url: '/ajax/hot_videos.php',
        data: ({
                m: Math.floor(Math.random()*100000)
              }),
        success: hot_videos_handler
    });
}

function hot_videos_handler(xhr){
	$('#hot_videos').html(xhr);
	initMultiviewToolTip();
}

function update_watched_videos(){
	killVideoThumbs();
	$('#hot_videos').html('<div style="margin:139px 0px 220px 0px;text-align:center;width:100%;"><img src="images/spinna.gif" alt="Loading your request" /></div>');

    $.ajax({
        type: "GET",
        url: '/ajax/videos_watched.php',
        data: ({
                m: Math.floor(Math.random()*100000)
              }),
        success: watched_handler
    });
}

function watched_handler(xhr){
	$('#watched_videos').html(xhr);
	initMultiviewToolTip();
}
