// Create the tooltips only on document load
$(document).ready(function() 
{
   // Match all link elements with href attributes within the content div
   $('#aboutmenu').qtip(
   {
style: { 
name: 'dark', 
tip: true,
color: '#ffffff',
width: { max: 450 }
},
hide: {
	fixed: true,
	delay: 250
},
show: { delay: 100, solo: true},
content: '<div class="menu"><a href="about.html">Introduction</a><a href="letter.html">Letter from the President</a><a href="executiveteam.html">Executive Team</a><a href="awards.html">Awards</a><a href="news.html">News and Events</a><a href="contact.html">Contact Us</a></div>',
show: { effect: { type: 'slide' } },
position: { corner: { target: 'bottomMiddle', tooltip: 'topLeft'  }  }
   });
   
   
      $('.solutionsmenu').qtip(
   {
style: { 
name: 'dark', 
tip: true,
color: '#ffffff',
 width: { max: 450 }
},
hide: {
	fixed: true,
	delay: 250
},
show: { delay: 100, solo: true},
content: '<div class="menu"><a href="awareness.html">DiscoverPoint</a><a href="framework.html">Extensible Search Framework</a><a href="connector.html">Advanced Connector Engine</a></div>',
show: { effect: { type: 'slide' } },
position: { corner: { target: 'bottomMiddle', tooltip: 'topLeft'  }  }
   });
   
	$("#contactbutton").fancybox({
				'width'				: 400,
				'height'			: 300,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});
   
   $(".video").click(function() {
	$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'		: 640,
			'height'		: 495,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			   	 'wmode'		: 'transparent',
				'allowfullscreen'	: 'true'
			}
		});

	return false;
	});
	
	$(".widevideo").click(function() {
	$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'		: 640,
			'height'		: 384,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			   	 'wmode'		: 'transparent',
				'allowfullscreen'	: 'true'
			}
		});

	return false;
	});
});
