/***********************************************************************************************************************
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() {
	var button1_on='<img src="/images/ref_btn_01-b.gif" id="ref_button1" alt="" width="220" height="29" />';
	var button1_off='<img src="/images/ref_btn_01.gif" id="ref_button1" alt="" width="220" height="29" />';
	var button2_on='<img src="/images/ref_btn_02-b.gif" id="ref_button2" alt="" width="220" height="29" />';
	var button2_off='<img src="/images/ref_btn_02.gif" id="ref_button2" alt="" width="220" height="29" />';
	var button3_on='<img src="/images/ref_btn_03-b.gif" id="ref_button3" alt="" width="220" height="29" />';
	var button3_off='<img src="/images/ref_btn_03.gif" id="ref_button3" alt="" width="220" height="29" />';
	
	/********************************************************************************************************************
	SIMPLE ACCORDIAN STYLE MENU FUNCTION
	********************************************************************************************************************/	
	$('div.accordionButton').click(function() {
		$('div.accordionContent').slideUp('normal');	
		$(this).next().slideDown('normal');

		if(this.id=="accord_id1"){
			this.innerHTML = button1_on;
			document.getElementById('accord_id2').innerHTML = button2_off;
			document.getElementById('accord_id3').innerHTML = button3_off;
		}
		
		if(this.id=="accord_id2"){
			this.innerHTML = button2_on;
			document.getElementById('accord_id1').innerHTML = button1_off;
			document.getElementById('accord_id3').innerHTML = button3_off;
			
		}

		if(this.id=="accord_id3"){
			this.innerHTML = button3_on;
			document.getElementById('accord_id1').innerHTML = button1_off;
			document.getElementById('accord_id2').innerHTML = button2_off;			
		}
	
	});
	
	/********************************************************************************************************************
	CLOSES ALL DIVS ON PAGE LOAD
	********************************************************************************************************************/	
	$("div.accordionContent").hide();
	
	/********************************************************************************************************************
	OPENS THE DIV THAT IS ASSIGNED WITH THE ID open
	********************************************************************************************************************/	
	$("div.accordionButton:eq(0)").trigger('click');


});

function refresh28Min()
{
	_gaq.push(['_trackEvent', '28 perces reload', '28 perces reload', '28 perces reload']);
}
setTimeout("refresh28Min()",1680000);

