$(document).ready(function(){	
	// hide the share links
	$('.video-share-link').css('display','none');
			$("#slider").sudoSlider({
				numeric:false,
				controlsShow:true,
				continuous:true,
				prevNext:true,
				auto: true,
				pause: 6000,
				fadespeed: 1000,
				fade: true
			});			
			
	
				
	$('.tabs a').click(function(event){
		switch_tabs($(this));
		event.preventDefault();
				
	});
	
  $('#mainNav li ul').hover(function(){
      $(this).css("position","absolute");
				$(this).css("z-index","1000");
	});
  

	
//	$("a[rel^='prettyPhoto']").each(function(){
//		videoShareURL = $(this).next()
//		                       .attr('href');
//		videoShareURL = encodeURI(videoShareURL);
//		
//		$(this)
//	});
	
	$("a[rel^='prettyPhoto']").prettyPhoto({
		theme : 'light_square',	
		shareURL : encodeURI($(this).next().attr('href'))
    });
	
	$("a[rel^='prettyPhoto']").prettyPhoto({
		theme : 'light_square',	
		shareURL : encodeURI($(this).next().attr('href'))
    });

    switch_tabs($('.defaulttab'));
		
});		

	
function switch_tabs(obj)
{
	$('.tab-content').hide();
	$('.tabs a').removeClass("selected");
	var id = obj.attr("rel");
 
	$('#'+id).show();
	obj.addClass("selected");
}
			
	
		
		
 

