///////////////////////////////////////////////////////////////////////////////////// window.addEvent('domready', function domreadyFunctions(){ ///////////////////////////////////////////////////////////////////////////// //sub menu background /*new SubNavigation({ duration: 300 ,obj:"#sub-navigation li a" });*/ ///////////////////////////////////////////////////////////////////////////// new PlaceHolder(); ///////////////////////////////////////////////////////////////////////////// product_animation(); //top menu /* new ShowMenu({ obj:"#top-menu li a", duration: 300 });*/ new TopMenu({ duration: 300 }); contentFunctions(); ////////////////////////////////////////////////////////////////////// new pageLoaderAjax({ links:'div.small-text-list h3 a' , conteiner:'div.small-text-list' , active:'small-text-list-active' , loadInTo:'p' , data:'a-sub-text' , loaderHtml:'loader' , onSuccess: contentFunctions }); ////////////////////////////////////////////////////////////////////// //top navigation }); //parse content functions function contentFunctions(){ ///////////////////////////////////////////////////////////////////////////// d('co'); /*new ShopMap({ links: '.p-shop-link', shower: 'div.shop-cities', active: 'active' }); new ShopMap({ links: '.s-shop-link', shower: 'p', active: 't-active' });*/ new ShopMap({ links: '#city-list h3 a', shower: 'div.shop-cities', active: 'active' }); new ShopMap({ links: '#city-list h4 a', shower: 'p', active: 't-active' }); /*for new products, i use shopmap template*/ new ShopMap({ links: '#level-list h3 a', shower: 'div.shop-cities', active: 'active' }); new ShopMap({ links: '#level-list h4 a', shower: 'p', active: 't-active' }); //parse submit buttons new Submit(); ///////////////////////////////////////////////////////////////////////////// //print button $$("a.print_button").each(function(prButton, i){ if(prButton.replaced) return; prButton.replaced=true; prButton.addEvent('click', function(e){ var url = new Url(); var hash=url.getHash(); popup(hash+'?print', 640, 480); (new Event(e)).stop(); }); }); ///////////////////////////////////////////////////////////////////////////// //gallery not reload new Gallery({ duration:2000, durationImage:500 ,descImage:'.image-description' }); /////////////////////////////////////////////////////////////////////////// new InlinePopups({ links: '#gallery-image-list a' ,displayIn: $("holder") ,loadText: '' ,slideText: 'Slīdrāde' ,'downloadButton': 'Lejuplādēt' }); /////////////////////////////////////////////////////////////////////////// new LinkReplacer(); //////////////////////////////////////////////////////////////////////////// if($("date")) { myCal = new Calendar({ date: 'Y-m-d' }, { blocked:['* * * 0,6,5' , '1-31 1-12 1900-2009' , '1-31 1-8 2010' , '1-10 9 2010' ], direction: 0, days:['Svētdiena', 'Pirmdiena', 'Otrdiena', 'Trešdiena', 'Ceturtdiena', 'Piektdiena', 'Sestdiena'] ,months: ['Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jūn', 'Jūl', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'] ,tweak:{ x:100, y:100 }, injectIn: $('calendar-in'), displayJect: '#date-chooser',//'.choose-date-text',//'date-chooser', pressedButton: '#after-calendar', displaySelected: $('display-date') }); } //////////////////////////////////////////////////// //tips new MapTips({ el:'div.tooltip' }); /* var myTips = new Tips('div.tooltip', { fixed: true ,offsets:{ x:-200 ,y:16 } }); myTips.addEvent('show', function(tip){ tip.fade('in'); });*/ (function(){ if($('slideText')){ var t = $('slideText').getElement('.textHolder'); var html = t.get('html'); var y = t.getSize().y; var fx = new Fx.Tween(new Element('div', { 'styles':{ 'position':'absolute' , 'top': 0 , 'left': 0 } }).wraps(t).adopt(t.clone()), { 'fps': 20 , 'duration': y*40 , 'transition': Fx.Transitions.linear , onComplete: function(){ animate(); } }); function animate(){ fx.start('top', 0, -y); } animate(); } })(); } //////////////////////////////////////////////// function product_animation(){ //product menu new ProductMenu({ sub:{ duration:300}, sub2:{ duration:500} }); } function d(v){ if(Browser.Engine.gecko){ //console.info(v); } } function a(v) { //alert(v); }