Image/Video Replacement. HELP PLEASE!

Image/Video Replacement. HELP PLEASE!

I'm currently using the jQueary Image Replacement gallery on a site that I'm working on. The problem is now the client also wants to add video to the image area along with JPGs. (ie. when you click on a thumbnail some will be JPGs and other thumbnails will link to a video). I'm not sure how to do this, because I don't know how to write Javascript. The following is the jQueary scripts. Is there a way to add video functionality? Thank for any help.

Image


<!--the code-->

First append an empty <em> to H2.

When a link within the <p class=thumbs> is clicked:
- store its href attribute into a variable "largePath"
- store its title attribute into a variable "largeAlt"
- replace the img id="largeImg" scr attribute with the variable "largePath" and replace the alt attribute with the variable "largeAlt"
- Set the em content (within the h2) with the variable largeAlt (plus the brackets)


$(document).ready(function(){

$("h2").append('<em></em>')

$(".thumbs a").click(function(){

var largePath = $(this).attr("href");
var largeAlt = $(this).attr("title");

$("#largeImg").attr({ src: largePath, alt: largeAlt });

$("h2 em").html(" (" + largeAlt + ")"); return false;
});

});