;(function($LITH){LITHIUM.AjaxFeedback=function(feedbackSelector,hideFeedbackEvent){$LITH(document).protoObserve(hideFeedbackEvent,function(){$LITH(feedbackSelector).hide();});}})(LITHIUM.jQuery);
;(function($LITH){LITHIUM.SearchForm=function(selectSelector,buttonSelector,nodesModel,eventToRaiseOnChange){var selectElements=$LITH(selectSelector);var buttonElements=$LITH(buttonSelector);selectElements.change(function(){var currentOptionValue=selectElements.val();if(nodesModel.hasOwnProperty(currentOptionValue)){buttonElements.attr("title",nodesModel[currentOptionValue]);};selectElements.protoFire(eventToRaiseOnChange,{context:selectElements.val()});});}
LITHIUM.AdvancedSearchSemaphore=function(advancedLinkSelector,showAdvancedFormEvent,toggleAdvancedFormEvent,reopenAdvancedFormEvent){var advancedSearchLinks=$LITH(advancedLinkSelector);var visible=false;advancedSearchLinks.protoObserve("click",function(event){LITHIUM.jQuery.protoStop(event);advancedSearchLinks.toggle();visible=!visible;advancedSearchLinks.protoFire(showAdvancedFormEvent);});$LITH(document).protoObserve(toggleAdvancedFormEvent,function(event){if(!event.memo.toggleFromPriorEvent){advancedSearchLinks.toggle();visible=!visible;}});$LITH(document).protoObserve(reopenAdvancedFormEvent,function(event){if(visible){advancedSearchLinks.protoFire(showAdvancedFormEvent);}});}})(LITHIUM.jQuery);
;(function($LITH){LITHIUM.CustomEvent=function(elementSelector,triggerEvent,fireEvent,eventContext){var element=$LITH(elementSelector);element.protoObserve(triggerEvent,function(event){var customEvents=element.protoFire(fireEvent,eventContext);$LITH.each(customEvents,function(){if(this.stopped===true){LITHIUM.jQuery.protoStop(event);}});});};})(LITHIUM.jQuery);
