$(document).ready(function() {
	//use JS to add the flash file to the page
	$('#flashWrap').media({
		width: 680,
		height: 362,
		src: "/flash/indexFlash.swf",
		attrs: { id: 'theFlash', name: 'theFlash' },
		params: { swliveconnect: 'true', wmode: 'transparent' }
	});

	//Communicating with flash
	/*
		$("#theFlash").get(0) selects the DOM element of the flash file
		.playMouseOver and .playMoutOut are functions defined inside the flash file
	*/

	//When someone mouses on to Students
	$("#students").mouseover(function() {
		$("#theFlash").get(0).playMouseOver("Students");
	});

	//When someone mouses off of Students
	$("#students").mouseout(function() {
		$("#theFlash").get(0).playMouseOut("Students");
	});

	//When someone mouses on to Educators
	$("#educators").mouseover(function() {
		$("#theFlash").get(0).playMouseOver("Educators");
	});

	//When someone mouses off of Educators
	$("#educators").mouseout(function() {
		$("#theFlash").get(0).playMouseOut("Educators");
	});


	$("#schoolowners").mouseover(function() {
		$("#theFlash").get(0).playMouseOver("Owners");
	});

	$("#schoolowners").mouseout(function() {
		$("#theFlash").get(0).playMouseOut("Owners");
	});


	$("#technicians").mouseover(function() {
		$("#theFlash").get(0).playMouseOver("Technicians");
	});

	$("#technicians").mouseout(function() {
		$("#theFlash").get(0).playMouseOut("Technicians");
	});


	$("#salonspaowners").mouseover(function() {
		$("#theFlash").get(0).playMouseOver("Salon");
	});

	$("#salonspaowners").mouseout(function() {
		$("#theFlash").get(0).playMouseOut("Salon");
	});
});