Photo Gallery
Nothing makes a restaurant seem so inviting as photo proof of delicious dishes straight out of your kitchen and friends having a blast (or couples enjoying a romantic meal) at your tables. Let your would-be guests see that great food and a great time awaits them, then lead them to your online reservations page. What could be easier?
/*********************************************** * Photo Gallery Script v2.0- © Dynamic Drive (www.dynamicdrive.com) * This notice must stay intact for legal use. * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/
//Define your own array to hold the photo album images //Syntax: ["path_to_thumbnail", "opt_image_title", "opt_destinationurl", "opt_linktarget"]
var myvacation=new Array() myvacation[0]=["..http://www.bestseafoodinseattle.com/sea-crab.jpg", "", "photo1-large.jpg"] myvacation[1]=["http://www.bestseafoodinseattle.com/sea-crab.jpg", "Our car", ""] myvacation[2]=["photo3.jpg", "Our dog", "photo3-large.jpg"] myvacation[3]=["photo4.jpg", "Our hotel", "http://www.gohawaii.com/"] myvacation[4]=["photo5.jpg", "Our Computer", "http://www.google.com", "_new"] myvacation[5]=["photo6.jpg", "Our house", "photo6-large.jpg"] myvacation[6]=["photo7.jpg", "Our Friends", "http://www.ask.com"]
//initiate a photo gallery //Syntax: new photogallery(imagearray, cols, rows, tablewidth, tableheight, opt_[paginatetext_prefix, paginatetext_linkprefix]) var thepics=new photogallery(myvacation, 3, 1, ‘700px’, ‘600px’)
//OPTIONAL: Run custom code when an image is clicked on, via “onselectphoto” //DELETE everything below to disable //Syntax: function(img, link){}, whereby img points to the image object of the image, and link, its link object, if defined thepics.onselectphoto=function(img, link){ if (link!=null) //if this image is hyperlinked window.open(link.href, “”, “width=800, height=600, status=1, resizable=1″) return false //cancel default action when clicking on image, by returning false instead of true }
