

var animDuration = 200;

	var hc1;
	var hc2;
	var hc3;
	var hb1;
	var hb2;
	var hb3;
	var p1;
	var p2;
	var p3;
	var sh1;
	var sh2;
	var sh3;


var hbPosX1 = 0;
var hbPosY1 = 0;
var hbPosX2 = -61;
var hbPosY2 = -48;

var hbScaleX1 = 258;
var hbScaleY1 = 258;
var hbScaleX2 = 380;
var hbScaleY2 = 380;



var pPosY1 = 254;
var pPosY2 = 325;

var pSize1 = 14;
var pSize2 = 18;



var shPosX1 = 49;
var shPosY1 = 272;
var shPosX2 = -31;
var shPosY2 = 340;

var shScaleX1 = 160;
var shScaleY1 = 20;
var shScaleX2 = 320;
var shScaleY2 = 39;



/* ie6
var hbPosX1 = -27;
var hbPosY1 = -20;
var hbPosX2 = -27;
var hbPosY2 = -20;

var hbScaleX1 = 310;
var hbScaleY1 = 310;
var hbScaleX2 = 310;
var hbScaleY2 = 310;



var pPosY1 = 290;
var pPosY2 = 290;

var pSize1 = 16;
var pSize2 = 16;



var shPosX1 = 14;
var shPosY1 = 310;
var shPosX2 = 14;
var shPosY2 = 310;

var shScaleX1 = 230;
var shScaleY1 = 30;
var shScaleX2 = 230;
var shScaleY2 = 30;
*/


var currentlyOn = '';
	


jQuery(document).ready(function(){
	jQuery('div.homeTeaser:first').addClass('htFirst');
	
	
	jQuery('#homeContent img').mousedown(function(){
		return false;
	});
	
	hc1 = jQuery('#homeFeature1');
	hc2 = jQuery('#homeFeature2');
	hc3 = jQuery('#homeFeature3');
	hb1 = jQuery('#homeFeature1 img.homeBubble');
	hb2 = jQuery('#homeFeature2 img.homeBubble');
	hb3 = jQuery('#homeFeature3 img.homeBubble');
	p1 = jQuery('#homeFeature1 p');
	p2 = jQuery('#homeFeature2 p');
	p3 = jQuery('#homeFeature3 p');
	sh1 = jQuery('#homeFeature1 img.homeShadow');
	sh2 = jQuery('#homeFeature2 img.homeShadow');
	sh3 = jQuery('#homeFeature3 img.homeShadow');
	
	
	// init
	expandHb2();
	
	
	hb1.mouseover(function() {
		expandHb1();
		if (hb2.hasClass('expanded')) { collapseHb2(); }
		if (hb3.hasClass('expanded')) { collapseHb3(); }
	});
	
	hb2.mouseover(function() {		
		if (hb1.hasClass('expanded')) { collapseHb1(); }
		expandHb2();
		if (hb3.hasClass('expanded')) { collapseHb3(); }
	});
	
	hb3.mouseover(function() {		
		if (hb1.hasClass('expanded')) { collapseHb1(); }
		if (hb2.hasClass('expanded')) { collapseHb2(); }
		expandHb3();
	});
	
	
});



function expandHb1() {
	hb1.addClass('expanded');
	hb1.stop().animate({
		left: hbPosX2,
		top: hbPosY2,
		width: hbScaleX2,
		height: hbScaleY2
	}, animDuration);
	p1.stop().animate({
		top: pPosY2,
		fontSize: pSize2
	}, animDuration);
	sh1.stop().animate({
		left: shPosX2,
		top: shPosY2,
		width: shScaleX2,
		height: shScaleY2
	}, animDuration);
}

function collapseHb1() {
	hb1.removeClass('expanded');
	hb1.stop().animate({
		left: hbPosX1,
		top: hbPosY1,
		width: hbScaleX1,
		height: hbScaleY1
	}, animDuration);
	p1.stop().animate({
		top: pPosY1,
		fontSize: pSize1
	}, animDuration);
	sh1.stop().animate({
		left: shPosX1,
		top: shPosY1,
		width: shScaleX1,
		height: shScaleY1
	}, animDuration);
}



function expandHb2() {
	hb2.addClass('expanded');
	hb2.stop().animate({
		left: hbPosX2,
		top: hbPosY2,
		width: hbScaleX2,
		height: hbScaleY2
	}, animDuration);
	p2.stop().animate({
		top: pPosY2,
		fontSize: pSize2
	}, animDuration);
	sh2.stop().animate({
		left: shPosX2,
		top: shPosY2,
		width: shScaleX2,
		height: shScaleY2
	}, animDuration);
}

function collapseHb2() {
	hb2.removeClass('expanded');
	hb2.stop().animate({
		left: hbPosX1,
		top: hbPosY1,
		width: hbScaleX1,
		height: hbScaleY1
	}, animDuration);
	p2.stop().animate({
		top: pPosY1,
		fontSize: pSize1
	}, animDuration);
	sh2.stop().animate({
		left: shPosX1,
		top: shPosY1,
		width: shScaleX1,
		height: shScaleY1
	}, animDuration);
}



function expandHb3() {
	hb3.addClass('expanded');
	hb3.stop().animate({
		left: hbPosX2,
		top: hbPosY2,
		width: hbScaleX2,
		height: hbScaleY2
	}, animDuration);
	p3.stop().animate({
		top: pPosY2,
		fontSize: pSize2
	}, animDuration);
	sh3.stop().animate({
		left: shPosX2,
		top: shPosY2,
		width: shScaleX2,
		height: shScaleY2
	}, animDuration);
}

function collapseHb3() {
	hb3.removeClass('expanded');
	hb3.stop().animate({
		left: hbPosX1,
		top: hbPosY1,
		width: hbScaleX1,
		height: hbScaleY1
	}, animDuration);
	p3.stop().animate({
		top: pPosY1,
		fontSize: pSize1
	}, animDuration);
	sh3.stop().animate({
		left: shPosX1,
		top: shPosY1,
		width: shScaleX1,
		height: shScaleY1
	}, animDuration);
}











