// JavaScript Document

jQuery.preLoadImages("images/btn_ClientLogin_over.png", "images/nav_bullet_over.gif", "images/nav_bkgnd_over.gif");

$(document).ready(function(){
		$('#login').hover(
			function () {
				$(this).attr('src','/images/btn_ClientLogin_over.png');
			}, 
			function () {
				$(this).attr('src','/images/btn_ClientLogin.png');
			}
		);
		$('#nav ul li a').prepend('<img src="/images/nav_bullet.gif" />');
		$('#nav ul li a').hover(
			function () {
				$(this).addClass('hovered');
				$('#nav ul li a.hovered img').attr('src','/images/nav_bullet_over.gif');
			}, 
			function () {
				$('#nav ul li a.hovered img').attr('src','/images/nav_bullet.gif');
				$(this).removeClass('hovered');
			}
		);
		
		var cycle_div = $("#cycle_rotation div").length;
		
		if(cycle_div <= 1) {
			$("#cycle_next").hide();
			$("#cycle_prev").hide();
		}	
		
		$('#cycle_rotation').cycle({ 
				fx:     'fade', //how the slides change. Can also use
				speed:   3000, //how quickly the slides change. In milliseconds
				timeout: 28000, //how long slide is displayed before change. In milliseconds
				pager:  '#cycle_nav', //id for the rotation navigation
				next:   '#cycle_next', //id for the next button
				prev:   '#cycle_prev', //id for the previous button
				pause:   1, //slides pause when moused over.  change to 0 for no pause
					// callback fn that creates a button to use as pager anchor 
    			pagerAnchorBuilder: function(idx, slide) { 
        			return '<a href="#"><img src="/images/transparent.gif" width="8" height="8" alt="" /></a>'; 
    			}
		});
});

