File Manager

Current Directory: /home/astoriaah/www/old15/media/widgetkit/widgets/slideset/js
Viewing File: /home/astoriaah/www/old15/media/widgetkit/widgets/slideset/js/lazyloader.js
/* Copyright (C) YOOtheme GmbH, YOOtheme Proprietary Use License (http://www.yootheme.com/license) */ (function($){$widgetkit.lazyloaders["slideset"]=function(element,options){element.css("visibility","hidden");var set_container=element.find(".sets:first"),maxwidth=set_container.css({width:""}).width(),sets=element.find("ul.set").show(),optimalwidth=0,gwidth=options.width=="auto"?element.width():options.width,gheight=options.height=="auto"?sets.eq(0).children().eq(0).outerHeight(true):options.height;sets.each(function(setindex){var set=$(this).show(),childs=$(this).children(),tmp=0;childs.each(function(index){var child=$(this);child.css("left",tmp);tmp+=child.width()});optimalwidth=Math.max(optimalwidth,tmp);set.css("width",tmp).data("width",tmp).hide()});sets.eq(0).show();set_container.css({height:gheight});if(optimalwidth>maxwidth){var ratio=optimalwidth/maxwidth;sets.css($widgetkit.css3({transform:"scale("+1/ratio+")"}));set_container.css("height",gheight/ratio)}sets.css({height:gheight});$widgetkit.load(WIDGETKIT_URL+"/widgets/slideset/js/slideset.js").done(function(){element.slideset(options).css("visibility","visible");element.find("img[data-src]").each(function(){var img=$(this),src=img.data("src");setTimeout(function(){img.attr("src",src)},1)})})}})(jQuery);