$(document).ready(function() {
	$('a.external').live("click", function() {
		window.open($(this).attr('href'));
		return false;
	});

	if($("#case-studies-ticker ul li")) {
		function tick() {
                var container = $('#case-studies-ticker ul');
                var current = container.find('li.active');

                /* Restart */
                var next = current.next().next().length ? current.next().next()
                        : next = container.find('li:first');

                var position = next.prevAll().length;

                current.fadeOut("normal", function() {
					current.removeClass('active');
                    next.fadeIn("fast").addClass('active');
                });
                return false;
        }
        setInterval(tick, 5000);
	}
});
