
/* 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++collective.phantasy.javascripts/phantasy.js - */
// http://ecampus.idractoulouse.net/portal_javascripts/++resource++collective.phantasy.javascripts/phantasy.js?original=1
buildTabs31X=function(container,legends){var threshold=10;var tab_ids=[];var panel_ids=[];legends.each(function(i){tab_ids[i]='#'+this.id;panel_ids[i]=tab_ids[i].replace(/^#fieldsetlegend-/,"#fieldset-")});var handler=ploneFormTabbing._toggleFactory(container,tab_ids.join(','),panel_ids.join(','));if(legends.length>threshold){var tabs=document.createElement("select");var tabtype='option';jq(tabs).change(handler).addClass('noUnloadProtection')} else{var tabs=document.createElement("ul");var tabtype='li'}
jq(tabs).addClass('formTabs');legends.each(function(){var tab=document.createElement(tabtype);jq(tab).addClass('formTab');if(legends.length>threshold){jq(tab).text(jq(this).text());tab.id=this.id;tab.value='#'+this.id} else{var a=document.createElement("a");a.id=this.id;a.href="#"+this.id;jq(a).click(handler);var span=document.createElement("span");jq(span).text(jq(this).text());a.appendChild(span);tab.appendChild(a)}
tabs.appendChild(tab);jq(this).remove()});jq(tabs).children(':first').addClass('firstFormTab');jq(tabs).children(':last').addClass('lastFormTab');return tabs};if(typeof jq!="undefined"){ploneFormTabbing._buildTabs=buildTabs31X }


/* - ++resource++igs.theme.javascripts/main.js - */
// http://ecampus.idractoulouse.net/portal_javascripts/++resource++igs.theme.javascripts/main.js?original=1
var ua=navigator.userAgent;var isIE6=(ua.match(/MSIE 6\.0/));IE_CorrectAlpha_PNG=function(){if(isIE6){docimages=jQuery('body img');docimages.each(function(){imgExt=this.src.substring(this.src.length-3,this.src.length);imgExt=imgExt.toUpperCase();if(imgExt=="PNG"){imgID=(this.id)?"id='"+this.id+"' ":"";imgClass=(this.className)?"class='"+this.className+"' ":"";imgTitle=(this.title)?"title='"+this.title+"' ":"title='"+this.alt+"' ";imgStyle="display:inline-block;"+this.style.cssText;if(this.align=="left"){imgStyle="float:left;"+imgStyle} else if(this.align=="right"){imgStyle="float:right;"+imgStyle}
if(this.parentElement.href){imgStyle="cursor:hand;"+imgStyle}
strNewHTML='<span '+imgID+imgClass+imgTitle+' style="width:'+this.width+'px; height:'+this.height+'px;'+imgStyle+';'+'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+this.src+'\', sizingMethod=\'scale\');"></span>';this.outerHTML=strNewHTML}})}}
jQuery(document).ready(IE_CorrectAlpha_PNG);fixCorners=function(){var col2=jQuery('#portal-column-two');var col1=jQuery('#portal-column-one');if(!col2.length){jQuery('#corner-bottom-right').css('background',"transparent url('./corner-right-bottom-white.gif') top right no-repeat");jQuery('#corner-bottom-right').css('border-color',"white");jQuery('#corner-top-right').css('background',"transparent url('./corner-right-top-white.gif') top right no-repeat");jQuery('#corner-top-right').css('border-color',"white")}
if(!col1.length&&!col2.length){jQuery('.managePortletsFallback').each(function(){jQuery(this).parent().css('background-color','white')})}}
jQuery(document).ready(fixCorners);fixContentPadding=function(){var content=jQuery('#content');if(!content.length) jQuery('.documentContent').css('padding','1em')}
jQuery(document).ready(fixContentPadding);fixScreenPadding=function(){if(jQuery('body').width()<1041){jQuery('body').css('padding','0 0 34px 0')}
else jQuery('body').removeAttr('style')}
jQuery(document).ready(fixScreenPadding);jQuery(window).bind('resize',fixScreenPadding);fixNavtreeStyle=function(){var navitems=jQuery('.portletItem .navTreeItem a');if(navitems.length) jQuery(navitems[navitems.length-1]).addClass('lastNavtreeItem')}
jQuery(document).ready(fixNavtreeStyle);fixPortletsStyleFor=function(portlets,dontforcefirstfooter){dontforcefirstfooter=(dontforcefirstfooter)?dontforcefirstfooter:false;if(portlets.length){var firstPortlet=jQuery(portlets[0]);firstPortlet.addClass('firstPortlet');var firstFooter=jQuery('.portletFooter',firstPortlet);if(!(firstFooter.length||dontforcefirstfooter)){firstPortlet.append('<dd class="portletFooter emptyFooter">&nbsp;</dd>')}
var lastPortlet=jQuery(portlets[portlets.length-1]);lastPortlet.addClass('lastPortlet');var lastFooter=jQuery('.portletFooter',lastPortlet);if(!lastFooter.length){lastPortlet.append('<dd class="portletFooter emptyFooter">&nbsp;</dd>')}}}
fixPortletsStyle=function(){fixPortletsStyleFor(jQuery('#portal-column-one .portlet'),dontforcefirstfooter=true);fixPortletsStyleFor(jQuery('#portal-column-two .portlet'))}
jQuery(document).ready(fixPortletsStyle);fixSafariChrome=function(){if(window.devicePixelRatio){jQuery('#portal-columns').addClass('relativeCols');jQuery('#portal-footer').addClass('relativeFooter');jQuery('#portal-colophon').addClass('relativeColophon');jQuery('#corners-bottom-wrapper').addClass('relativeCornersBottom')}}
jQuery(document).ready(fixSafariChrome);fixGlobalNav=function(){if(jQuery('#portal-column-one').length) coloneWidth=jQuery('#portal-column-one').width();else coloneWidth=0;jQuery('#portal-globalnav').width(coloneWidth+jQuery('#portal-column-content').width());jQuery('#portal-globalnav .portal-tab-link').each(function(){theight=jQuery(this).height();if(theight>20){jQuery(this).css('top','20px')}})}
jQuery(window).load(fixGlobalNav);jQuery(window).resize(fixGlobalNav);
