/* ------
This script initializes the work teaser carousels on work.html and index.html, both full-width
and half-width, and implements the hovering functionality on the info modules contained therein.
------ */

function tinyInit(carousel, carouselDiv) {
	carouselDiv.prev(".dotCounter").children("img").bind('click', function() {
		carousel.scroll(jQuery.jcarousel.intval($(this).attr("class")));
		return false;
	});
};

function flipCounter(carousel, item, idx, state, carouselDiv) {
	if(state === "next") {
		carouselDiv.prev(".dotCounter").children("img:first").attr("src", "../adjunto/lightdot.png");
		carouselDiv.prev(".dotCounter").children("img:last").attr("src", "../adjunto/darkdot.png");
	} else if(state === "prev") {
		carouselDiv.prev(".dotCounter").children("img:first").attr("src", "../adjunto/darkdot.png");
		carouselDiv.prev(".dotCounter").children("img:last").attr("src", "../adjunto/lightdot.png");
	}
};
