
/* 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.js.innerfade.javascripts/jquery.innerfade.js - */
// http://www.new-work-enterprises.com/portal_javascripts/++resource++collective.js.innerfade.javascripts/jquery.innerfade.js?original=1
$.fn.innerFadeTo=function(slide_number){return this.each(function(index){var $fade_object=$(this).data('object');var $currentVisibleItem=$($fade_object.elements).filter(':visible');var currentItemIndex=$($fade_object.elements).index($currentVisibleItem);$.stopSlideshow($fade_object);if(slide_number!=currentItemIndex){$.fadeToItem($fade_object,slide_number,currentItemIndex)}})};$.fadeToItem=function($fade_object,toShow,toHide){var buildControls=function(){if($fade_object.settings.nextLink||$fade_object.settings.prevLink){$.bindControls($fade_object)}};if($fade_object.settings.animationType=='slide'){$($fade_object.elements[toHide]).slideUp($fade_object.settings.speed);$($fade_object.elements[toShow]).slideDown($fade_object.settings.speed, function(){buildControls()})} else if($fade_object.settings.animationType=='slideOver'){var itemWidth=$($fade_object.elements[0]).width(),to_hide_css={},to_show_css={},to_hide_animation={},to_show_animation={};$($fade_object.container).css({'overflow':'hidden'});to_hide_css={'position':'absolute','top':'0px'};to_show_css=$.extend({},to_hide_css);if(toShow>toHide){console.log('Forwards!');to_hide_css.left="0px";to_hide_css.right="auto";to_show_css.left='auto';to_show_css.right='-'+itemWidth+'px';to_hide_animation.left='-'+itemWidth+'px';to_show_animation.right='0px';console.log(to_hide_css)} else{console.log("Backwards!");to_hide_css.left="auto";to_hide_css.right="0px";to_show_css.left='-'+itemWidth+'px';to_show_css.right='auto';to_hide_animation.right='-'+itemWidth+'px';to_show_animation.left='0px'};$($fade_object.elements[toHide]).css(to_hide_css);$($fade_object.elements[toShow]).css(to_show_css).show();$($fade_object.elements[toHide]).animate(to_hide_animation,$fade_object.settings.speed,$fade_object.settings.easing, function(){$(this).hide()});$($fade_object.elements[toShow]).animate(to_show_animation,$fade_object.settings.speed,$fade_object.settings.easing, function(){buildControls()})} else{$($fade_object.elements[toHide]).fadeOut($fade_object.settings.speed);$($fade_object.elements[toShow]).fadeIn($fade_object.settings.speed, function(){buildControls()})}
if($fade_object.settings.currentItemContainer){$.currentItem($fade_object,toShow)};if($fade_object.settings.indexContainer||$fade_object.settings.callback_index_update){$.updateIndexes($fade_object,toShow)}};$.fadeTimeout=function($fade_object,toShow,toHide,firstRun){if(firstRun!=true){$.fadeToItem($fade_object,toShow,toHide)};$fade_object.count++;if($fade_object.settings.loop==false&&$fade_object.count>=$fade_object.elements.length){$.stopSlideshow($fade_object);return};if($fade_object.settings.type=="random"){toHide=toShow;while(toShow==toHide){toShow=Math.floor(Math.random() * $fade_object.elements.length)}} else{toHide=(toHide>toShow)?0:toShow;toShow=(toShow+1>=$fade_object.elements.length)?0:toShow+1}
var timeout=(firstRun&&$fade_object.settings.startDelay)?$fade_object.settings.startDelay:$fade_object.settings.timeout;$($fade_object.container).data('current_timeout',setTimeout((function(){$.fadeTimeout($fade_object,toShow,toHide,false)}),timeout))};$.fn.innerFadeUnbind=function(){return this.each(function(index){var $fade_object=$(this).data('object');$.stopSlideshow($fade_object)})};$.stopSlideshow=function($fade_object){clearTimeout($($fade_object.container).data('current_timeout'));$($fade_object.container).data('current_timeout',null)};$.bindControls=function($fade_object){$($fade_object.settings.nextLink).unbind().one('click', function(event){event.preventDefault();$.stopSlideshow($fade_object);var $currentElement=$($fade_object.elements).filter(':visible');var currentElementIndex=$($fade_object.elements).index($currentElement);var $nextElement=($currentElement.next().length>0)?$currentElement.next():$($fade_object.elements).filter(':first');var nextElementIndex=$($fade_object.elements).index($nextElement);$.fadeToItem($fade_object,nextElementIndex,currentElementIndex)});$($fade_object.settings.prevLink).unbind().one('click', function(event){event.preventDefault();$.stopSlideshow($fade_object);var $currentElement=$($fade_object.elements).filter(':visible');var currentElementIndex=$($fade_object.elements).index($currentElement);var $previousElement=($currentElement.prev().length>0)?$currentElement.prev():$($fade_object.elements).filter(':last');var previousElementIndex=$($fade_object.elements).index($previousElement);$.fadeToItem($fade_object,previousElementIndex,currentElementIndex)})};$.bind_pause=function($fade_object){$($fade_object.settings.pauseLink).unbind().click(function(event){event.preventDefault();if($($fade_object.container).data('current_timeout')!=null){$.stopSlideshow($fade_object)} else{var tag=$($fade_object.container).children(':first').attr('tagName').toLowerCase();var nextItem='';var previousItem='';if($fade_object.settings.type=="random"){previousItem=Math.floor(Math.random() * $fade_object.elements.length);do{nextItem=Math.floor(Math.random() * $fade_object.elements.length)} while(previousItem==nextItem)} else if($fade_object.settings.type=="random_start"){previousItem=Math.floor(Math.random() * $fade_object.elements.length);nextItem=(previousItem+1)%$fade_object.elements.length} else{previousItem=$(tag,$($fade_object.container)).index($(tag+':visible',$($fade_object.container)));nextItem=((previousItem+1)==$fade_object.elements.length)?0:previousItem+1}
$.fadeTimeout($fade_object,nextItem,previousItem,false)}})};$.bindCancel=function($fade_object){$($fade_object.settings.cancelLink).unbind().click(function(event){event.preventDefault();$.stopSlideshow($fade_object)})};$.updateIndexes=function($fade_object,toShow){$($fade_object.settings.indexContainer).children().removeClass('active');$('> :eq('+toShow+')',$($fade_object.settings.indexContainer)).addClass('active');if(typeof($fade_object.settings.callback_index_update)=="function"){$fade_object.settings.callback_index_update.call(this,toShow)}};$.createIndexHandler=function($fade_object,count,link){$(link).click(function(event){event.preventDefault();var $currentVisibleItem=$($fade_object.elements).filter(':visible');var currentItemIndex=$($fade_object.elements).index($currentVisibleItem);$.stopSlideshow($fade_object);if($currentVisibleItem.size()<=1&&count!=currentItemIndex){$.fadeToItem($fade_object,count,currentItemIndex)}})};$.createIndexes=function($fade_object){var $indexContainer=$($fade_object.settings.indexContainer);for(var i=0;i<$fade_object.elements.length;i++){var $link=$('<li><a href="#">'+(i+1)+'</a></li>');$.createIndexHandler($fade_object,i,$link);$indexContainer.append($link)}};$.linkIndexes=function($fade_object){var $indexContainer=$($fade_object.settings.indexContainer);var $indexContainerChildren=$('> :visible',$indexContainer);if($indexContainerChildren.size()==$fade_object.elements.length){var count=$fade_object.elements.length;for(var i=0;i<count;i++){$('a',$indexContainer).click(function(event){event.preventDefault()});$.createIndexHandler($fade_object,i,$indexContainerChildren[i])}} else{alert("There is a different number of items in the menu and slides. There needs to be the same number in both.\nThere are "+$indexContainerChildren.size()+" in the indexContainer.\nThere are "+$fade_object.elements.length+" in the slides container.")}};$.innerFadeIndex=function($fade_object){var $indexContainer=$($fade_object.settings.indexContainer);if($(':visible',$indexContainer).size()<=0){$.createIndexes($fade_object)} else{$.linkIndexes($fade_object)}};$.currentItem=function($fade_object,current){var $container=$($fade_object.settings.currentItemContainer);$container.text(current+1)};$.totalItems=function($fade_object){var $container=$($fade_object.settings.totalItemsContainer);$container.text($fade_object.elements.length)}})(jQuery);

/* - ++resource++collective.js.innerfade.javascripts/collective.innerfade.js - */
// http://www.new-work-enterprises.com/portal_javascripts/++resource++collective.js.innerfade.javascripts/collective.innerfade.js?original=1
jq(document).ready(function(){var options={speed:'slow',timeout:'5000',containerheight:271,animationtype:'fade',type:'sequence'}
jq('#Innerfade').innerFade(options);jq(".ifnav img").hover(
function(){id=jq(this).parent().attr('id').substr(5);jq('#Innerfade').innerFadeUnbind();jq('#Innerfade').innerFadeTo(id)})});

