tabSlide = Class.create(); tabSlide.prototype= { selector:'.slider-tab', effect:'', url :'', duration:'', from :'', to :'', direction:'', identifier:'', isProductViewT : 0, initialize: function(options){ this.effect = options['effect']; this.url = options['url']; this.duration=options['duration']; this.from=options['from']; this.to=options['to']; this.direction= options['direction']; this.identifier=options['identifier']; this.icon=options['icon']; this.isProductViewT=options['is_product_view_tab']; setStyleAjax(this.icon); }, run : function(selector) { $$(this.selector+' a').each(this.initTab.bind(this)); }, initTab: function(el) { el.href = 'javascript:void(0)'; if ($(el.parentNode).hasClassName('active')) { this.showContent(el); } if($(el.parentNode.parentNode).childElements().length>1){ el.observe('click', this.showContent.bind(this, el)); } }, showAnimation: function(id) { $(id+'_contents').up().down('div.ajax_loading_tab').setStyle({ display:'block' }); }, hideAnimation: function(id) { $(id+'_contents').up().down('div.ajax_loading_tab').hide(); }, showProduct: function(catId,id){ postData = 'ajax_tab_id=' + catId; if($(id+'_contents').innerHTML.length < 5) { new Ajax.Request(this.url,{ method:'post', postBody:postData, onCreate: function() { this.showAnimation(id); }.bind(this), onComplete: function() { if(typeof Quickviewload != "undefined"){ Quickviewload('.arw_quickview'); } if((typeof ajaxCartShoppCartLoad != "undefined")&&(!this.isProductViewT)){ ajaxCartShoppCartLoad('button.btn-cart'); } this.hideAnimation(id); }.bind(this), onSuccess: function(transport){ if (transport.responseText.isJSON()) { var response = transport.responseText.evalJSON(); if (response.error) { alert(response.error); } else{ } /* this.hideAnimation(); */ /* $('backgroundajax').hide(); $('ajax_loading').hide(); */ var content=$(id+'_contents'); var tab_id = id+'_contents'; content.replace('