/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - ++resource++jquery.imagesLoaded.js - */
// http://www.synalinq.com/portal_javascripts/++resource++jquery.imagesLoaded.js?original=1
jQuery.fn.imagesLoaded=function(callback){var elems=this.filter('img');var len=elems.length;elems.bind('load',function(){if(--len<=0){callback.call(elems,this)}}).each(function(){if(this.complete||this.complete===undefined){var src=this.src;this.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";this.src=src}});return this};

/* - ++resource++auslfe-multimediaportlet.js - */
// http://www.synalinq.com/portal_javascripts/++resource++auslfe-multimediaportlet.js?original=1
jQuery.auslfe_multimedia={timeout:30000,i18n:{en:{stopReload:'Click to stop auto-reload',restartReload:'Click to restart auto-reload'},it:{stopReload:'Click per fermare il caricamento automatico',restartReload:'Click per avviare di nuovo il caricamento automatico'}}};jq(document).ready(function(){var lang=jq("html").attr('lang')||'en';var i18n=jq.auslfe_multimedia.i18n[lang]||jq.auslfe_multimedia.i18n['en'];
function randOrd(){return(Math.round(Math.random())-0.5)}
jq('.portletMultimedia .galleryMultimedia a').each(function(){jq(this).attr("href","javascript:;").find("img").remove()});jq('.portletMultimedia').each(function(index){var portlet=jq(this);var rnd=jq("span.random",portlet).length>0;var client_reload=jq("span.client_reload",portlet).length>0;var link=jq(".portletFooter a",portlet);var images=null;
function reorder(startHidden){var startHidden=startHidden||false;if(rnd) images.sort(randOrd);jq(".galleryMultimedia a",portlet).each(function(index){var link=jq(this);var curData=images[index];if(!curData.image)
curData.image=jq('<img alt="'+curData.description+'" title="'+curData.title+'" src="'+curData.url+'/image_tile" '+(startHidden?' style="display:none"':'')+'/>');link.append(curData.image);curData.image.imagesLoaded(function(e){jq(this).fadeIn("fast")});link.attr("href",curData.url+"/image_view_fullscreen")})};jq.get(link.attr('href')+'/@@query_images',{}, function(data){images=data;reorder();portlet.removeClass("hideFlag")},dataType='json');if(rnd&&client_reload){portlet.bind("portletRefresh", function(event){jq("img",portlet).fadeOut("fast", function(){jq("img",portlet).remove();reorder(true)})});var reloadEventHandler=function(){portlet.trigger("portletRefresh")}
var intval=setInterval(reloadEventHandler,jq.auslfe_multimedia.timeout);jq(".portletHeader",this).attr('title',i18n['stopReload']);jq(".portletHeader",this).click(function(e){client_reload=!client_reload;if(client_reload){jq(this).attr('title',i18n['stopReload']);intval=setInterval(reloadEventHandler,jq.auslfe_multimedia.timeout);reloadEventHandler()}
else{jq(this).attr('title',i18n['restartReload']);clearInterval(intval)}})}})});

