$(document).ready(function(){
	// carousel widget:
	$('.carousel').jCarouselLite({
		btnNext: ".next",
		btnPrev: ".prev",
		easing: "easeInOutQuad",
		speed: 1000,
		visible: 4,
		//scroll: 2, // scroll 2 items
		auto: 5000    // automatically scroll every 5 seconds
	});
	
	$("#show_login").click(function() {		
		var destination = $("#login_select").val();
		// direct UI customers to UI login page:
		//if (destination == "uiWeeklyFiling" || destination == "uiCurrentClaim") {
		if (destination == "uiWeeklyFiling" || destination == "jobSearch" || destination =="myCase" || destination == "uiCurrentClaim" ) {
			location.href = $("a#" + destination)[0].href;
		}
		else {
			$("a#" + destination).fancybox({
				'hideOnContentClick' : false,
				'overlayShow' : true,
				'easingIn' : 'easeInElastic',
				'easingOut' : 'easeOutElastic',
				'frameWidth' : 200,
				'frameHeight' :  200,
				'callbackOnShow' : function() { 
					$("input." + destination + "Focus").focus();
				}
			}).trigger("click");
		}
	});

});
