var myCarousel;
var counter = 1;
var searchbtn = false;

glow.ready(function() {
					glow('.mct_searchbtnopen').on('click', function() {
									if(!searchbtn) {
										glow('.mct_searchform input').attr('placeholder','search our site');
										glow('.mct_homearrow').anim(0.6, { 'right': '-223px'},{ tween: 'easeBoth' }).on('complete', function() { glow('.mct_searchform').css('opacity',0); glow('.mct_searchbtnopen').css('background-image','url(/images/mct_home_arrow_close.png)'); glow('.mct_searchform').show(); glow('.mct_searchform').anim(0.15, { 'opacity': 1 }, { tween: 'linear' }); searchbtn = true; });
									} else {
										glow('.mct_homearrow').anim(0.6, { 'right': '-18px'},{ tween: 'easeBoth' }).on('complete', function() { glow('.mct_searchform').hide(); glow('.mct_searchbtnopen').css('background-image','url(/images/mct_home_arrow.png)'); searchbtn = false; });
									}
					});
	myCarousel = new glow.ui.CarouselPane('.mct_homephotowrap', {spotlight: 1, loop: true, duration: 1.2, page: 1});
	myCarouselTwitter = new glow.ui.CarouselPane('#twitterlist', {spotlight: 1, loop: true, duration: 1.2, page: 1});
	setInterval("shiftCarousel()", 5000);
	myCarousel.on('afterMove', function(e) {
		glow('.selectedcircle').removeClass('selectedcircle');
		var nodeList = glow('.mct_homeleadercircle li');
		var bumtiddly = nodeList[counter];
		glow(bumtiddly).addClass('selectedcircle');
		counter++;
		if(counter > 3) { counter = 0; }
	});
});
function shiftCarousel() {
	myCarousel.next();
}

