window.addEvent("domready", function(){ var imagesA = [ {url:"", link:""}, {url:"http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/1.jpg", link:"abba"}, {url:"http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/2.jpg", link:"babba"}, {url:"http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/3.jpg", link:"cabba"}, {url:"http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/4.jpg", link:"dadda"} ]; var massimoA = 4; var mywall = new Wall("wall", { "draggable":false, "slideshow":true, "speed":1600, "showDuration":6000, "preload":true, "transition":Fx.Transitions.Expo.easeInOut, "width":550, "height":362, "printCoordinates":false, "rangex":[0,massimoA], "rangey":[0,1], callOnUpdate: function(items){ items.each(function(e, i){ // If use concole log // console.log("x:" + e.x + "\t y:"+e.y); // On Update set different color background // e.node.setStyle("background","url('http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/"+((e.y)+1)+".jpg') no-repeat center center"); e.node.setStyle("background", "url('"+imagesB[(e.y)+1].url+"') no-repeat center center"); e.node.setProperties({"onclick": "window.location.href = '"+imagesB[(e.y)+1].link+"'"}); e.node.fade("hide").fade("in") }.bind(this)); } }); callBack = function(items){ items.each(function(e, i){ e.node.setStyle("background", "url('"+imagesA[(e.y)+1].url+"') no-repeat center center"); //e.node.inject(this.wall); e.node.setProperties({ "onclick": "window.location.href = '"+imagesA[(e.y)+1].link+"'" }); //e.inject=images[(e.y)+1].link; //alert(images[(e.y)+1].link) }) } // Define CallBack mywall.setCallOnUpdate(callBack) // Init Wall mywall.initWall(); var imagesB = [ {url:"", link:""}, {url:"http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/1.jpg", link:"Babba"}, {url:"http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/2.jpg", link:"Bbabba"}, {url:"http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/3.jpg", link:"Bcabba"}, {url:"http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/4.jpg", link:"Bdadda"} ]; var massimoB = 4; var mywall2 = new Wall("wall2", { "draggable":false, "slideshow":true, "speed":1600, "showDuration":7200, "preload":true, "transition":Fx.Transitions.Expo.easeInOut, "width":450, "height":181, "printCoordinates":false, "rangex":[0,1], "rangey":[0,massimoB], callOnUpdate: function(items){ items.each(function(e, i){ // If use concole log // console.log("x:" + e.x + "\t y:"+e.y); // On Update set different color background //e.node.setStyle("background","url('http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/"+((e.x)+1)+".jpg') no-repeat center center"); e.node.setStyle("background", "url('"+imagesB[(e.x)+1].url+"') no-repeat center center"); e.node.setProperties({"onclick": "window.location.href = '"+imagesB[(e.x)+1].link+"'"}); e.node.fade("hide").fade("in") }.bind(this)); } }); // Init Wall mywall2.initWall(); var massimoC = 4; var imagesC = [ {url:"", link:""}, {url:"http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/1.jpg", link:"Cabba"}, {url:"http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/2.jpg", link:"Cbabba"}, {url:"http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/3.jpg", link:"Ccabba"}, {url:"http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/4.jpg", link:"Bdadda"} ]; var mywall3 = new Wall("wall3", { "draggable":false, "slideshow":true, "speed":1600, "showDuration":6800, "preload":true, "transition":Fx.Transitions.Expo.easeInOut, "width":450, "height":181, "printCoordinates":false, "rangex":[0,1], "rangey":[0,massimoC], callOnUpdate: function(items){ items.each(function(e, i){ // If use concole log // console.log("x:" + e.x + "\t y:"+e.y); // On Update set different color background //e.node.setStyle("background","url('http://www.leafillustration.it/wp-content/themes/leafillustration2012/images/wall/"+((e.l)-e.x)+".jpg') no-repeat center center"); e.node.setStyle("background", "url('"+imagesB[(e.l)-e.x].url+"') no-repeat center center"); e.node.setProperties({"onclick": "window.location.href = '"+imagesB[(e.l)-e.x].link+"'"}); e.node.fade("hide").fade("in") }.bind(this)); } }); // Init Wall mywall3.initWall(); //mywall3.getListLinksPoints(0); });