$(document).ready(function(){ 
		$("ul.sf-menu").supersubs().superfish({ 
         //pathClass:  'current',
		 delay: 200,
		 dropShadows: false
        });  // call supersubs first, then superfish, so that subs are 
                         // not display:none when measuring. Call before initialising 
                         // containing tabs for same reason. 

		//Loads videos in player
		$(".video_playlist a").click(function(){ 
    	// capture the url to load from the href
		$(".video_playlist li a").removeClass("active");
		$(this).addClass("active");
    	var urlLoad = $(this).attr("href");
		$("#video_player").load(urlLoad);
    	// just make sure the page does not reload 
		if(urlLoad.indexOf("multimedia") == -1) {
    	return false;
		}
  		}); 
		
		//Tab Panel
		$(".article_video_playlist a").click(function(){ 
    	// capture the url to load from the href 
    	var urlLoad = $(this).attr("href");
		$("#article_video").load(urlLoad);
    	// just make sure the page does not reload 
    	return false; 
  		}); 

		$(".tabbed_box li a").click(function(){		
			clearInterval(autoRotate);
			currentTab = -2;
			
	    	var urlLoad = $(this).attr("href");
			var urlLoadclean = urlLoad.replace("/news/article/","/site/main_tab/");
			
			ajaxLoad($(this));		
		 
			if(urlLoadclean.indexOf("news") == -1) {
				return false;
			}
		})
	
		//Load the tabs
		$(".tabbed_content").load("/site/main_tab/");
		
		//Lightbox script
		$(".lightbox").lightbox();
		
		//Add some css when hover over news_snippet
		$(".news_snippet").hover(function(){
		//$(this).css({'background-color' : 'yellow', 'font-weight' : 'bolder'});
  		});
		
		//Ajaxify this!
		//$('.ajaxify').ajaxify();
		//$('.ajaxify').ajaxify({
        //animateOut:{height:'0%'},
        //animateOutSpeed:300,
        //animateIn:{height:'100%'},
        //animateInSpeed:300,
		//loading_img:'/images/loading.gif',
		//});
});