$(function() {
	$(".transpred").animate({opacity: 0.5}, 0);
	  
  var newPhoto = new Image();
  newPhoto.src = 'http://www.ulaheli.com/images/btn-sky-over.png';
    var newPhoto2 = new Image();
  newPhoto2.src = 'http://www.ulaheli.com/images/btn-charters-over.png';
    var newPhoto3 = new Image();
  newPhoto3.src = 'http://www.ulaheli.com/images/btn-weather-over.png';
    var newPhoto4 = new Image();
  newPhoto4.src = 'http://www.ulaheli.com/images/btn-news-over.png';
    var newPhoto5 = new Image();
  newPhoto5.src = 'http://www.ulaheli.com/images/btn-students-over.png';
    var newPhoto6 = new Image();
  newPhoto6.src = 'http://www.ulaheli.com/images/btn-sky-sub.png';
    var newPhoto7 = new Image();
  newPhoto7.src = 'http://www.ulaheli.com/images/btn-charters-sub.png';
    var newPhoto8 = new Image();
  newPhoto8.src = 'http://www.ulaheli.com/images/btn-weather-sub.png';
    var newPhoto9 = new Image();
  newPhoto9.src = 'http://www.ulaheli.com/images/btn-news-sub.png';
		
	var linkID = $(".nav-active").attr("id");
	var contentH = $("#content").css('height');
	
	$("#horizNav").supafly();
		
	$("#" + linkID).attr("style", "color: #EE3124");
		   
	$('.scroll-pane').jScrollPane({scrollbarWidth: 10, scrollbarMargin: 10, showArrows: true, wheelSpeed: 35});

	var currentID = 0;
	var prevID = 0;
	
	$("#vertNav a").hover(function() {
		currentID = $(this).attr('name');
		prevID = (currentID - 1);
						
		$(this).attr('class', "btn" + currentID + "-over");
		$("#btn" + prevID).attr('class', "btn" + prevID + "-sub");		
	}, function() {
		$(this).attr('class', "btn" + currentID);
		$("#btn" + prevID).attr('class', "btn" + prevID);
	});
	
	$(".portaldiv").hover(function() {
		var theRed = $(this).children(".transpred");
		$(theRed).show(0);
	}, function() {
		var theRed = $(this).children(".transpred");
		$(theRed).hide(0);	
	});
	
	$(".lbdiv a").click(function() {
		var theFile = $(this).attr('class');
				
		$(".moviediv").hide();		
		$("#" + theFile).show();
		
		$(".flash-lightbox").fadeIn("fast");
	});
	
	$(".closeOverlay").click(function() {
		$(".flash-lightbox").fadeOut("fast");
		$(".moviediv").hide();
				
	});
});