jQuery(document).ready(function($){		
	 $("ul.sf-menu").supersubs({ 
            minWidth:    12,   // minimum width of sub-menus in em units 
            maxWidth:    87,   // maximum width of sub-menus in em units 
            extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
                               // due to slight rounding differences and font-family 
        }).superfish({
			delay:       500,                            // one second delay on mouseout 
			animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
			speed:       'fast',                          // faster animation speed 
			dropShadows: true                            // disable drop shadows 
	});
	
	
	$('#side-buttons').fadeTo('slow', 0.0, function() {
      // Animation complete.
    });
	
	$('#home-slider-main').fadeIn('slow', function() {
				  $('#side-buttons').delay(500).fadeTo('fast', 1.0, function() {
					  // Animation complete.
					});
		  });
	
	$('#home-slider-main').cycle({ 
    fx:    'scrollLeft', 
    timeout: 10000
	});

	$('#love-notes').cycle({ 
    fx:    'fade', 
    speed:  'fast', 
    timeout: 5000, 
    next:   '#next2', 
    prev:   '#prev2' 
	});
	
		$("a.fancybox").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'overlayColor'	:	'#000',
		'titlePosition'	:	'over',
		'speedIn'		:	600, 
		'speedOut'		:	200
	});
	
	$("a.f-iframe").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'overlayColor'	:	'#000',
		'titlePosition'	:	'over',
		'speedIn'		:	600, 
		'speedOut'		:	200,
		'width'			:	660,
		'height'		:	380
	});
	
	$("a#inline").fancybox({
		'hideOnContentClick': false
	});
	
	$("#mobile-link").fancybox({
		'titleShow'		: false
	});
	
	   
	   
	    		$('#s').focus(function() {
					$(this).val("");
				  });
				 $('#s').blur(function() {
					$(this).val("Search Locum Life");
				  });
				  
				  $('#msg').focus(function() {
					$(this).val("");
				  });
				 $('#msg').blur(function() {
					$(this).val("Message");
				  });
	  
					
					$("blockquote").before("<span id='tq'>&#8220;</span>");
					$("blockquote").after("<span id='bq'>&#8221;</span>");


				$('input.wpcf7-text').each(function() {
				$(this)
				.data('default', $(this).val())
				.addClass('inactive')
				.focus(function() {
				$(this).removeClass('inactive');
				if ($(this).val() == $(this).data('default') || '') {
				$(this).val('');
				}
				})
				.blur(function() {
				var default_val = $(this).data('default');
				if ($(this).val() == '') {
				$(this).addClass('inactive');
				$(this).val($(this).data('default'));
				}
				});
				});
				
				$('textarea').each(function() {
				$(this)
				.data('default', $(this).val())
				.addClass('inactive')
				.focus(function() {
				$(this).removeClass('inactive');
				if ($(this).val() == $(this).data('default') || '') {
				$(this).val('');
				}
				})
				.blur(function() {
				var default_val = $(this).data('default');
				if ($(this).val() == '') {
				$(this).addClass('inactive');
				$(this).val($(this).data('default'));
				}
				});
				});
				
				$('.divRow').equalheight();
				
				// Tabs
				$('#tabs').tabs({ fx: { opacity: 'toggle' } });
				var $tabs = $('#tabs').tabs(); // first tab selected
					$('#tabs-link-1').click(function() { // bind click event to link
						$tabs.tabs('select', 1); // switch to third tab
						return false;
					});
					$('#tabs-link-2').click(function() { // bind click event to link
						$tabs.tabs('select', 2); // switch to third tab
						return false;
					});
					$('#tabs-link-3').click(function() { // bind click event to link
						$tabs.tabs('select', 3); // switch to third tab
						return false;
					});
					$('#tabs-link-4').click(function() { // bind click event to link
						$tabs.tabs('select', 4); // switch to third tab
						return false;
					});
					$('#tabs-link-5').click(function() { // bind click event to link
						$tabs.tabs('select', 5); // switch to third tab
						return false;
					});
					$('#tabs-link-6').click(function() { // bind click event to link
						$tabs.tabs('select', 6); // switch to third tab
						return false;
					});
				
				//When page loads...
			$(".tab_content").hide(); //Hide all content
			$("ul.tabs li:first").addClass("active").show(); //Activate first tab
			$(".tab_content:first").show(); //Show first tab content
		
			//On Click Event
			$("ul.tabs li").click(function() {
		
				$("ul.tabs li").removeClass("active"); //Remove any "active" class
				$(this).addClass("active"); //Add "active" class to selected tab
				$(".tab_content").hide(); //Hide all tab content
		
				var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
				$(activeTab).fadeIn(); //Fade in the active ID content
				return false;
			});
			
			
			$('#pros .entry-content div').eq(0).addClass('procount');
			$('#pros .entry-content div').eq(1).addClass('procount');


			$("#pros a").wTooltip({
	 			className: "itooltips",
				style: false
	 		});
			/* $("#protabs a").wTooltip({
	 			className: "protooltips",
				style: false
	 		});  */
			
			$('#form-pointer').hide();
			
			$('.package-link').click(function() {
					/* $('input[name="first-name"]').focus(); */
					$('input[name="first-name"]').css('border', '1px solid red');
					$('input[name="first-name"]').css('borderRadius', '5px');
					$('#form-pointer').fadeIn();
					return false;
				})
		$('input[name="first-name"]').focus(function() {
			  $('input[name="first-name"]').css('border','none');
			  $('#form-pointer').fadeOut();
			});
							
				
			
			
});


