function ApplyVideoQtips()
{


   $('.videoItem.hoverItem').each(function()
   {

          $(this).qtip(
          {
             content: {
                text: $(this).children(".embeddedVideo").html(),
                title: {
                   text: $(this).children(".title").html(),
                   button: 'Close'
                }
             },
             position: {
                corner: {
                   target: 'topMiddle',
                   tooltip: 'bottomMiddle'
                }
             },
             show: { 
                when: 'click', 
                solo: true
             },
             hide: 'unfocus', 
             style: {
                tip: true,
                border: {
                   width: 0,
                   radius: 1,
                   color: '#999999'
                },
                name: 'light',
                width: 457
             },
            
             api: {
                onRender: function()
                {
                    this.updateContent($(this).children(".embeddedVideo").html());
                },
                 onHide: function()
                 {
	                if (navigator.appName.indexOf("Microsoft") != -1)
    	            {
		                try
		                {
	                        this.elements.content.find('object').get(0).viddlerPause();
		                }
		                catch(err)
		                {
			                //alert("There has been a problem pausing the video.");
			                window.location.reload();
		                }	
		            }
                 }    
             }

          });

   });

   $('#DocumentList .videoListItem .hoverItem').each(function()
   {
      $(this).qtip(
      {
         content: {
            text: $(this).children(".embeddedVideo").html(),
            title: {
               text: $(this).parent().children(".title").html(),
               button: 'Close'
            }
         },
         position: {
            corner: {
               target: 'topMiddle',
               tooltip: 'bottomMiddle'
            }
         },
         show: { 
            when: 'click', 
            solo: true
         },
         hide: 'unfocus',
         style: {
            tip: true,
            border: {
               width: 0,
               radius: 1,
               color: '#999999'
            },
            name: 'light',
            width: 457
         },
        
         api: {
            onHide: function()
            {
            
	            if (navigator.appName.indexOf("Microsoft") != -1)
    	        {
    	            //viddlerPause();
	                //this.elements.content.find('object').get(0).viddlerPause();
	                //this.elements.content.find('object').get(0).dispose();
	            }
            }    
         }
      })
   });
   
   $('.featuredVideoItem.hoverItem').each(function()
   {
      $(this).qtip(
      {
         content: {
            text: $(this).children(".embeddedVideo").html(),
            title: {
               text: $(this).children(".title").html(),
               button: 'Close'
            }
         },
         position: {
            corner: {
               target: 'leftMiddle',
               tooltip: 'rightMiddle'
            }
         },
         show: { 
            when: 'click', 
            solo: true
         },
         hide: 'unfocus',
         style: {
            tip: true,
            border: {
               width: 0,
               radius: 1,
               color: '#999999'
            },
            name: 'light',
            width: 457
         },
        
         api: {
            onHide: function()
            {
            
	            if (navigator.appName.indexOf("Microsoft") != -1)
    	        {
    	            //viddlerPause();
	                //this.elements.content.find('object').get(0).viddlerPause();
	                //this.elements.content.find('object').get(0).dispose();
	            }
            }    
         }
      })
   });

}





/*
   $('#VideoGallery .videoItem.hoverItem').each(function()
   {
      $(this).qtip(
      {
         content: {
            text: $(this).children(".embeddedVideo").html(),
            title: {
               text: $(this).children(".title").html(),
               button: 'Close'
            }
         },
         position: {
            corner: {
               target: 'topMiddle',
               tooltip: 'bottomMiddle'
            }
         },
         show: { 
            when: 'click', 
            solo: true
         },
         hide: 'unfocus',
         style: {
            tip: true,
            border: {
               width: 0,
               radius: 1,
               color: '#999999'
            },
            name: 'light',
            width: 457
         }
      })
   });
   */
