/***********************************************************************************************************************
DOCUMENT: includes/javascript.js
DEVELOPED BY: Ryan Stemkoski
COMPANY: Zipline Interactive
EMAIL: ryan@gozipline.com
PHONE: 509-321-2849
DATE: 2/26/2009
DESCRIPTION: This is the JavaScript required to create the accordion style menu.  Requires jQuery library
************************************************************************************************************************/


$(document).ready(function() {
	
	/********************************************************************************************************************
	SIMPLE ACCORDIAN STYLE MENU FUNCTION
	********************************************************************************************************************/	
	$('div.accordionButton').click(function() {
		$('div.accordionContent').slideUp('normal');
		$(this).next().slideDown('normal');
	});
	
	/********************************************************************************************************************
	CLOSES ALL DIVS ON PAGE LOAD
	********************************************************************************************************************/	
	$("div.accordionContent").hide();

});



$(function(){
	$("#sliderContainer div#one").hover(function(){
		$(this).addClass('active');
		$(this).stop().animate({top:"-10px",easing:'easeInSine'},{queue:false,duration:300});
		$('#sliderContainer div#two').stop().animate({top:"-110px"},{queue:false,duration:300});
	},
		function () {
			$(this).removeClass('active');
		}
	);

	$("#sliderContainer div#two").hover(function(){
		$(this).addClass('active');
		$(this).stop().animate({top:"-110px",easing:'easeInSine'},{queue:false,duration:300});
		$('#sliderContainer div#one').stop().animate({top:"-90px",easing:'easeInSine'},{queue:false,duration:300});
	},
		function () {
			$(this).removeClass('active');
		}
	);
	$("#sliderContainer div#three").hover(function(){
		$(this).addClass('active');
		$('#sliderContainer div#two').stop().animate({top:"-220px",easing:'easeInSine'},{queue:false,duration:300});
		$('#sliderContainer div#one').stop().animate({top:"-90px",easing:'easeInSine'},{queue:false,duration:300});
	},
		function () {
			$(this).removeClass('active');
		}
	);
});

$(document).ready(function(){
	$(".trigger").click(function(){
		$("#toppanel-wrapper").slideToggle(300, function () {$("#toppanel-wrapper").css('opacity',1.0)});
		return false;
	});
	$(".close").click(function(){
		$('#toppanel-wrapper:visible').slideToggle(300);
		return false;
	});
});


$(function() {
	$("#1").lavaLamp({
		fx: "backout",
		speed: 700
	});
});
