/* Scroll down to "begin editing here" to alter the slideshow. vvx_slideshow 0.1.1 written by Jay Kerschner ( http://www.venivortex.com/ ). This Software is available under the MIT license. This excludes image filenames and descriptions in the vvx.slideshow.images array, which are not released under a free license unless their author specifically releases them as such. The MIT License Copyright (c) 2010 Jay Kerschner Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ if (!vvx) { var vvx = {}; } /* Begin editing here. */ vvx.slideshow = { height: 225, width: 300, interval: 5000, //Time between each change; in milliseconds (1000 milliseconds = 1 second). time: 1000 //Time it takes for one image to morph into another; in milliseconds (1000 milliseconds = 1 second). }; vvx.slideshow.images = [ {image: "uploads/images/long_view.jpg", description: "People shopping at and walking around the market"}, {image: "uploads/images/honey.jpg", description: "Closeup of honey jars in the shape or bears"}, {image: "uploads/images/flowers.jpg", description: "An arrangement of different colors of flowers"}, {image: "uploads/images/eggs_for_sale.jpg", description: "A sign which says 'Fresh Eggs for Sale'"}, {image: "uploads/images/cookies.jpg", description: "Cookies and other sweets behind glass"}, {image: "uploads/images/cherry_tomatos.jpg", description: "Small boxes of orange cherry tomatos"}, {image: "uploads/images/carrots.jpg", description: "Orange and white carrots"}, {image: "uploads/images/beans.jpg", description: "Boxes filled with green beans"} //No comma after the last one! ]; /* The remainder of this document is general code, and should not normally need to be changed. Minified/obfucated with http://javascriptcompressor.com/ . See http://www.venivortex.com/download/vvx_slideshow_0.1.1.js for full text */ vvx.slideshow.imageArray=[];$.each(vvx.slideshow.images,function(a,b){vvx.slideshow.imageArray[a]=b.image});$.cacheImage(vvx.slideshow.imageArray);$(document).ready(function(){var a=vvx.slideshow;$("#vvx_slideshow").css("height",a.height).css("width",a.width)});window.onload=function(){setInterval(vvx.slideshow.swapimgs,vvx.slideshow.interval)};vvx.slideshow.nextimg_image=vvx.slideshow.images[1].image;vvx.slideshow.nextimg_description=vvx.slideshow.images[1].description;vvx.slideshow.nextimg_num=1;vvx.slideshow.swapimgs=function(){var a=vvx.slideshow;var b=a.nextimg_image;var c=a.nextimg_description;var d=a.nextimg_num;var e=$("#vvx_slideshow_image_1").offset();if(c){var f=" alt='"+c+"'"}else{var f=""}var g="";$(g).css("top",e.top).css("left",e.left).appendTo("#vvx_slideshow");$("#vvx_slideshow_image_1").fadeOut(a.time);$("#vvx_slideshow_image_2").fadeIn(a.time,function(){if(d<(a.images.length-1)){vvx.slideshow.nextimg_num+=1;vvx.slideshow.nextimg_image=vvx.slideshow.images[vvx.slideshow.nextimg_num].image;vvx.slideshow.nextimg_description=vvx.slideshow.images[vvx.slideshow.nextimg_num].description}else{vvx.slideshow.nextimg_num=0;vvx.slideshow.nextimg_image=a.images[vvx.slideshow.nextimg_num].image;vvx.slideshow.nextimg_description=a.images[vvx.slideshow.nextimg_num].description}$("#vvx_slideshow_image_1").remove();$("#vvx_slideshow_image_2").attr("id","vvx_slideshow_image_1")})};