var GB_CURRENT=null;var ROOT="http://www.laperlabomboniere.com/" GB_hide=function(){GB_CURRENT.hide();};GreyBox=new AJS.Class({init:function(_1){this.type="page";this.overlay_click_close=true;this.salt=0;this.callback_fns=[];this.root_dir=ROOT;this.reload_on_close=false;this.src_loader=ROOT+"loading.html";this.show_loading=true;AJS.update(this,_1);},addCallback:function(fn){if(fn){this.callback_fns.push(fn);}},show:function(_3){GB_CURRENT=this;this.url=_3;var _4=[AJS.$bytc("object"),AJS.$bytc("select")];AJS.map(AJS.flattenList(_4),function(_5){_5.style.visibility="hidden";});this.createElements();return false;},hide:function(){this.onHide();if(AJS.fx){var _6=this.overlay;AJS.fx.fadeOut(this.overlay,{onComplete:function(){AJS.removeElement(_6);_6=null;},duration:300});AJS.removeElement(this.g_window);}else{AJS.removeElement(this.g_window,this.overlay);} this.removeFrame();AJS.REV(window,"scroll",_GB_setOverlayDimension);AJS.REV(window,"resize",_GB_update);var _7=[AJS.$bytc("object"),AJS.$bytc("select")];AJS.map(AJS.flattenList(_7),function(_8){_8.style.visibility="visible";});var _9=this.callback_fns;if(_9!=[]){AJS.map(_9,function(fn){fn();});} GB_CURRENT=null;if(this.reload_on_close){window.location.reload();}},update:function(){this.setOverlayDimension();this.setFrameSize();this.setWindowPosition();},createElements:function(){this.initOverlay();this.g_window=AJS.DIV({"id":"GB_window"});AJS.hideElement(this.g_window);AJS.getBody().insertBefore(this.g_window,this.overlay.nextSibling);this.initFrame();this.initHook();this.update();var me=this;if(AJS.fx){AJS.fx.fadeIn(this.overlay,{duration:300,to:0.7,onComplete:function(){me.onShow();AJS.showElement(me.g_window);me.startLoading();}});}else{AJS.setOpacity(this.overlay,0.7);AJS.showElement(this.g_window);this.onShow();this.startLoading();} AJS.AEV(window,"scroll",_GB_setOverlayDimension);AJS.AEV(window,"resize",_GB_update);},removeFrame:function(){try{AJS.removeElement(this.iframe);} catch(e){} this.iframe=null;},startLoading:function(){this.iframe.src=this.src_loader+"?s="+this.salt++;AJS.showElement(this.iframe);},setOverlayDimension:function(){var _c=AJS.getWindowSize();if(AJS.isMozilla()||AJS.isOpera()){AJS.setWidth(this.overlay,"100%");}else{AJS.setWidth(this.overlay,_c.w);} var _d=Math.max(AJS.getScrollTop()+_c.h,AJS.getScrollTop()+this.height);if(_dfl){fl=_2e;} AJS.setTop(this.g_window,fl);} this._setHeaderPos();},onHide:function(){AJS.removeElement(this.header);AJS.removeClass(this.g_window,"GB_Gallery");},onShow:function(){if(AJS.fx){AJS.fx.fadeIn(this.header,{to:1});}else{AJS.setOpacity(this.header,1);}}});AJS.preloadImages(ROOT+"images/close.gif");GB_showFullScreenSet=function(set,_31,_32){var _33={type:"page",fullscreen:true,center_win:false};var _34=new GB_Sets(_33,set);_34.addCallback(_32);_34.showSet(_31-1);return false;};GB_showImageSet=function(set,_36,_37){var _38={type:"image",fullscreen:false,center_win:true,width:300,height:300};var _39=new GB_Sets(_38,set);_39.addCallback(_37);_39.showSet(_36-1);return false;};GB_Sets=GB_Gallery.extend({init:function(_3a,set){this.parent(_3a);if(!this.img_next){this.img_next=ROOT+"images/next.gif";} if(!this.img_prev){this.img_prev=ROOT+"images/prev.gif";} this.current_set=set;},showSet:function(_3c){this.current_index=_3c;var _3d=this.current_set[this.current_index];this.show(_3d.url);this._setCaption(_3d.caption);this.btn_prev=AJS.IMG({"class":"left",src:this.img_prev});this.btn_next=AJS.IMG({"class":"right",src:this.img_next});AJS.AEV(this.btn_prev,"click",AJS.$b(this.switchPrev,this));AJS.AEV(this.btn_next,"click",AJS.$b(this.switchNext,this));GB_STATUS=AJS.SPAN({"class":"GB_navStatus"});AJS.ACN(AJS.$("GB_middle"),this.btn_prev,GB_STATUS,this.btn_next);this.updateStatus();},updateStatus:function(){AJS.setHTML(GB_STATUS,(this.current_index+1)+" / "+this.current_set.length);if(this.current_index==0){AJS.addClass(this.btn_prev,"disabled");}else{AJS.removeClass(this.btn_prev,"disabled");} if(this.current_index==this.current_set.length-1){AJS.addClass(this.btn_next,"disabled");}else{AJS.removeClass(this.btn_next,"disabled");}},_setCaption:function(_3e){AJS.setHTML(AJS.$("GB_caption"),_3e);},updateFrame:function(){var _3f=this.current_set[this.current_index];this._setCaption(_3f.caption);this.url=_3f.url;this.startLoading();},switchPrev:function(){if(this.current_index!=0){this.current_index--;this.updateFrame();this.updateStatus();}},switchNext:function(){if(this.current_index!=this.current_set.length-1){this.current_index++;this.updateFrame();this.updateStatus();}}});AJS.AEV(window,"load",function(){AJS.preloadImages(ROOT+"images/next.gif",ROOT+"images/prev.gif");});GB_show=function(_40,url,_42,_43,_44){var _45={caption:_40,height:_42||500,width:_43||500,fullscreen:false,callback_fn:_44};var win=new GB_Window(_45);return win.show(url);};GB_showCenter=function(_47,url,_49,_4a,_4b){var _4c={caption:_47,center_win:true,height:_49||500,width:_4a||500,fullscreen:false,callback_fn:_4b};var win=new GB_Window(_4c);return win.show(url);};GB_showFullScreen=function(_4e,url,_50){var _51={caption:_4e,fullscreen:true,callback_fn:_50};var win=new GB_Window(_51);return win.show(url);};GB_Window=GreyBox.extend({init:function(_53){this.parent({});this.img_header=ROOT+"images/gb_head.gif";this.img_close=ROOT+"images/w_close.gif";this.show_close_img=true;AJS.update(this,_53);this.addCallback(this.callback_fn);},initHook:function(){AJS.addClass(this.g_window,"GB_Window");this.header=AJS.TABLE({"class":"header"});this.header.style.backgroundImage="url("+this.img_header+")";var _54=AJS.TD({"class":"caption"},this.caption);var _55=AJS.TD({"class":"close"});if(this.show_close_img){var _56=AJS.IMG({"src":this.img_close});var _57=AJS.SPAN("Close");var btn=AJS.DIV(_56,_57);AJS.AEV([_56,_57],"mouseover",function(){AJS.addClass(_57,"on");});AJS.AEV([_56,_57],"mouseout",function(){AJS.removeClass(_57,"on");});AJS.AEV([_56,_57],"mousedown",function(){AJS.addClass(_57,"click");});AJS.AEV([_56,_57],"mouseup",function(){AJS.removeClass(_57,"click");});AJS.AEV([_56,_57],"click",GB_hide);AJS.ACN(_55,btn);} tbody_header=AJS.TBODY();AJS.ACN(tbody_header,AJS.TR(_54,_55));AJS.ACN(this.header,tbody_header);AJS.ACN(this.top_cnt,this.header);if(this.fullscreen){AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this));}},setFrameSize:function(){if(this.fullscreen){var _59=AJS.getWindowSize();overlay_h=_59.h;this.width=Math.round(this.overlay.offsetWidth-(this.overlay.offsetWidth/100)*10);this.height=Math.round(overlay_h-(overlay_h/100)*10);} AJS.setWidth(this.header,this.width+6);AJS.setWidth(this.iframe,this.width);AJS.setHeight(this.iframe,this.height);},setWindowPosition:function(){var _5a=AJS.getWindowSize();AJS.setLeft(this.g_window,((_5a.w-this.width)/2)-13);if(!this.center_win){AJS.setTop(this.g_window,AJS.getScrollTop());}else{var fl=((_5a.h-this.height)/2)-20+AJS.getScrollTop();if(fl<0){fl=0;} AJS.setTop(this.g_window,fl);}}});AJS.preloadImages(ROOT+"images/w_close.gif",ROOT+"images/header_bg.gif"); var gallery = [{'caption': 'Idee regalo', 'url': 'images/gallery/bafa3506cf0efd76c32c3d4fc476c37d.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/7ee28d722618fc69b7bb1b9e0e64c836.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/89d4656b3f4a1e11424e804b2199f33e.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/279f43b7941814c96087def0344d7fe9.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/b3553faefa4fbbe65824d2a324d56b1f.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/eb94e82cd1ded95e276e55c1ecad4fde.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/b1902cdf0fa08d8b24d77a4e8b6a52d0.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/2802b4aa84fc4a5cc46c62851a96844b.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/387361e3fe3ddf04635b2665132336f4.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/cb1895b5a42287eaeeca7d355b752ba8.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/01b45162a38aed0c1f91fc20473ab11c.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/87d5abfb5519ed3ff0e7c59371841a16.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/1976de3ef9101b4184574890b88e8f40.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/9b77dac428f9a43a6514f214dbdffe44.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/6ba3ff9153a9293393f2b82c5454a9e0.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/e13050ce868d071439c63742038b749c.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/4a9c383edd14bef193fc6b7725aff6d5.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/8cf872522e9d986f8ad7d5dc3ab5b012.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/4e1e31f08dbb55c88f28a69d33be9070.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/10492896ee50aab19043bdc885b24f6b.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/9cc76c83df5ae7cdb11eebbf614564be.jpg'},{'caption': 'Bomboniere Thun', 'url': 'images/gallery/9df251fe221fcdb597fb7be31052f8b1.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/7d5dfd3db48b838ff027d1ab5c23743e.jpg'},{'caption': 'Angeli Thun', 'url': 'images/gallery/68126d6b6f251a91c3a0a45c095b402e.jpg'},{'caption': 'Angeli Thun', 'url': 'images/gallery/85e6ea3e02798f9d07d0e39ce16a7a8e.jpg'},{'caption': 'Bomboniere Matilde', 'url': 'images/gallery/60d214157bdfad475d92decab1cb885f.jpg'},{'caption': 'Bomboniere Matilde', 'url': 'images/gallery/ab174bdd44e08631918077814ae1e394.jpg'},{'caption': 'Bomboniere Matilde', 'url': 'images/gallery/6217c8566d978386cac4c914d46225e4.jpg'},{'caption': 'Bomboniere Matilde', 'url': 'images/gallery/0d464107a2f5b7d3194f819bfb2dd3fa.jpg'},{'caption': 'Allestimento bomboniere', 'url': 'images/gallery/e5d56c7a112a7c183eddbf93197a4c1f.jpg'},{'caption': 'Allestimento bomboniere', 'url': 'images/gallery/fa72f57169079a81eeed33d01aadc9f7.jpg'},{'caption': 'Allestimento bomboniere', 'url': 'images/gallery/9272f9bb516833493848c221e3f45bd9.jpg'},{'caption': 'Allestimento bomboniere', 'url': 'images/gallery/9c01976388346bef377368567b5263d7.jpg'},{'caption': 'Allestimento bomboniere', 'url': 'images/gallery/827f93e37ec4f15315a5f7d07e8e059b.jpg'},{'caption': 'Allestimento bomboniere', 'url': 'images/gallery/be168b1e253a7b7c8fb3fbb454b6b251.jpg'},{'caption': 'Allestimento bomboniere', 'url': 'images/gallery/616ecb7da8739ffc4f0278e56298aff3.jpg'},{'caption': 'Allestimento bomboniere', 'url': 'images/gallery/ad5ae5909b4c9b6989fcb0d4420dbb2c.jpg'},{'caption': 'Allestimento bomboniere', 'url': 'images/gallery/f59749a792aba8a7bb8a6474f5e64e10.jpg'},{'caption': 'Allestimento bomboniere', 'url': 'images/gallery/a6a0209f0675a7370c00328d05b17125.jpg'},{'caption': 'Allestimento bomboniere', 'url': 'images/gallery/829e9f38cb96cd0d5eea3b5d2782843f.jpg'},{'caption': 'Cesto bomboniere', 'url': 'images/gallery/027999420fa8a4c8338fbf617dfda674.jpg'},{'caption': 'Cesto bomboniere', 'url': 'images/gallery/b3a2f4f67a951e8075f4a7f41f1c81d3.jpg'},{'caption': 'Cesto bomboniere', 'url': 'images/gallery/4ae75a62ac78be334a3dcb2086d26cca.jpg'},{'caption': 'Tableau', 'url': 'images/gallery/9e8eee8e2b1612206c1106bce2744288.jpg'},{'caption': 'Tableau', 'url': 'images/gallery/d9979c7ecb7bb8ed02e020df39494cac.jpg'},{'caption': 'Tableau', 'url': 'images/gallery/85e2c92c4e4babcc44ee9681bcba6f20.jpg'},{'caption': 'Tableau', 'url': 'images/gallery/374056432165a00da4510ffa1fafc28a.jpg'},{'caption': 'Tableau', 'url': 'images/gallery/1fc6da1c6a247d8eb68fd0d3251c1d77.jpg'},{'caption': 'Tableau', 'url': 'images/gallery/422ac21bd6a5ea131113c044a7fa2481.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/ce745bfa3b5057b68d3f202703e4f7db.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/0659e1d9fbe04430afbe7036c76b21f1.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/07c2cc9c619d011a93fbb5da2d98dd42.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/c5bd1b4ab5da52915757fddb9aa5fdef.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/b5c84510df68bc6efa317597f201e5d9.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/257047b18e80485b10832effedef78a6.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/5dfc146570ef3747f03e3c06657fdf22.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/cd02962a825a02a1bc9f23c1c822e3fa.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/bc03e8528214c813b5aa693acc916e96.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/e4110b5e4324db84cdfc3ebc962e47d6.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/2e0e29b696a527e74cf4134a5ddfa4b6.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/e132efa62a1404dc29eb6f16e1f622fa.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/c906d8f1bf4f5037dea389742e7828e8.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/12708dfe955a9889db23ba9448c3959f.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/1e0c8dfd27e3c071bd27246cebc25f7b.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/09f1c3de1469a4a9f90552919582f7ac.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/614db9c079ea963964424fa235cdd0a7.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/f8452736b4132d3f4da0227dce98c0ce.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/b194ad9a64e1fc7f6c86bd3e2b477e51.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/ea9cf871f08690408aa36de55a801d28.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/f4a1c58ffad37aab59e081f0d8a25934.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/794fc228add191888abdb51b77aa3108.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/ce5561b7a4a3303f2ee6051688d09780.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/94f95dd1a48b623847499e9cf6e6842c.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/3d1b349119a40c26a145be2626c42da9.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/42d381625868230a6c6a5aea20644fe8.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/bfca5ab790e492ab449ff7dae154109f.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/46c211e90cb1a1d41ab125020f7aeead.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/c73d2e5122df3a90dcf4d8ac55ba9237.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/bcc9d6ca9bb7d1f895b73880593d2221.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/47b42a68e94620f0e07419c22cf25f8d.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/e3fa8af6c3992cc6f242fa77ba6b1d35.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/9dfe0c6a43f5ef1b7083d9672fb06b38.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/8be1374f0cd40fd0270a47f1b89fc454.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/7170fd9c403b1d8f619444f396c3ca77.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/4b03db8a08eb731877abd6c8f042b425.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/8c50ff2e23fc25dc09ad4bfd81cf1880.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/aa99d781d4db8a6deb584a3b0e406787.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/f08a04545a6035c485aabf8ed550d6a3.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/213cb7db26fbf77c3513ae6bfe1e599d.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/b08da1d1379461d3ae5b9fdd57ee591a.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/180339f0cbd3c20c457d3e7262e5b80f.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/8e14a256d36b3967c62b3ed4a8f7391a.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/353b9b3f5682211f34479737ff3b3841.jpg'},{'caption': 'Argento', 'url': 'images/gallery/21f53c051baf0e31ff31a6e92aaff8e8.jpg'},{'caption': 'Argento e cristallo', 'url': 'images/gallery/552fc21c10614cbdf8450f25bb4c6ab8.jpg'},{'caption': 'Ciotola argento', 'url': 'images/gallery/bede1783380d8e5465b0618fc4cd99c8.jpg'},{'caption': 'Ciotola argento', 'url': 'images/gallery/ccf9d1bcd460218c6b28a0650917ac23.jpg'},{'caption': 'Cornici', 'url': 'images/gallery/41649964b142a89bba85a164500212ac.jpg'},{'caption': 'Cucchiaio argento', 'url': 'images/gallery/a64d174d921ff865f440eba74c560a6f.jpg'},{'caption': 'Bomboniera Murano', 'url': 'images/gallery/55dd41f015ad42bd324c1eb3c3c666ca.jpg'},{'caption': 'Sale e Pepe', 'url': 'images/gallery/e929b2dd6f92144179a589535ca0cc43.jpg'},{'caption': 'Segnaposto', 'url': 'images/gallery/5eebd9b586650274c369b071d6d1a16f.jpg'},{'caption': 'Argento', 'url': 'images/gallery/768cccecdc8f577ff181c3f57c5a9faf.jpg'},{'caption': 'Cristallo', 'url': 'images/gallery/a7a9d0b73c3c837a05d89ee334efbccb.jpg'},{'caption': 'Arpa', 'url': 'images/gallery/053deef82dfc2d270dd4ef601b0eac93.jpg'},{'caption': 'Confetti', 'url': 'images/gallery/b4503d4cdd3ac9e6fcfee097329478ef.jpg'},{'caption': 'Bomboniera', 'url': 'images/gallery/b207862987e574820744f78cd5050448.jpg'},{'caption': 'Bomboniera', 'url': 'images/gallery/d777ff6c57a3ce27f02b62c14aac9546.jpg'},{'caption': 'Cesto natalizio', 'url': 'images/gallery/238e0a15cca2ac5124aa94783b959ca1.jpg'},{'caption': 'Orsetti', 'url': 'images/gallery/0f9229ebdb56a07a8d774df641b4a991.jpg'},{'caption': 'Oggettistica Thun', 'url': 'images/gallery/beea183890f10be4b35eb352a3e4e2fe.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/36400176f0fec1699ecae66f381df683.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/5690bf3ddb768988ab20d74f9cc183fd.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/a2d3baf7dd578dcd4867cbe758a7131b.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/361689a8b952df9ab11bf302c808f589.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/ca82ff90d0bb62d235a47f00cd07554a.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/5206aa5f8c391b11e5cc85fbebf75170.jpg'},{'caption': 'Idee regalo', 'url': 'images/gallery/9f1e2bbae74848d20a3cc3b8180d4f74.jpg'}];