// TABS
$(document).ready(function() {
   //when page loads...
   $('.tab_content').hide(); //hide content
   $('ul#tabs li:first').addClass('active').show(); //activate first
   $('.tab_content:first').show();
   
   //on click event...
   $('ul#tabs li').click(function() {
								  $('ul#tabs li').removeClass('active');
								  $(this).addClass('active');
								  $('.tab_content').hide();
								  var activeTab = $(this).find('a').attr('href');
								  $(activeTab).fadeIn();
								  return false;
					  });
});

//EVENTS
/*
$(function(){
		 
		   $('#events li a').append('<span class="hover"></span>')
		   
		   $('#events li a').hover(function() {
	        
		// Stuff that happens when you hover on + the stop()
		$('.hover', this).stop().animate({
			'opacity': 1
			}, 900,'easeOutSine')
	
	},function() {
	
		// Stuff that happens when you unhover + the stop()
		$('.hover', this).stop().animate({
			'opacity': 0
			}, 600, 'easeOutQuad')
	
	})
		   });
*/

$(document).ready(function(){
  $(".fadeIn").fadeTo("slow", 0.3); // This sets the opacity of the thumbs to fade down to 30% when the page loads
	$(".fadeIn").hover(function(){
	$(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
	},function(){
	$(this).fadeTo("slow", 0.3); // This should set the opacity back to 30% on mouseout
  });
});

//ENTERTAINMENT PICS HOVER
$(document).ready(function(){
 $('.brynt-pic a')
    .css({ 'backgroundPosition': '0 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 950);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 850);
	  }
	);
	
	 $('.kin4life-pic a')
    .css({ 'backgroundPosition': '-196px 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 950);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 850);
	  }
	);
	
	$('.lastoffence-pic a')
    .css({ 'backgroundPosition': '-392px 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 950);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 850);
	  }
	);
	
	$('.shaka-pic a')
    .css({ 'backgroundPosition': '0 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 950);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 850);
	  }
	);
	
	$('.angelo-pic a')
    .css({ 'backgroundPosition': '-196px 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 950);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 850);
	  }
	);
	
	$('.jason-pic a')
    .css({ 'backgroundPosition': '-392px 0' })
	.hover(
      function(){
        $(this).stop()
          .animate({
            'opacity': 0
          }, 950);
	  },
	  function(){
        $(this).stop()
          .animate({
            'opacity': 1
          }, 850);
	  }
	);
});

// SIDEBAR FIX
/*
	$(document).ready(function() {
	function staticNav() {
		var sidenavHeight = $("#sidebar").height();
		var winHeight = $(window).height();
		var browserIE6 = (navigator.userAgent.indexOf("MSIE 6")>=0) ? true : false; //Check for IE6
	if (browserIE6) { //if IE6...
			$("#sidebar").css({'position' : 'absolute'});  //reset the sidebar to be absolute
		} else { //if not IE6...
			$("#sidebar").css({'position' : 'fixed'}); //reset the sidebar to be fixed
		}
	if (sidenavHeight > winHeight) { //If sidebar is taller than viewport...
		$("#sidebar").css({'position' : 'static'}); //switch the fixed positioning to static.
	}
		}
	staticNav(); //Execute function on load
	$(window).resize(function () { //Each time the viewport is adjusted/resized, execute the function
	staticNav();
	});
});
*/