$(document).ready(function() {
	Shadowbox.init(

	);
	//VideoJS.setup();
	
      function addMega(){
        $(this).addClass("hovering");
        }

      function removeMega(){
        $(this).removeClass("hovering");
        }

    var megaConfig = {
         interval: 500,
         sensitivity: 4,
         over: addMega,
         timeout: 500,
         out: removeMega
    };

    $("li.mega").hoverIntent(megaConfig);

	  $('#section-choice a[href*=#]').click(function() {
	    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
	      && location.hostname == this.hostname) {
	       $.scrollTo(this.hash, 400);
	    };
	  });

      
});



function use_video(filename, width, height, hide_controlbar){
	  var so = new SWFObject('/flash/player.swf','mpl',width,height,'9');
	  so.addParam('allowfullscreen','true');
	  so.addParam('allowscriptaccess','always');
	  so.addParam('wmode','opaque');
	  so.addVariable('file','/flash/tv/'+filename+'.flv');
	  so.addVariable('image','/flash/tv/'+filename+'.jpg');
	
	  if(hide_controlbar != true){
	  	so.addVariable('controlbar','over');
	  }
	  so.write('video_container');

}


