$(document).ready(function(){
	$('#header UL LI.hassubmenu').hover(
		function(){	$(this).addClass('active').children('.submenu').css("display","block");},
		function(){	$(this).removeClass('active').children('.submenu').css("display","none");}
	)	
	jQuery('.more-about A, .link-block A').hover(
		function(){jQuery(this).parent().addClass('hovered')},
		function(){jQuery(this).parent().removeClass('hovered')}		
		)
	convert();
	function LoadVideoBar() {
		var videoBar;
		var options = {
			largeResultSet : !true,
			horizontal : true,
			autoExecuteList : {
			  cycleTime : GSvideoBar.CYCLE_TIME_MEDIUM,
			  cycleMode : GSvideoBar.CYCLE_MODE_LINEAR,
			  executeList : ["ytchannel:revengeelectric"],
			}
		  }
		videoBar = new GSvideoBar(document.getElementById("videoBar-bar"),
								   document.getElementById("videoblock"),
								  options);
                                  
        videoBar.oldProcessResults = videoBar.processResults;
        videoBar.processResults = function(results){ displayVideo(videoBar, results); };
	}
	GSearch.setOnLoadCallback(LoadVideoBar);
})
function convert(){
	$('.from-twitter p').html('').append($('#twitter_update_list li').html());
	$('#twitter_update_list').remove();
}
function displayVideo(obj, results){
    obj.oldProcessResults(results);
    if($('.resultDiv_gsvb:first img').length > 0){
        $('.resultDiv_gsvb:first img').trigger('click');
    }
}
