I think that with a plugin i could apply this effect to images. In this plugin there’s a custom jquery expression
jQuery(thumbnails).addClass("fancybox").attr("rel","fancybox").getTitle();
It’s possible to apply this expression to the echo string?
echo "<li>";
if($p_meta_set ['items_name'] [$key] != 'video')
echo "<img src='".$item."' alt='".$p_meta_set ['items_name'] [$key]."'>";
else {
//For Vimeo...
if ( strpos($item, "vimeo") ) :
$url = substr( strrchr($item, "/"),1);
echo "<iframe src='http://player.vimeo.com/video/{$url}' width='940' height='470' frameborder='0'></iframe>";
//For Youtube...
elseif( strpos($item, "?v=") ):
$url = substr( strrchr($item, "="),1);
echo "<iframe src='http://www.youtube.com/embed/{$url}?wmode=opaque' width='940' height='470' frameborder='0'></iframe>";
endif;
}
echo "</li>";