/*********************************************
 *                                           *
 *              Bluesky Local                *
 *        2007- 2009 Scrimple, Inc           *
 *  By: Matt Ackerson and Angel M. Villegas  *
 *                                           *
 *********************************************/

function fadeIn(ary, speed) {
	for (var i = 0; i < ary.length; i++) 
		$("#" + ary[i]).fadeIn(speed);
}

function fadeOut(ary, speed) {
	for (var i = 0; i < ary.length; i++) 
		$("#" + ary[i]).fadeOut(speed);
}

function hide(ary) {
	for (var i = 0; i < ary.length; i++) 
		$("#" + ary[i]).hide();
}

function messageToUser(msg) {
	$("#msg-to-user >p:first").html(msg);
	$("#msg-to-user").slideDown('slow').animate({opacity: .75}, 3000).slideUp('slow');	
}

function isNumeric(input) {
   return (input - 0) == input && input.length > 0;
}


$(document).ready(function() {
	
	$(document).everyTime(5000, function() {
		var set = false;
		if ($("#quote-1").css("left") == '-2100px')
		{
			$("#one").hide();
			$("#two").hide();
			$("#three").hide();
			$("#four").hide();
			$("#four").hide();
			$("#quote-1").css("left", "350px");
			set = true;
		}
		else
			$("#quote-1").animate({"left": "-=350px"}, "slow");
		
		if (set)
		{	
			$("#one").show();
			$("#two").show();
			$("#three").show();
			$("#four").show();
			$("#quote-1").animate({"left": "-=350px"}, "slow");
		}
	}, times = 0);
	
	if (window.display !== undefined) {
		display.execute(action);
		page.initialize();
	}
});


