$(function () { var loader, options; loader = $(new Image()); options = { images: [ { thumbs:[ "images/realisations/projet_00/thumbs/cascade_1_00.jpg" ], small:[ "images/realisations/projet_00/small/cascade_1_00.jpg" ], big:[ "images/realisations/projet_00/big/cascade_1_00.jpg" ] }, { thumbs:[ "images/realisations/projet_01/thumbs/cascade_2_01.jpg" ], small:[ "images/realisations/projet_01/small/cascade_2_01.jpg" ], big:[ "images/realisations/projet_01/big/cascade_2_01.jpg" ] }, { thumbs:[ "images/realisations/projet_02/thumbs/complexe_multi_sport_de_laval_dome_02.jpg" ], small:[ "images/realisations/projet_02/small/complexe_multi_sport_de_laval_dome_02.jpg" ], big:[ "images/realisations/projet_02/big/complexe_multi_sport_de_laval_dome_02.jpg" ] }, { thumbs:[ "images/realisations/projet_03/thumbs/concept_epdm_laboratoire_pre_clinique_03.jpg" ], small:[ "images/realisations/projet_03/small/concept_epdm_laboratoire_pre_clinique_03.jpg" ], big:[ "images/realisations/projet_03/big/concept_epdm_laboratoire_pre_clinique_03.jpg" ] }, { thumbs:[ "images/realisations/projet_06/thumbs/laboratoire_pre_clinique_06.jpg" ], small:[ "images/realisations/projet_06/small/laboratoire_pre_clinique_06.jpg" ], big:[ "images/realisations/projet_06/big/laboratoire_pre_clinique_06.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_100/small/ABC Rive-Nord Agrandissement.jpg" ], big:[ "images/realisations/projet_100/big/ABC Rive-Nord Agrandissement.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_101/small/Affi.jpg" ], big:[ "images/realisations/projet_101/big/Affi.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_102/small/Aquadis & Aquadis Agrand..jpg" ], big:[ "images/realisations/projet_102/big/Aquadis & Aquadis Agrand..jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_103/small/Autolog.jpg" ], big:[ "images/realisations/projet_103/big/Autolog.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_104/small/Batiment C (Magna).jpg" ], big:[ "images/realisations/projet_104/big/Batiment C (Magna).jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_105/small/Biesse Canada (2008).jpg" ], big:[ "images/realisations/projet_105/big/Biesse Canada (2008).jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_106/small/CANSTAHL.jpg" ], big:[ "images/realisations/projet_106/big/CANSTAHL.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_107/small/Canaropa.jpg" ], big:[ "images/realisations/projet_107/big/Canaropa.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_108/small/Cascades.jpg" ], big:[ "images/realisations/projet_108/big/Cascades.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_109/small/Centura.jpg" ], big:[ "images/realisations/projet_109/big/Centura.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_110/small/Clarins.jpg" ], big:[ "images/realisations/projet_110/big/Clarins.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_111/small/Complexe Multi-Sport de Laval.jpg" ], big:[ "images/realisations/projet_111/big/Complexe Multi-Sport de Laval.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_112/small/Crescendo.jpg" ], big:[ "images/realisations/projet_112/big/Crescendo.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_113/small/Delta Dailyfood.jpg" ], big:[ "images/realisations/projet_113/big/Delta Dailyfood.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_114/small/Dollarama.jpg" ], big:[ "images/realisations/projet_114/big/Dollarama.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_115/small/Expresco.jpg" ], big:[ "images/realisations/projet_115/big/Expresco.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_116/small/Farinex.jpg" ], big:[ "images/realisations/projet_116/big/Farinex.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_117/small/Georges Courey.jpg" ], big:[ "images/realisations/projet_117/big/Georges Courey.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_118/small/Gusdorf.jpg" ], big:[ "images/realisations/projet_118/big/Gusdorf.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_119/small/Hart.jpg" ], big:[ "images/realisations/projet_119/big/Hart.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_120/small/Honda Hawkesbury (2009).jpg" ], big:[ "images/realisations/projet_120/big/Honda Hawkesbury (2009).jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_121/small/Hutica (2009).jpg" ], big:[ "images/realisations/projet_121/big/Hutica (2009).jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_122/small/Hyundai Brossard (2005).jpg" ], big:[ "images/realisations/projet_122/big/Hyundai Brossard (2005).jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_123/small/IGA Ste-Agathe.jpg" ], big:[ "images/realisations/projet_123/big/IGA Ste-Agathe.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_124/small/IMSL.jpg" ], big:[ "images/realisations/projet_124/big/IMSL.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_125/small/International.jpg" ], big:[ "images/realisations/projet_125/big/International.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_126/small/Kia Brossard (2009).jpg" ], big:[ "images/realisations/projet_126/big/Kia Brossard (2009).jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_127/small/Laboratoire Dr.Renaud.jpg" ], big:[ "images/realisations/projet_127/big/Laboratoire Dr.Renaud.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_128/small/Les Boutiques Tremblant.jpg" ], big:[ "images/realisations/projet_128/big/Les Boutiques Tremblant.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_129/small/Logistic.jpg" ], big:[ "images/realisations/projet_129/big/Logistic.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_130/small/Maitre Saladier.jpg" ], big:[ "images/realisations/projet_130/big/Maitre Saladier.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_131/small/Mazda Brossard (2005).jpg" ], big:[ "images/realisations/projet_131/big/Mazda Brossard (2005).jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_132/small/Metal CN.jpg" ], big:[ "images/realisations/projet_132/big/Metal CN.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_133/small/Miele.jpg.jpg" ], big:[ "images/realisations/projet_133/big/Miele.jpg.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_134/small/Nelmar.jpg" ], big:[ "images/realisations/projet_134/big/Nelmar.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_135/small/Nissan Boucherville (2007).jpg" ], big:[ "images/realisations/projet_135/big/Nissan Boucherville (2007).jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_136/small/Oliver Christie.jpg" ], big:[ "images/realisations/projet_136/big/Oliver Christie.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_137/small/Plats du chef.jpg" ], big:[ "images/realisations/projet_137/big/Plats du chef.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_138/small/RBF International.jpg" ], big:[ "images/realisations/projet_138/big/RBF International.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_139/small/Riendeau Sports (2007).jpg" ], big:[ "images/realisations/projet_139/big/Riendeau Sports (2007).jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_140/small/Robotronique.jpg" ], big:[ "images/realisations/projet_140/big/Robotronique.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_141/small/Rol.jpg" ], big:[ "images/realisations/projet_141/big/Rol.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_142/small/Rona centre distribution Terrebonne.jpg" ], big:[ "images/realisations/projet_142/big/Rona centre distribution Terrebonne.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_143/small/Standard.jpg" ], big:[ "images/realisations/projet_143/big/Standard.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_144/small/Swagelok Agrandissement.jpg" ], big:[ "images/realisations/projet_144/big/Swagelok Agrandissement.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_145/small/Synagogue.jpg" ], big:[ "images/realisations/projet_145/big/Synagogue.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_146/small/Transport Serge Therrien.jpg" ], big:[ "images/realisations/projet_146/big/Transport Serge Therrien.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_147/small/Tricentris.jpg" ], big:[ "images/realisations/projet_147/big/Tricentris.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_148/small/Turbomeca1.jpg" ], big:[ "images/realisations/projet_148/big/Turbomeca1.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_149/small/Unimax (unipneu).jpg" ], big:[ "images/realisations/projet_149/big/Unimax (unipneu).jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_150/small/Vegpro.jpg" ], big:[ "images/realisations/projet_150/big/Vegpro.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_151/small/Velan.jpg" ], big:[ "images/realisations/projet_151/big/Velan.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_152/small/Whytes Agrandissement.jpg" ], big:[ "images/realisations/projet_152/big/Whytes Agrandissement.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_153/small/Yokohama.jpg" ], big:[ "images/realisations/projet_153/big/Yokohama.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_154/small/condos 440 phase 2.jpg" ], big:[ "images/realisations/projet_154/big/condos 440 phase 2.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_155/small/condos pierrefond.jpg" ], big:[ "images/realisations/projet_155/big/condos pierrefond.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_156/small/cuirs_akoury.jpg" ], big:[ "images/realisations/projet_156/big/cuirs_akoury.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_157/small/instalmax.jpg" ], big:[ "images/realisations/projet_157/big/instalmax.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_200/small/CST_AER_SWFB_FleetBank.jpg" ], big:[ "images/realisations/projet_200/big/CST_AER_SWFB_FleetBank.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_201/small/CST_AER_SW_Showplace_LR.jpg" ], big:[ "images/realisations/projet_201/big/CST_AER_SW_Showplace_LR.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_202/small/Cascades_2.jpg" ], big:[ "images/realisations/projet_202/big/Cascades_2.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_203/small/Cascades.jpg" ], big:[ "images/realisations/projet_203/big/Cascades.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_204/small/DickinsonLibrary.jpg" ], big:[ "images/realisations/projet_204/big/DickinsonLibrary.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_205/small/GlendaleArenaCoyoteStadium.jpg" ], big:[ "images/realisations/projet_205/big/GlendaleArenaCoyoteStadium.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_206/small/MartinLutherKingHighSchool.jpg" ], big:[ "images/realisations/projet_206/big/MartinLutherKingHighSchool.jpg" ] }, { thumbs:[ ], small:[ "images/realisations/projet_207/small/Microsoft.jpg" ], big:[ "images/realisations/projet_207/big/Microsoft.jpg" ] } ] , showcase: ["images\/index_showcase\/CST_AER_SWFB_FleetBank.jpg","images\/index_showcase\/CST_AER_SW_Showplace_LR.jpg","images\/index_showcase\/Cascades.jpg","images\/index_showcase\/Cascades_2.jpg","images\/index_showcase\/DickinsonLibrary.jpg","images\/index_showcase\/GlendaleArenaCoyoteStadium.jpg","images\/index_showcase\/MartinLutherKingHighSchool.jpg","images\/index_showcase\/Microsoft.jpg"] }; $.each(options.images, function (i) { $.each(this.thumbs, function (j) { loader.attr('src', this); }); $.each(this.small, function (j) { loader.attr('src', this); }); $.each(this.big, function (j) { loader.attr('src', this); }); }); $.each(options.showcase, function (i) { loader.attr('src', this); }); $('.showcase .gallery').each(function () { var gallery, photo, img, images, index, prev, next, uiindex, uitotal; images = options.showcase; gallery = $(this); photo = $('.photo', gallery); img = $('img:first', gallery); newimg = $(new Image()); prev = $('.button.prev', gallery); next = $('.button.next', gallery); uiindex = $('.ui .info .index', gallery); uitotal = $('.ui .info .total', gallery); index = 0; img.attr('src', images[index]); uiindex.text(index+1); uitotal.text(images.length); function showprev () { var newimg; newimg = $(new Image()); index--; if (index < 0) { index = images.length - 1; } newimg.css({ position:'absolute', left:gallery.width(), top:0 }); newimg.attr('src', images[index]); img.after(newimg); uiindex.text(index+1); newimg.animate({left:0}, { duration:500, complete:function () { img.attr('src', newimg.attr('src')); newimg.remove(); } }); photo.click(function () { }); } function shownext () { var newimg; newimg = $(new Image()); index++; if (index >= images.length) { index = 0; } newimg.css({ position:'absolute', left:gallery.width(), top:0 }); newimg.attr('src', images[index]); img.after(newimg); uiindex.text(index+1); newimg.animate({left:0}, { duration:500, complete:function () { img.attr('src', newimg.attr('src')); newimg.remove(); } }); } prev.click(function () { showprev(); }); next.click(function () { shownext(); }); setInterval(function() { shownext(); }, 6000); }); $('.aside .gallery').each(function () { var gallery, photo, img, images; images = []; gallery = $(this); photo = $('.photo', gallery); img = $('img:first', gallery); $.each(options.images, function(i) { $.each(this.small, function (j) { images.push(this); }); }); img.attr('src', images[Math.floor(Math.random()*images.length)]); }); });