
/* 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++tecnoteca.cmdbuildtheme2011.javascripts/jquery.textfill.js - */
// http://www.cmdbuild.org/portal_javascripts/++resource++tecnoteca.cmdbuildtheme2011.javascripts/jquery.textfill.js?original=1
﻿;(function($){$.fn.textfill=function(options){var defaults={maxFontPixels:40,innerTag:'span'};var Opts=jQuery.extend(defaults,options);return this.each(function(){var fontSize=Opts.maxFontPixels;var ourText=$(Opts.innerTag+':visible:first',this);var maxHeight=$(this).height();var maxWidth=$(this).width();var textHeight;var textWidth;do{ourText.css('font-size',fontSize);textHeight=ourText.height();textWidth=ourText.width();fontSize=fontSize-1} while((textHeight>maxHeight||textWidth>maxWidth)&&fontSize>3)})}})(jQuery);

/* - javascripts.load.js - */
// http://www.cmdbuild.org/portal_javascripts/javascripts.load.js?original=1
var footercarousel_itemList=[]
function footercarousel_itemLoadCallback(carousel,state){for(var i=carousel.first;i<=carousel.last;i++){if(carousel.has(i)){continue}
if(i>footercarousel_itemList.length){break}
carousel.add(i,footercarousel_itemList[i-1])}};jq(document).ready(function(){jq(".megamenu").megamenu({'enable_js_shadow':false});jq("#portal-users").jcarousel({animation:2000,visible:5,scroll:5,auto:6,wrap:'circular',size:footercarousel_itemList.length,itemLoadCallback:{onBeforeAnimation:footercarousel_itemLoadCallback}});jq("#richDocumentCarousel").jcarousel({visible:1,scroll:1});var radius='7px';jq(".bottomcorners").corner("bottom "+radius);jq(".leftcorners").corner("left "+radius);jq(".rightcorners").corner("right "+radius);jq(".topcorners").corner("top "+radius);jq(".allcorners").corner(radius);jq(".portlet.portletNavigationTree .portletItem").corner(radius);jq(".portlet.portletNavigationTree .portletItem ul li a").corner(radius);jq(".jcarousel-skin-richdocument .jcarousel-container").corner(radius);jq(".collage-item .portlet").corner(radius);jq(".boardComment").corner(radius);if(!jq.browser.msie){jq(".mm-content-base").corner("round bottom "+radius).parent().css('padding','0 6px 6px 6px').corner("round bottom "+radius);jq("#LSShadow").corner("round bottom "+radius).parent().css('padding','0 6px 6px 6px').corner("round bottom "+radius)} else{jq(".mm-content-base").parent().css('padding','0 6px 6px 6px');jq("#LSShadow").parent().css('padding','0 6px 6px 6px')}
jq("#portal-sitemap li a").corner("5px");jq(".field input, .field select, .field textarea, .formControls input, input.standalone, input.context, input.destructive").corner(radius);jq(".cmdbuild_style").html(jq('<span></span>').append(jq('<span></span>').html('CMD').addClass('cmdbuild_style_orange')).append(jq('<span></span>').html('B').addClass('cmdbuild_style_gray')).append(jq('<span></span>').html('uild').addClass('cmdbuild_style_blue')).append(jq('<sup></sup>').html('&reg;').addClass('cmdbuild_style_reg')));jq('.richDocumentImage a, .richDocumentFirstImage a').prepOverlay({subtype:'image',urlmatch:'/image_view_fullscreen$',urlreplace:'/image_large'});jq('.portlet.portletNavigationTree .portletHeader').textfill({maxFontPixels:30})});

