Response title
This is preview!
Here is the html.
<div class="releaseTitleBtnSec">
<div class="morePhotos videogallery"><a href="" rel="#voverlay">
<img border="0" alt="Photo Lightbox" src"images/cameraIcon.gif" /></a>
</div>
<div class="flashObject">
<object width="708" height="585" id="movieID" name="movieID" swLiveConnect=true>
<param name="allowScriptAccess" value="always"></param>
<param name="allowFullScreen" value="true"></param>
<param name="movie" value="/gallery.swf?xmlfile=111.xml&image=photos/th_search_cover.jpg&imgtoload=0"></param>
<param name="quality" value="high" />
<param name="allowFullScreen" value="false"></param>
<param name="wmode" value="opaque" />
<embed src="/gallery.swf?xmlfile=111.xml&image=photo.jpg&imgtoload=0" quality="high" width="708" height="585" name="gallery" align="middle" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" wmode="opaque"></embed>
</object>
</div>
</div>
Here is the script.
jQuery(function(){
var $=jQuery;
$(".flashObject").css("display","none");
if(!document.getElementById("vcontainer")){
$("body").append($("<div id='voverlay'></div>"));
$("#voverlay").append($("<div id = 'vcontainer'></div>"));
}
$("div[class*=videogallery] *[rel]").overlay({
api:true,expose:0.5?{color:"#313131",loadSpeed:400,opacity:0.5}:null,
onClose:function(){
$("#video_overlay").html("");
},
onBeforeLoad:function(){
var O=document.getElementById("video_overlay");
if(!O){
var oo=$("<div></div>");
oo.attr({id:"video_overlay"});
$("#vcontainer").append(oo);
}
$("#voverlay").width(this.getTrigger().parent().siblings().filter(".flashObject").width());
$("#voverlay").height(this.getTrigger().parent().siblings().filter(".flashObject").height());
},
onLoad:function(){
$("#video_overlay").html(this.getTrigger().parent().siblings().filter(".flashObject").html());
var f=document.getElementById("movieID");
if (f) {
f.tabIndex=0;
f.focus();
}
}
});});
© 2013 jQuery Foundation
Sponsored by and others.