/* 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++portletbanners.js - */
// http://www.sleeplessknights.org/portal_javascripts/++resource++portletbanners.js?original=1
jq.fn.portletBanners=function(delay,fade_speed){jq(this).each(function(){var container=jq(this);var items=container.find('.portletbanner');container.height(container.height());container.width(container.width());container.css('position','relative');items.css({'position':'absolute','top':0,'left':0});var active=items.eq(0);
function rotate(){var next=active.next('.portletbanner');if(next.length==0){next=items.eq(0)}
active.fadeOut(fade_speed);next.fadeIn(fade_speed, function(){active=next})}
var rotate_timer=setInterval(rotate,delay)});return this};

/* - ++resource++imageeditor/editlink.js - */
// http://www.sleeplessknights.org/portal_javascripts/++resource++imageeditor/editlink.js?original=1
(function($){$(document).ready(function(){$('body').append('<div id="image-editor" />');$('div > div.field:first-child > img:first-child').
parent().parent().next().
append('&mdash; <a href="" id="edit-image">Edit this image</a>');$('#edit-image').
click(function(event){event.preventDefault();var field=$(this).parent()[0].id.replace('archetypes-fieldname-','');var url=window.location.pathname+'/../@@imageeditor.inline?field='+field;$('#image-editor').load(encodeURI(url), function(){$('.ui-dialog-titlebar-close').attr('href',window.location.href);fire('editor_loaded',IMAGE_INFORMATION)})})})})(jQuery);

