////// Observers

// tag filter
//Event.observe('option_toggle', 'click', option_toggle);

Event.observe('e6_trigger', 'click', function(){blind('e6_list')});

Event.observe('c41_trigger', 'click', function(){blind('c41_list')});

Event.observe('bw_trigger', 'click', function(){blind('black_and_white_list')});

//Use the logo to return home
Event.observe('logo', 'click', function(){window.location = 'index.cfm'});
Event.observe('logo', 'mouseover', function(){document.body.style.cursor = 'pointer';});
Event.observe('logo', 'mouseout', function(){document.body.style.cursor = 'default';});


//Not sure which option to choose
//Event.observe('not_sure', 'click', function(){window.location = 'index.cfm'});


//controlling the options bubbles
/*
Event.observe('option_1', 'mouseover', option_1_do);
Event.observe('option_1', 'mouseout', option_1_undo);
Event.observe('option_2', 'mouseover', option_2_do);
Event.observe('option_2', 'mouseout', option_2_undo);
Event.observe('option_3', 'mouseover', option_3_do);
Event.observe('option_3', 'mouseout', option_3_undo);
Event.observe('option_4', 'mouseover', option_4_do);
Event.observe('option_4', 'mouseout', option_4_undo);
*/
/////// Functions

// Drop down / Slide up the options

function option_toggle(){
	var displayed = $('options').style.display
	if(displayed !== 'none'){
		// Hide the options
		blind('options')
		
		// Change the text in the link
		$('option_toggle').innerHTML = 'show options'
		
		// Resize the background image
		$('bg_image').style.height = 116
	}
	else{
		// Show the options
		blind('options')
		
		// Change the text in the link
		$('option_toggle').innerHTML = 'hide options'
		
		// Resize the background image
		$('bg_image').style.height = 453
	}
}

function option_1_do(){
	//change cursor
	document.body.style.cursor = 'pointer';
	//move arrow
	$("option_arrow").style.left = 72
	//get info
	var rand  = parseInt(Math.random()*99999);
	var ajax = new Ajax.Updater(
		 'option_bubble',
		 'option_1_info.cfm?rand=' + rand,        
		 {               
		evalScripts:true
			 });
}

function option_1_undo(){
	//change cursor
	document.body.style.cursor = 'default';
	
}

function option_2_do(){
	//change cursor
	document.body.style.cursor = 'pointer';
	//move arrow
	$("option_arrow").style.left = 265
	//get info
	var rand  = parseInt(Math.random()*99999);
	var ajax = new Ajax.Updater(
		 'option_bubble',
		 'option_2_info.cfm?rand=' + rand,        
		 {               
		evalScripts:true
			 });
}
function option_2_undo(){
	//change cursor
	document.body.style.cursor = 'default';
	
}
function option_3_do(){
	//change cursor
	document.body.style.cursor = 'pointer';
	//move arrow
	$("option_arrow").style.left = 445
	//get info
	var rand  = parseInt(Math.random()*99999);
	var ajax = new Ajax.Updater(
		 'option_bubble',
		 'option_3_info.cfm?rand=' + rand,        
		 {               
		evalScripts:true
			 });
}
function option_3_undo(){
	//change cursor
	document.body.style.cursor = 'default';
}
function option_4_do(){
	//change cursor
	document.body.style.cursor = 'pointer';
	//move arrow
	$("option_arrow").style.left = 640
	//get info
	var rand  = parseInt(Math.random()*99999);
	var ajax = new Ajax.Updater(
		 'option_bubble',
		 'option_4_info.cfm?rand=' + rand,        
		 {               
		evalScripts:true
			 });
}
function option_4_undo(){
	//change cursor
	document.body.style.cursor = 'default';}
	
