//--------------------------------------------------------------------//
$(document).ready(function() {	
	
	 $('#banner-menu ul li a').click(function(event){
		 event.stopPropagation();
	 });
	 	 		
	$('.banner_img').each(function(i){
		if (i>0){
			$(this).attr('src', $(this).attr('original_src'));						
		}
	});		
			
	$('#slides').slides({
		preload: false,
		generatePagination: true,
		play: 24500,
		pause: 24500,
		hoverPause: true,
		start: 1				
	});
	
	$('#slides_sidebar').slides({
		preload: false,
		generatePagination: true,
		play: 24500,
		pause: 24500,
		hoverPause: true,
		start: 1				
	});
		
	$('#news-container').vTicker({ 
		speed: 500,
		pause: 7000,
		animation: 'fade',
		mousePause: false,
		showItems: 3
	});
	
   $('#find_doctor_container a[rel]').each(function()
   {
	  $(this).qtip(
	  {
		 content: {
			// Set the text to an image HTML string with the correct src URL to the loading image you want to use
			text: '<img class="throbber" src="http://www.whereismydoctor.com/images/wimd_loading_gray.gif" alt="Loading..." />',
			url: $(this).attr('rel'), // Use the rel attribute of each element for the url to load
			title: {
			   text: 'Find a Doctor - ' + $(this).text(), // Give the tooltip a title using each elements text
			   //button: 'Close' // Show a close link in the title
			   button: '<img onclick="return false;" style="border:0;" src="/images/pc_del.png" alt="Close" />'
			}
		 },
		 position: {
			corner: {
			   target: 'bottomMiddle', // Position the tooltip above the link
			   tooltip: 'topMiddle'
			},
			adjust: {
			   screen: true // Keep the tooltip on-screen at all times
			}
		 },
		 show: { 
			when: 'click', 
			solo: true // Only show one tooltip at a time
		 },
		 hide: 'unfocus',
		 style: {
			tip: true, // Apply a speech bubble tip to the tooltip at the designated tooltip corner
			border: {
			   width: 0,
			   radius: 4
			},
			name: 'light', // Use the default light style
			width: 400, // Set the tooltip width
			height: 200
		 }
	  })
   });
       
});
//--------------------------------------------------------------------//
