;(function($) { var fadeBoxSet; (fadeBoxSet = function() {}).prototype = { speed : 200, delay : 130, init : function() { this.attachElement(); this.alphaImageLoader(); this.boxSet(); this.showTrigger(); }, attachElement : function() { this.wrap = $('ul.customerVoiceBlockA'); this.box = $(this.wrap).find('li'); }, boxSet : function() { var self = this; $(self.box).css({ 'opacity' : '0' }); }, showBox : function() { var self = this; $(self.box).each(function(i) { $(self.box).eq(i) .delay(self.delay + (i*self.delay)) .animate({ 'opacity' : '1' }, self.speed); }); }, showTrigger : function() { var self = this; $(window).scroll(function() { var stop = $(this).scrollTop(); var spos = $(self.wrap).offset().top - $(window).height() + 167; if (stop > spos) { self.showBox(); } }); }, alphaImageLoader : function() { var self = this; if(navigator.userAgent.indexOf("MSIE") != -1) { $(self.box).find('img').each(function() { if($(this).attr('src').indexOf('.png') != -1) { $(this).css({ 'filter': 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + $(this).attr('src') + '", sizingMethod="scale");' }); } }); } } }; (function() { window.fbox = new fadeBoxSet(); })(); $(function() { window.fbox.init(); }) })(jQuery);