/**
 * @author Igor
 * @copyright Copyright © Neoco; www.neoco.com
 * @version $Id: general.js 7192 2009-12-10 11:19:44Z igor $
 */
var ctu = {homeBannerCount:35,odd:true};
function scrollHomeBanner() {
	if(ctu.odd) {
		ctu.odd = false;
		ctu.homeBanner2.fadeOut("slow", function() {
			ctu.homeBanner2.attr("src", "/sites/live.ctu001.neo51.com/themes/camdentownunlimited/images/scroller/" + Math.ceil(Math.random()*(ctu.homeBannerCount)) + ".jpg");
		});
	} else {
		ctu.odd = true;
		ctu.homeBanner2.fadeIn("slow", function() {
			ctu.homeBanner1.attr("src", "/sites/live.ctu001.neo51.com/themes/camdentownunlimited/images/scroller/" + Math.ceil(Math.random()*(ctu.homeBannerCount)) + ".jpg");
		});
	}
}
$(document).ready(function() {
	ctu.homeBanner1 = $("#scroller1");
	if(ctu.homeBanner1.length == 1) {
		ctu.homeBanner2 = $("#scroller2");
		setInterval("scrollHomeBanner()", 7000);
	}
	var keepuptodate = $("#keepuptodate input");
	keepuptodate.blur(function() {
		if($(this).val().length < 1)
			$(this).val($(this).attr("defaultValue"));
	});
	keepuptodate.focus(function() {
		if($(this).val() == $(this).attr("defaultValue"))
			$(this).val("");
	});
});

