$().ready(function() {
$('#companies .slices').kwicks({max: 242, min:20, sticky:false, defaultKwick:10, spacing:0});
$('#homephoto').cycle({fx: 'scrollLeft', delay:  -2000, pause: true, timeout: 4000, speed: 700});
$('#biophotos').cycle({fx: 'scrollUp', delay:  -2000, pause: true, timeout: 4000, speed: 700});
$('#quotes').cycle({pause: true, delay: 2000, timeout: 8000, speed: 500,});
$('#focusquotes').cycle({pause: true, delay: 2000, timeout: 8000, speed: 500,});
$('#people1').mouseover(function() { $(".peoplebg").animate({ top:344, opacity:1}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #851814 !important'); });
$('#people2').mouseover(function() { $(".peoplebg").animate({ top:370, opacity:1}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #851814 !important');  });
$('#people3').mouseover(function() { $(".peoplebg").animate({ top:396, opacity:1}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #851814 !important');  });
$('#people4').mouseover(function() { $(".peoplebg").animate({ top:422, opacity:1}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #851814 !important');  });
$('#people5').mouseover(function() { $(".peoplebg").animate({ top:448, opacity:1}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #851814 !important');  });
$('#people6').mouseover(function() { $(".peoplebg").animate({ top:474, opacity:1}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #851814 !important');  });
$('#people7').mouseover(function() { $(".peoplebg").animate({ top:500, opacity:1}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #851814 !important');  });
$('.not1').mouseout(function() { $(".peoplebg").animate({ top:344}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #DECE8D !important');  });
$('.not2').mouseout(function() { $(".peoplebg").animate({ top:370}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #DECE8D !important'); });
$('.not3').mouseout(function() { $(".peoplebg").animate({ top:396}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #DECE8D !important'); });
$('.not4').mouseout(function() { $(".peoplebg").animate({ top:422}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #DECE8D !important'); });
$('.not5').mouseout(function() { $(".peoplebg").animate({ top:448}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #DECE8D !important'); });
$('.not6').mouseout(function() { $(".peoplebg").animate({ top:474}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #DECE8D !important'); });
$('.not7').mouseout(function() { $(".peoplebg").animate({ top:500}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #DECE8D !important'); });
$('.notus').mouseout(function() { $(".peoplebg").animate({ opacity:0}, { duration: 'slow', easing:'easeOutBounce', queue: false }) });
$('#directions1').mouseover(function() { $(".directionsbg").animate({ top:344, opacity:1}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #851814 !important'); });
$('#directions2').mouseover(function() { $(".directionsbg").animate({ top:370, opacity:1}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #851814 !important'); });
$('#directions3').mouseover(function() { $(".directionsbg").animate({ top:396, opacity:1}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #851814 !important'); });
$('#directions4').mouseover(function() { $(".directionsbg").animate({ top:422, opacity:1}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #851814 !important'); });
$('.nobody').mouseout(function() { $(".directionsbg").animate({ opacity:0}, { duration: 'slow', easing:'easeOutBounce', queue: false }) });
$('.gobackto1').mouseout(function() { $(".directionsbg").animate({ top:344}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #DECE8D !important'); });
$('.gobackto2').mouseout(function() { $(".directionsbg").animate({ top:370}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #DECE8D !important'); });
$('.gobackto3').mouseout(function() { $(".directionsbg").animate({ top:396}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #DECE8D !important'); });
$('.gobackto4').mouseout(function() { $(".directionsbg").animate({ top:422}, { duration: 'slow', easing:'easeOutBounce', queue: false }); $(".me a").attr('style', 'color: #DECE8D !important'); });
$('.me').mouseover(function() {$(".me a").attr('style', 'color: #DECE8D !important'); });
});


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

//  simple rollovers

function mSetup() {
	var img, sh, sn, sd
	for (var i = 0; (img = document.images[i]); i++) {
		if (img.getAttribute) {

			sn = img.getAttribute("src");
			sh = img.getAttribute("hsrc");
			sd = img.getAttribute("dsrc");

			if (sn != "" && sn != null) {
				img.n = new Image();
				img.n.src = img.src;
			
				if (sh != "" && sh != null) {
					img.h = new Image();
					img.h.src = sh;
					img.onmouseover = mSwapOn
					img.onmouseout  = mSwapOff
				}

				if (sd != "" && sd != null) {
					img.d = new Image();
					img.d.src = sd;
					img.onmousedown = mSwapDown
				}
			}
		}
	}
}

function mSwapOn() {
	this.src = this.h.src;
}

function mSwapOff() {
	this.src  = this.n.src;
}

function mSwapDown() {
	this.src  = this.d.src;
	this.temp = typeof(document.onmouseup) != 'undefined' && typeof(document.onmouseup) != 'unknown' ? document.onmouseup : "";
	mSwapUp.img = this;
	document.onmouseup = mSwapUp;
}

function mSwapUp() {
	var ths = mSwapUp.img;
	ths.src = ths.n.src;
	if (ths.temp) document.onmouseup = ths.temp;
}

window.onload = mSetup;
