$(document).ready(function() {

		$('INPUT.auto-hint').each(function(i, el){
			if($(this).val() == ''){
				$(this).val($(this).attr('title'));
			}
			$(el).focus(function(){
				if ($(this).val() == $(this).attr('title')) {
					$(this).val('');
				}       
			});
			$(el).blur(function(){
				if ($(this).val() == '') {
					$(this).val($(this).attr('title'));
				}
			});
		});
		
		$("#appointment-popup").fancybox({
			'width'		    : 348,
			'height'		: 353,
        	'autoScale'     : false,
        	'transitionIn'	: 'elastic',
			'transitionOut'	: 'fade',
			'type'			: 'iframe'
		});
		
		$("#question-popup").fancybox({
			'width'		    : 348,
			'height'		: 353,
        	'autoScale'     : false,
        	'transitionIn'	: 'elastic',
			'transitionOut'	: 'fade',
			'type'			: 'iframe'
		});
		
		$('#large').before('<ul id="gallery-list">').cycle({
        	fx:     'fade',
       	 	speed:  'slow',
        	timeout: 3000,
        	pager:  '#gallery-list',
        	pagerAnchorBuilder: function(idx, slide) {
            	return '<li><a href="#"><img src="' + slide.src + '" width="66" height="66" /></a></li>';
        	}
    	});
    	
    	$('#homepage-images').cycle('fade');

}); //end of doc ready

$(window).load(function() {
    $('#slider1').nivoSlider({
        effect:'boxRain', // Specify sets like: 'fold,fade,sliceDown'
        pauseTime:3800, // How long each slide will show
        directionNav:false, // Next & Prev navigation
        directionNavHide:false, // Only show on hover
        controlNav:false, // 1,2,3... navigation
    });
});
