$(document).ready(function() {   $('#staff_tile_box a[title]').qtip({      content: {         text: false      },	  position: {            corner: {               target: 'bottomMiddle',                tooltip: 'topMiddle'            },            adjust: {               screen: true            }         },      style: {	  		tip: true,             border: {               width: 1,               radius: 6,			   color: '#E9E900',            },			background: '#FFFFFF',			'text-align': 'center',			width: {				min: 120,			}		}   });           $('#staff_tile_box a[rel]').each(function()   {      $(this).qtip(      {         content: {            text: '<img class="throbber" src="../../img/staff_picture_mini/throbber.gif" alt="Loading..." />',            url: $(this).attr('rel'),             title: {               text: 'We are CROW STUDIO. ' + $(this).text(),                button: 'Close'             }         },         position: {            corner: {               target: 'bottomMiddle', // Position the tooltip above the link               tooltip: 'topMiddle'            },            adjust: {               screen: true            }         },         show: {             when: 'click',             solo: true         },         hide: 'unfocus',         style: {            tip: true,             border: {               width: 0,               radius: 4            },			//background: '#FFFFFF',            name: 'light',            width: 380, 		   'height': '220',         }      })   });         $('#staff_tile_box a[href*="youtube."]').each(function()   {      // Grab video ID from the url      var videoID = $(this).attr('href').match(/watch\?v=(.+)+/);      videoID = videoID[1];      // Create content using url as base      $(this).qtip(      {         // Create content DIV with unique ID for swfObject replacement         content: '<div id="youtube-embed-'+videoID+'">You need Flash player 8+ to view this video.</div>',         position: {            corner: {               tooltip: 'topMiddle', // ...and position it center of the screen               target: 'bottompMiddle' // ...and position it center of the screen            }         },	         show: {            when: 'click', // Show it on click...            solo: true // ...and hide all others when its shown         },         hide: 'unfocus', // Hide it when inactive...         style: {            width: 432,            height: 264,            padding: 0,            tip: true,            name: 'dark'         },         api: {            onRender: function()            {               // Setup video paramters               var params = { allowScriptAccess: 'always', allowfullScreen: 'false' };               var attrs = { id: 'youtube-video-'+videoID };               // Embed the youtube video using SWFObject script    <div id="youtube-embed-E22fFZeQIu0">              swfobject.embedSWF('http://www.youtube.com/v/'+videoID+'&enablejsapi=1&playerapiid=youtube-api-'+videoID, 'youtube-embed-'+videoID, '425', '264', '8', null, null, params, attrs);            },            onHide: function(){               // Pause the vide when hidden               var playerAPI = this.elements.content.find('#youtube-video-'+videoID).get(0);               if(playerAPI && playerAPI.pauseVideo) playerAPI.pauseVideo();            }         }      }      ).attr('href', '#');   });           });
