// site specific javascript

$(document).ready(function() {
	
	$('body').delegate('#lightbox-nav a', 'focus', function(e){
		$(this).blur();
	});
	
    $("a.iframe").fancybox({
        frameWidth: 500,
        frameHeight: 475
    });

    // Select all links that contains lightbox in the attribute rel
    $("a[rel*='lightbox']").lightBox({
        fixedNavigation: true
    });

    $("a[class*='timelinedescription']").each(function() {
        var content = $(this).attr('rel');

        // Setup the tooltip with the content
        $(this).qtip(
          {
              content: {
                text: content,
                  title: {
                      text: 'Time Line Description',
                      button: 'Close' // Show a close link in the title
                  }
              },
              position: {
                  corner: {
                      target: 'rightMiddle',
                      tooltip: 'leftMiddle'
                  },
                  adjust: {
                      screen: true // Keep the tooltip on-screen at all times
                  }
              },
              show: {
                  when: 'click',
                  solo: true // Only show one tooltip at a time
              },
              hide: 'click',
              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
              }
          });
    });
});
