// JavaScript Document


// cycle custom anchor builder function
function buildAnchors(index, el) {
	return '<a href="#"> </a>';
}

// the homepage onReady init function
$(function() {
    $("#homepageNav ul li:first-child").css("background", "none");
    $("#homepageNav ul li:last-child a").css("background", "none");
	$(".jbtScreen:first").css("display", "block");
	$("#bodyContent").prepend("<div id=\x27jbtNav\x27>");
	$("#jumbotron").cycle({ 
		fx:			"fade", 
		speed:		1250, 
		timeout:	7000,
		cleartypeNoBg: true,
		cleartype:  false,
		pause:1,
		pager:		"#jbtNav",
		pagerAnchorBuilder: buildAnchors,
		pauseOnPagerHover: 1,
		fastOnEvent: 500,
		autostop:      1,
    	autostopCount: 14
	});
	$(".carousel").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev",
		visible: 5,
		speed: 200
    });
	$("#footLinks ul li a:contains('facebook')").html('<img src="/wp-content/themes/weteachscience/images/wts_foot_fb.jpg" />');
	$("#footLinks ul li a:contains('twitter')").html('<img src="/wp-content/themes/weteachscience/images/wts_foot_twitter.jpg" />');
});
