			
$(document).ready(function(){

	$("#fontmanager").fontsizemanager();
	  
	// $('.pload').imgPreload({spinner_src: 'img/ajax-loader.gif', fake_delay: 300, animation_duration: 1200})

	// SLIDESHOW

	$('#dock img').fadeIn(1200);
	$('#home-dock img').fadeIn(1200);	
 	$('#fadein').fadeOut(1200);
		
	if( $('.sshow').length){	
		$('.sshow').cycle({
				fx: 'fade',
				timeout: 5000,
				speed: 1000,
				delay: 1200
		});	
	}	
	
	if( $('.fs').length){	
		$('.fs').cycle({
				fx: 'fade',
				timeout: 2500,
				speed: 1000
		});		
	}
	$('#nojs').remove();
    $('#snav a, #f1 li a').prepend('<span></span>');
	$('#snav a, #f1 li a').hover(
		function(){$(this).find('span').stop().fadeTo(50, 1);}, 
		function(){$(this).find('span').stop().fadeTo(500, 0);}
	);	
	$('#snav a').hover(
		function(){$(this).stop().animate({'color' : '#364e65'}, 50);}, 
		function(){$(this).stop().animate({'color' : '#689fc0'}, 300);	
	});		
	$('#f1 a').hover(
		function(){$(this).stop().animate({'color' : '#fff'}, 50);}, 
		function(){$(this).stop().animate({'color' : '#fff'}, 300);	
	});				
	$('#nav li').hover(
		function(){						
			$(this).find('ul').css({'opacity' : '0'});		
			$(this).find('ul').css({'display' : 'block'});		
			$(this).find('ul').stop(true,false).animate({'opacity' : '1'}, 200);
		},function(){
			$(this).find('ul').fadeOut(200);
	});	
	if( $('.abbot-medical').length){	

	$("a[rel=lbx]").fancybox({
			'transitionIn'		: 'fade',
			'transitionOut'		: 'none',
			'titlePosition' 	: 'over',
			'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
				    return '<span id="fancybox-title-over">' +  (currentIndex + 1) + ' / ' + currentArray.length + '<\/span>';
		}			
	});
	}
	if( $('#form').length){
		$("#form").validate();	
	}
	$('.blank').click(function(){ window.open(this.href);return false });

    $("#provider").css("display","none");

    $("#isprovider").click(function(){
       
			if ($("#isprovider").is(":checked"))
			{
				$("#provider").slideDown();			
				$("#form").find('input.rq').removeClass('required');
				$("#form").find('input.rq').removeClass('error');				
				$("#form").find('input.prq').addClass('required');					
			}
			else
			{     
				$("#provider").slideUp();
				$("#form").find('input.rq').addClass('required');
				$("#form").find('input.prq').removeClass('required');
				$("#form").find('input.prq').removeClass('error');								
			}
      });
});


