function aesthetics(){ 	
	var pageHeight = $("div.wrapper").height();
	if ( pageHeight < 650 ) {
		$("div.wrapper").css({height:"650px"});
	}
	$("div.wrapper").prepend("<div class='shadow-left'></div><div class='shadow-right'></div>");
	$("a.arrows_ffffff").after("<img class='arrows_ffffff' src='/images/arrows_right_ffffff.png' alt='' width='7' height='7' />");
	$("div.callout").prepend("<img class='corner' src='/images/bg_corner.png' alt='' width='22' height='22' />");
	$("div.page div.sidebar").prepend("<img class='corner' src='/images/bg_corner.png' alt='' width='22' height='22' />");
	
	// embed flash
	$("div.logo").flash({
		src: '/flash/compserv_logo.swf',
		width: 200,
		height: 82
	});

}

var content=new Array( "1", "2", "3", "4"  ); var cctr = 3;
var keepRunning = true;
function switchContent(){
	if (keepRunning){
		cctr = (cctr == 3) ? 0 : (cctr + 1);
		rotate (content[cctr]);
		setTimeout('switchContent()', 8000);
	}
}

function rotateControl(){
	$("div.flash ul.controls li a").hover(
		function () { $(this).fadeTo(1, 1); }, 
		function () {
			if ( !$(this).hasClass("active") ) {
				$(this).fadeTo(1, .4);
			}
		}
    );
	$("div.flash ul.controls li a").click(function(){
		keepRunning = false;
		if ( !$(this).hasClass("active") ){
			rotate(this.id);
		}
	});
}

function rotate(goRotate){
	$("div.flash ul.controls li a").removeClass("active");
	$("div.flash ul.controls li a#" + goRotate).addClass("active");
	$("div.flash ul.controls li a").fadeTo(1, .4);
	$("div.flash ul.controls li a#" + goRotate).fadeTo(1, 1);
	$("div.slide").fadeOut(500, function(){
		$(this).children("img.bubble").hide();
	});
	$("div#slide-" + goRotate).fadeIn(1000, function(){
		$(this).children("img.bubble").fadeIn(1000);
	});
}

function subnav(){
	$("ul.nav li").hover(
		function(){
			$(this).addClass("active");
			$(this).children("ul").show();
		}, 
		function(){
			$(this).removeClass("active");
			$(this).children("ul").hide();
		}
	);
}
function partners(){
	$("div.partner img").click(function(){
		$("div.hidden").hide();
		$("div.partner").removeClass("active");
		$(this).siblings("div.hidden").show();
		$(this).parent("div.partner").addClass("active");
	});
}

