$(document).ready(function(){
	$("ul.nav").supersubs({ 
            minWidth:    12,   // minimum width of sub-menus in em units 
            maxWidth:    27,   // maximum width of sub-menus in em units 
            extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
                               // due to slight rounding differences and font-family 
        }).superfish();  // call supersubs first, then superfish, so that subs are 
                         // not display:none when measuring. Call before initialising 
                         // containing tabs for same reason. 
	if ($("#uniplayer")) {
	  $("#uninav a, #uniplayer a").click(function(){
		  var dest = $(this).attr("href");
		  dest = dest.replace(/[^=]+=([^?]+)/, "$1").split("&", 1);
		  $("#uniplayer").empty().prepend(
			  '<iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/' +dest+'?rel=0&hd=1&autoplay=1" frameborder="0" allowfullscreen></iframe>'
		  );
		  return false;
	  });
	};
});
