
/* 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++fhv.theme.scripts/jquery-ui-core-1.5.3.js - */
// http://www.fhv.at/portal_javascripts/++resource++fhv.theme.scripts/jquery-ui-core-1.5.3.js?original=1
;(function(jq){jq.ui={plugin:{add:function(module,option,set){var proto=jq.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return}for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args)}}}},cssCache:{},css:function(name){if(jq.ui.cssCache[name]){return jq.ui.cssCache[name]}var tmp=jq('<div class="ui-gen">').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');jq.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css('cursor')) || (/^[1-9]/).test(tmp.css('height')) || (/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage')) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));try{jq('body').get(0).removeChild(tmp.get(0))}catch(e){}return jq.ui.cssCache[name]},disableSelection:function(el){jq(el).attr('unselectable','on').css('MozUserSelect','none')},enableSelection:function(el){jq(el).attr('unselectable','off').css('MozUserSelect','')},hasScroll:function(e,a){var scroll=/top/.test(a||"top")?'scrollTop':'scrollLeft',has=false;if(e[scroll]>0)return true;e[scroll]=1;has=e[scroll]>0?true:false;e[scroll]=0;return has}};var _6=jq.fn.remove;jq.fn.remove=function(){jq("*",this).add(this).triggerHandler("remove");return _6.apply(this,arguments)};function getter(namespace,plugin,method){var methods=jq[namespace][plugin].getter||[];methods=(typeof methods=="string"?methods.split(/,?\s+/):methods);return(jq.inArray(method,methods)!=-1)}jq.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];jq.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&getter(namespace,name,options)){var instance=jq.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined)}return this.each(function(){var instance=jq.data(this,name);if(isMethodCall&&instance&&jq.isFunction(instance[options])){instance[options].apply(instance,args)}else if(!isMethodCall){jq.data(this,name,new jq[namespace][name](this,options))}})};jq[namespace][name]=function(element,options){var self=this;this.widgetName=name;this.widgetBaseClass=namespace+'-'+name;this.options=jq.extend({},jq.widget.defaults,jq[namespace][name].defaults,options);this.element=jq(element).bind('setData.'+name,function(e,key,value){return self.setData(key,value)}).bind('getData.'+name,function(e,key){return self.getData(key)}).bind('remove',function(){return self.destroy()});this.init()};jq[namespace][name].prototype=jq.extend({},jq.widget.prototype,prototype)};jq.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},getData:function(key){return this.options[key]},setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled')}},enable:function(){this.setData('disabled',false)},disable:function(){this.setData('disabled',true)}};jq.widget.defaults={disabled:false};jq.ui.mouse={mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(e){return self.mouseDown(e)});if(jq.browser.msie){this._5=this.element.attr('unselectable');this.element.attr('unselectable','on')}this.started=false},mouseDestroy:function(){this.element.unbind('.'+this.widgetName);(jq.browser.msie&&this.element.attr('unselectable',this._5))},mouseDown:function(e){(this._0&&this.mouseUp(e));this._1=e;var self=this,btnIsLeft=(e.which==1),elIsCancel=(typeof this.options.cancel=="string"?jq(e.target).parents().add(e.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this.mouseCapture(e)){return true}this._2=!this.options.delay;if(!this._2){this._mouseDelayTimer=setTimeout(function(){self._2=true},this.options.delay)}if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._0=(this.mouseStart(e)!==false);if(!this._0){e.preventDefault();return true}}this._3=function(e){return self.mouseMove(e)};this._4=function(e){return self.mouseUp(e)};jq(document).bind('mousemove.'+this.widgetName,this._3).bind('mouseup.'+this.widgetName,this._4);return false},mouseMove:function(e){if(jq.browser.msie&&!e.button){return this.mouseUp(e)}if(this._0){this.mouseDrag(e);return false}if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._0=(this.mouseStart(this._1,e)!==false);(this._0?this.mouseDrag(e):this.mouseUp(e))}return!this._0},mouseUp:function(e){jq(document).unbind('mousemove.'+this.widgetName,this._3).unbind('mouseup.'+this.widgetName,this._4);if(this._0){this._0=false;this.mouseStop(e)}return false},mouseDistanceMet:function(e){return(Math.max(Math.abs(this._1.pageX-e.pageX),Math.abs(this._1.pageY-e.pageY))>=this.options.distance)},mouseDelayMet:function(e){return this._2},mouseStart:function(e){},mouseDrag:function(e){},mouseStop:function(e){},mouseCapture:function(e){return true}};jq.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);

/* - ++resource++fhv.portlets.jquery-ui-accordion-1.5.3.js - */
// http://www.fhv.at/portal_javascripts/++resource++fhv.portlets.jquery-ui-accordion-1.5.3.js?original=1
(function(jq){jq.widget("ui.accordion",{init:function(){var options=this.options;if(options.navigation){var current=this.element.find("a").filter(options.navigationFilter);if(current.length){if(current.filter(options.header).length){options.active=current}else{options.active=current.parent().parent().prev();current.addClass("current")}}}options.headers=this.element.find(options.header);options.active=findActive(options.headers,options.active);if(jq.browser.msie){this.element.find('a').css('zoom','1')}if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");options.headers.addClass("ui-accordion-header").attr("tabindex","0")}var maxHeight;if(options.fillSpace){maxHeight=this.element.parent().height();options.headers.each(function(){maxHeight-=jq(this).outerHeight()});var maxPadding=0;options.headers.next().each(function(){maxPadding=Math.max(maxPadding,jq(this).innerHeight()-jq(this).height())}).height(maxHeight-maxPadding)}else if(options.autoHeight){maxHeight=0;options.headers.next().each(function(){maxHeight=Math.max(maxHeight,jq(this).outerHeight())}).height(maxHeight)}if(options.headers.prev()){options.headers.not(options.active||"").prev().hide();options.active.parent().andSelf().addClass(options.selectedClass)}if(options.headers.next()){options.headers.not(options.active||"").next().hide();options.active.parent().andSelf().addClass(options.selectedClass)}if(options.event){this.element.bind((options.event)+".accordion",clickHandler)}},activate:function(index){clickHandler.call(this.element[0],{target:findActive(this.options.headers,index)[0]})},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","")}jq.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion")}});function scopeCallback(callback,scope){return function(){return callback.apply(scope,arguments)}};function completed(cancel){if(!jq.data(this,"accordion")){return}var instance=jq.data(this,"accordion");var options=instance.options;options.running=cancel?0:--options.running;if(options.running){return}if(options.clearStyle){options.toShow.add(options.toHide).css({height:"",overflow:""})}jq(this).triggerHandler("accordionchange",[jq.event.fix({type:'accordionchange',target:instance.element[0]}),options.data],options.change)}function toggle(toShow,toHide,data,clickedActive,down){var options=jq.data(this,"accordion").options;options.toShow=toShow;options.toHide=toHide;options.data=data;var complete=scopeCallback(completed,this);options.running=toHide.size()===0?toShow.size():toHide.size();if(options.animated){if(!options.alwaysOpen&&clickedActive){jq.ui.accordion.animations[options.animated]({toShow:jQuery([]),toHide:toHide,complete:complete,down:down,autoHeight:options.autoHeight})}else{jq.ui.accordion.animations[options.animated]({toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:options.autoHeight})}}else{if(!options.alwaysOpen&&clickedActive){toShow.toggle()}else{toHide.hide();toShow.show()}complete(true)}}function clickHandler(event){var options=jq.data(this,"accordion").options;if(options.disabled){return false}if(!event.target&&!options.alwaysOpen){options.active.parent().andSelf().toggleClass(options.selectedClass);var toHide=options.active.next(),data={options:options,newHeader:jQuery([]),oldHeader:options.active,newContent:jQuery([]),oldContent:toHide},toShow=(options.active=jq([]));toggle.call(this,toShow,toHide,data);return false}var clicked=jq(event.target);clicked=jq(clicked.parents(options.header)[0]||clicked);var clickedActive=clicked[0]==options.active[0];if(options.running||(options.alwaysOpen&&clickedActive)){return false}if(!clicked.is(options.header)){return}options.active.parent().andSelf().toggleClass(options.selectedClass);if(!clickedActive){clicked.parent().andSelf().addClass(options.selectedClass)}if(clicked.prev().length){var toShow=clicked.prev()}else{var toShow=clicked.next()}if(options.active.prev().length){var toHide=options.active.prev()}else{var toHide=options.active.next()}var data={options:options,newHeader:clicked,oldHeader:options.active,newContent:toShow,oldContent:toHide},down=options.headers.index(options.active[0])>options.headers.index(clicked[0]);options.active=clickedActive?jq([]):clicked;toggle.call(this,toShow,toHide,data,clickedActive,down);return false};function findActive(headers,selector){return selector!=undefined?typeof selector=="number"?headers.filter(":eq("+selector+")"):headers.not(headers.not(selector)):selector===false?jq([]):headers.filter(":eq(0)")}jq.extend(jq.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:'slide',event:"click",header:"a",autoHeight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(options,additions){options=jq.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return}var hideHeight=options.toHide.height(),showHeight=options.toShow.height(),difference=showHeight/hideHeight;options.toShow.css({height:0,overflow:'hidden'}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{step:function(now){var current=(hideHeight-now)* difference;if(jq.browser.msie||jq.browser.opera){current=Math.ceil(current)}options.toShow.height(current)},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","auto")}options.complete()}})},bounceslide:function(options){this.slide(options,{easing:options.down?"bounceout":"swing",duration:options.down?1000:200})},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700})}}});jq.fn.activate=function(index){return this.accordion("activate",index)}})(jQuery);

/* - ++resource++fhv.theme.scripts/jquery-ui-sortable-1.5.3.js - */
// http://www.fhv.at/portal_javascripts/++resource++fhv.theme.scripts/jquery-ui-sortable-1.5.3.js?original=1
(function(jq){jq.widget("ui.draggable",jq.extend({},jq.ui.mouse,{init:function(){var o=this.options;if(o.helper=='original'&&!(/(relative|absolute|fixed)/).test(this.element.css('position')))this.element.css('position','relative');this.element.addClass('ui-draggable');(o.disabled&&this.element.addClass('ui-draggable-disabled'));this.mouseInit()},mouseStart:function(e){var o=this.options;if(this.helper||o.disabled||jq(e.target).is('.ui-resizable-handle'))return false;var handle=!this.options.handle||!jq(this.options.handle,this.element).length?true:false;jq(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==e.target)handle=true});if(!handle)return false;if(jq.ui.ddmanager)jq.ui.ddmanager.current=this;this.helper=jq.isFunction(o.helper)?jq(o.helper.apply(this.element[0],[e])):(o.helper=='clone'?this.element.clone():this.element);if(!this.helper.parents('body').length)this.helper.appendTo((o.appendTo=='parent'?this.element[0].parentNode:o.appendTo));if(this.helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(this.helper.css("position")))this.helper.css("position","absolute");this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.offsetParent[0]==document.body&&jq.browser.mozilla)po={top:0,left:0};this.offset.parent={top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};var p=this.element.position();this.offset.relative=this.cssPosition=="relative"?{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.offsetParent[0].scrollLeft}:{top:0,left:0};this.originalPosition=this.generatePosition(e);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(o.cursorAt){if(o.cursorAt.left!=undefined)this.offset.click.left=o.cursorAt.left+this.margins.left;if(o.cursorAt.right!=undefined)this.offset.click.left=this.helperProportions.width-o.cursorAt.right+this.margins.left;if(o.cursorAt.top!=undefined)this.offset.click.top=o.cursorAt.top+this.margins.top;if(o.cursorAt.bottom!=undefined)this.offset.click.top=this.helperProportions.height-o.cursorAt.bottom+this.margins.top}if(o.containment){if(o.containment=='parent')o.containment=this.helper[0].parentNode;if(o.containment=='document'||o.containment=='window')this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,jq(o.containment=='document'?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(jq(o.containment=='document'?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];if(!(/^(document|window|parent)jq/).test(o.containment)){var ce=jq(o.containment)[0];var co=jq(o.containment).offset();this.containment=[co.left+(parseInt(jq(ce).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,co.top+(parseInt(jq(ce).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,co.left+Math.max(ce.scrollWidth,ce.offsetWidth)-(parseInt(jq(ce).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),co.top+Math.max(ce.scrollHeight,ce.offsetHeight)-(parseInt(jq(ce).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}}this.propagate("start",e);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(jq.ui.ddmanager&&!o.dropBehaviour)jq.ui.ddmanager.prepareOffsets(this,e);this.helper.addClass("ui-draggable-dragging");this.mouseDrag(e);return true},convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;return{top:(pos.top+this.offset.relative.top * mod+this.offset.parent.top * mod-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)* mod+(this.cssPosition=="fixed"?jq(document).scrollTop():0)* mod+this.margins.top * mod),left:(pos.left+this.offset.relative.left * mod+this.offset.parent.left * mod-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)* mod+(this.cssPosition=="fixed"?jq(document).scrollLeft():0)* mod+this.margins.left * mod)}},generatePosition:function(e){var o=this.options;var position={top:(e.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)-(this.cssPosition=="fixed"?jq(document).scrollTop():0)),left:(e.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)-(this.cssPosition=="fixed"?jq(document).scrollLeft():0))};if(!this.originalPosition)return position;if(this.containment){if(position.left<this.containment[0])position.left=this.containment[0];if(position.top<this.containment[1])position.top=this.containment[1];if(position.left>this.containment[2])position.left=this.containment[2];if(position.top>this.containment[3])position.top=this.containment[3]}if(o.grid){var top=this.originalPosition.top+Math.round((position.top-this.originalPosition.top)/o.grid[1])* o.grid[1];position.top=this.containment?(!(top<this.containment[1]||top>this.containment[3])?top:(!(top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPosition.left+Math.round((position.left-this.originalPosition.left)/o.grid[0])* o.grid[0];position.left=this.containment?(!(left<this.containment[0]||left>this.containment[2])?left:(!(left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left}return position},mouseDrag:function(e){this.position=this.generatePosition(e);this.positionAbs=this.convertPositionTo("absolute");this.position=this.propagate("drag",e)||this.position;if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+'px';if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+'px';if(jq.ui.ddmanager)jq.ui.ddmanager.drag(this,e);return false},mouseStop:function(e){var dropped=false;if(jq.ui.ddmanager&&!this.options.dropBehaviour)var dropped=jq.ui.ddmanager.drop(this,e);if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true){var self=this;jq(this.helper).animate(this.originalPosition,parseInt(this.options.revert,10)||500,function(){self.propagate("stop",e);self.clear()})}else{this.propagate("stop",e);this.clear()}return false},clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.options.helper!='original'&&!this.cancelHelperRemoval)this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},plugins:{},uiHash:function(e){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options}},propagate:function(n,e){jq.ui.plugin.call(this,n,[e,this.uiHash()]);if(n=="drag")this.positionAbs=this.convertPositionTo("absolute");return this.element.triggerHandler(n=="drag"?n:"drag"+n,[e,this.uiHash()],this.options[n])},destroy:function(){if(!this.element.data('draggable'))return;this.element.removeData("draggable").unbind(".draggable").removeClass('ui-draggable');this.mouseDestroy()}}));jq.extend(jq.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original"}});jq.ui.plugin.add("draggable","cursor",{start:function(e,ui){var t=jq('body');if(t.css("cursor"))ui.options._2=t.css("cursor");t.css("cursor",ui.options.cursor)},stop:function(e,ui){if(ui.options._2)jq('body').css("cursor",ui.options._2)}});jq.ui.plugin.add("draggable","zIndex",{start:function(e,ui){var t=jq(ui.helper);if(t.css("zIndex"))ui.options._1=t.css("zIndex");t.css('zIndex',ui.options.zIndex)},stop:function(e,ui){if(ui.options._1)jq(ui.helper).css('zIndex',ui.options._1)}});jq.ui.plugin.add("draggable","opacity",{start:function(e,ui){var t=jq(ui.helper);if(t.css("opacity"))ui.options._0=t.css("opacity");t.css('opacity',ui.options.opacity)},stop:function(e,ui){if(ui.options._0)jq(ui.helper).css('opacity',ui.options._0)}});jq.ui.plugin.add("draggable","iframeFix",{start:function(e,ui){jq(ui.options.iframeFix===true?"iframe":ui.options.iframeFix).each(function(){jq('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(jq(this).offset()).appendTo("body")})},stop:function(e,ui){jq("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this)})}});jq.ui.plugin.add("draggable","scroll",{start:function(e,ui){var o=ui.options;var i=jq(this).data("draggable");o.scrollSensitivity=o.scrollSensitivity||20;o.scrollSpeed=o.scrollSpeed||20;i.overflowY=function(el){do{if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-y')))return el;el=el.parent()}while(el[0].parentNode);return jq(document)}(this);i.overflowX=function(el){do{if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-x')))return el;el=el.parent()}while(el[0].parentNode);return jq(document)}(this);if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML')i.overflowYOffset=i.overflowY.offset();if(i.overflowX[0]!=document&&i.overflowX[0].tagName!='HTML')i.overflowXOffset=i.overflowX.offset()},drag:function(e,ui){var o=ui.options;var i=jq(this).data("draggable");if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML'){if((i.overflowYOffset.top+i.overflowY[0].offsetHeight)-e.pageY<o.scrollSensitivity)i.overflowY[0].scrollTop=i.overflowY[0].scrollTop+o.scrollSpeed;if(e.pageY-i.overflowYOffset.top<o.scrollSensitivity)i.overflowY[0].scrollTop=i.overflowY[0].scrollTop-o.scrollSpeed}else{if(e.pageY-jq(document).scrollTop()<o.scrollSensitivity)jq(document).scrollTop(jq(document).scrollTop()-o.scrollSpeed);if(jq(window).height()-(e.pageY-jq(document).scrollTop())<o.scrollSensitivity)jq(document).scrollTop(jq(document).scrollTop()+o.scrollSpeed)}if(i.overflowX[0]!=document&&i.overflowX[0].tagName!='HTML'){if((i.overflowXOffset.left+i.overflowX[0].offsetWidth)-e.pageX<o.scrollSensitivity)i.overflowX[0].scrollLeft=i.overflowX[0].scrollLeft+o.scrollSpeed;if(e.pageX-i.overflowXOffset.left<o.scrollSensitivity)i.overflowX[0].scrollLeft=i.overflowX[0].scrollLeft-o.scrollSpeed}else{if(e.pageX-jq(document).scrollLeft()<o.scrollSensitivity)jq(document).scrollLeft(jq(document).scrollLeft()-o.scrollSpeed);if(jq(window).width()-(e.pageX-jq(document).scrollLeft())<o.scrollSensitivity)jq(document).scrollLeft(jq(document).scrollLeft()+o.scrollSpeed)}}});jq.ui.plugin.add("draggable","snap",{start:function(e,ui){var inst=jq(this).data("draggable");inst.snapElements=[];jq(ui.options.snap===true?'.ui-draggable':ui.options.snap).each(function(){var jqt=jq(this);var jqo=jqt.offset();if(this!=inst.element[0])inst.snapElements.push({item:this,width:jqt.outerWidth(),height:jqt.outerHeight(),top:jqo.top,left:jqo.left})})},drag:function(e,ui){var inst=jq(this).data("draggable");var d=ui.options.snapTolerance||20;var x1=ui.absolutePosition.left,x2=x1+inst.helperProportions.width,y1=ui.absolutePosition.top,y2=y1+inst.helperProportions.height;for(var i=inst.snapElements.length-1;i>=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)||(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d)))continue;if(ui.options.snapMode!='inner'){var ts=Math.abs(t-y2)<=20;var bs=Math.abs(b-y1)<=20;var ls=Math.abs(l-x2)<=20;var rs=Math.abs(r-x1)<=20;if(ts)ui.position.top=inst.convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top;if(bs)ui.position.top=inst.convertPositionTo("relative",{top:b,left:0}).top;if(ls)ui.position.left=inst.convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left;if(rs)ui.position.left=inst.convertPositionTo("relative",{top:0,left:r}).left}if(ui.options.snapMode!='outer'){var ts=Math.abs(t-y1)<=20;var bs=Math.abs(b-y2)<=20;var ls=Math.abs(l-x1)<=20;var rs=Math.abs(r-x2)<=20;if(ts)ui.position.top=inst.convertPositionTo("relative",{top:t,left:0}).top;if(bs)ui.position.top=inst.convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top;if(ls)ui.position.left=inst.convertPositionTo("relative",{top:0,left:l}).left;if(rs)ui.position.left=inst.convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left}}}});jq.ui.plugin.add("draggable","connectToSortable",{start:function(e,ui){var inst=jq(this).data("draggable");inst.sortables=[];jq(ui.options.connectToSortable).each(function(){if(jq.data(this,'sortable')){var sortable=jq.data(this,'sortable');inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable.refreshItems();sortable.propagate("activate",e,inst)}})},stop:function(e,ui){var inst=jq(this).data("draggable");jq.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance.mouseStop(e);this.instance.element.triggerHandler("sortreceive",[e,jq.extend(this.instance.ui(),{sender:inst.element})],this.instance.options["receive"]);this.instance.options.helper=this.instance.options._3}else{this.instance.propagate("deactivate",e,inst)}})},drag:function(e,ui){var inst=jq(this).data("draggable"),self=this;var checkPos=function(o){var l=o.left,r=l+o.width,t=o.top,b=t+o.height;return(l<(this.positionAbs.left+this.offset.click.left)&&(this.positionAbs.left+this.offset.click.left)<r&&t<(this.positionAbs.top+this.offset.click.top)&&(this.positionAbs.top+this.offset.click.top)<b)};jq.each(inst.sortables,function(i){if(checkPos.call(inst,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=jq(self).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._3=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0]};e.target=this.instance.currentItem[0];this.instance.mouseCapture(e,true);this.instance.mouseStart(e,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst.propagate("toSortable",e)}if(this.instance.currentItem)this.instance.mouseDrag(e)}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance.mouseStop(e,true);this.instance.options.helper=this.instance.options._3;this.instance.currentItem.remove();if(this.instance.placeholder)this.instance.placeholder.remove();inst.propagate("fromSortable",e)}}})}});jq.ui.plugin.add("draggable","stack",{start:function(e,ui){var group=jq.makeArray(jq(ui.options.stack.group)).sort(function(a,b){return(parseInt(jq(a).css("zIndex"),10)||ui.options.stack.min)-(parseInt(jq(b).css("zIndex"),10)||ui.options.stack.min)});jq(group).each(function(i){this.style.zIndex=ui.options.stack.min+i});this[0].style.zIndex=ui.options.stack.min+group.length}})})(jQuery);(function(jq){
function contains(a,b){var safari2=jq.browser.safari&&jq.browser.version<522;if(a.contains&&!safari2){return a.contains(b)}if(a.compareDocumentPosition)return!!(a.compareDocumentPosition(b)&16);while(b=b.parentNode)if(b==a)return true;return false};jq.widget("ui.sortable",jq.extend({},jq.ui.mouse,{init:function(){var o=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css('float')):false;if(!(/(relative|absolute|fixed)/).test(this.element.css('position')))this.element.css('position','relative');this.offset=this.element.offset();this.mouseInit()},plugins:{},ui:function(inst){return{helper:(inst||this)["helper"],placeholder:(inst||this)["placeholder"]||jq([]),position:(inst||this)["position"],absolutePosition:(inst||this)["positionAbs"],options:this.options,element:this.element,item:(inst||this)["currentItem"],sender:inst?inst.element:null}},propagate:function(n,e,inst,noPropagation){jq.ui.plugin.call(this,n,[e,this.ui(inst)]);if(!noPropagation)this.element.triggerHandler(n=="sort"?n:"sort"+n,[e,this.ui(inst)],this.options[n])},serialize:function(o){var items=(jq.isFunction(this.options.items)?this.options.items.call(this.element):jq(this.options.items,this.element)).not('.ui-sortable-helper');var str=[];o=o||{};items.each(function(){var res=(jq(this).attr(o.attribute||'id')||'').match(o.expression||(/(.+)[-=_](.+)/));if(res)str.push((o.key||res[1])+'[]='+(o.key&&o.expression?res[1]:res[2]))});return str.join('&')},toArray:function(attr){var items=(jq.isFunction(this.options.items)?this.options.items.call(this.element):jq(this.options.items,this.element)).not('.ui-sortable-helper');var ret=[];items.each(function(){ret.push(jq(this).attr(attr||'id'))});return ret},intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height;var l=item.left,r=l+item.width,t=item.top,b=t+item.height;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance=="guess"&&this.helperProportions[this.floating?'width':'height']>item[this.floating?'width':'height'])){return(y1+this.offset.click.top>t&&y1+this.offset.click.top<b&&x1+this.offset.click.left>l&&x1+this.offset.click.left<r)}else{return(l<x1+(this.helperProportions.width/2)&&x2-(this.helperProportions.width/2)<r&&t<y1+(this.helperProportions.height/2)&&y2-(this.helperProportions.height/2)<b)}},intersectsWithEdge:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height;var l=item.left,r=l+item.width,t=item.top,b=t+item.height;if(this.options.tolerance=="pointer"||(this.options.tolerance=="guess"&&this.helperProportions[this.floating?'width':'height']>item[this.floating?'width':'height'])){if(!(y1+this.offset.click.top>t&&y1+this.offset.click.top<b&&x1+this.offset.click.left>l&&x1+this.offset.click.left<r))return false;if(this.floating){if(x1+this.offset.click.left>l&&x1+this.offset.click.left<l+item.width/2)return 2;if(x1+this.offset.click.left>l+item.width/2&&x1+this.offset.click.left<r)return 1}else{if(y1+this.offset.click.top>t&&y1+this.offset.click.top<t+item.height/2)return 2;if(y1+this.offset.click.top>t+item.height/2&&y1+this.offset.click.top<b)return 1}}else{if(!(l<x1+(this.helperProportions.width/2)&&x2-(this.helperProportions.width/2)<r&&t<y1+(this.helperProportions.height/2)&&y2-(this.helperProportions.height/2)<b))return false;if(this.floating){if(x2>l&&x1<l)return 2;if(x1<r&&x2>r)return 1}else{if(y2>t&&y1<t)return 1;if(y1<b&&y2>b)return 2}}return false},refresh:function(){this.refreshItems();this.refreshPositions()},refreshItems:function(){this.items=[];this.containers=[this];var items=this.items;var self=this;var queries=[[jq.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):jq(this.options.items,this.element),this]];if(this.options.connectWith){for(var i=this.options.connectWith.length-1;i>=0;i--){var cur=jq(this.options.connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=jq.data(cur[j],'sortable');if(inst&&!inst.options.disabled){queries.push([jq.isFunction(inst.options.items)?inst.options.items.call(inst.element):jq(inst.options.items,inst.element),inst]);this.containers.push(inst)}}}}for(var i=queries.length-1;i>=0;i--){queries[i][0].each(function(){jq.data(this,'sortable-item',queries[i][1]);items.push({item:jq(this),instance:queries[i][1],width:0,height:0,left:0,top:0})})}},refreshPositions:function(fast){if(this.offsetParent){var po=this.offsetParent.offset();this.offset.parent={top:po.top+this.offsetParentBorders.top,left:po.left+this.offsetParentBorders.left}}for(var i=this.items.length-1;i>=0;i--){if(this.items[i].instance!=this.currentContainer&&this.currentContainer&&this.items[i].item[0]!=this.currentItem[0])continue;var t=this.options.toleranceElement?jq(this.options.toleranceElement,this.items[i].item):this.items[i].item;if(!fast){this.items[i].width=t[0].offsetWidth;this.items[i].height=t[0].offsetHeight}var p=t.offset();this.items[i].left=p.left;this.items[i].top=p.top};if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var i=this.containers.length-1;i>=0;i--){var p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}}},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this.mouseDestroy();for(var i=this.items.length-1;i>=0;i--)this.items[i].item.removeData("sortable-item")},createPlaceholder:function(that){var self=that||this,o=self.options;if(o.placeholder.constructor==String){var className=o.placeholder;o.placeholder={element:function(){return jq('<div></div>').addClass(className)[0]},update:function(i,p){p.css(i.offset()).css({width:i.outerWidth(),height:i.outerHeight()})}}}self.placeholder=jq(o.placeholder.element.call(self.element,self.currentItem)).appendTo('body').css({position:'absolute'});o.placeholder.update.call(self.element,self.currentItem,self.placeholder)},contactContainers:function(e){for(var i=this.containers.length-1;i>=0;i--){if(this.intersectsWith(this.containers[i].containerCache)){if(!this.containers[i].containerCache.over){if(this.currentContainer!=this.containers[i]){var dist=10000;var itemWithLeastDistance=null;var base=this.positionAbs[this.containers[i].floating?'left':'top'];for(var j=this.items.length-1;j>=0;j--){if(!contains(this.containers[i].element[0],this.items[j].item[0]))continue;var cur=this.items[j][this.containers[i].floating?'left':'top'];if(Math.abs(cur-base)<dist){dist=Math.abs(cur-base);itemWithLeastDistance=this.items[j]}}if(!itemWithLeastDistance&&!this.options.dropOnEmpty)continue;if(this.placeholder)this.placeholder.remove();if(this.containers[i].options.placeholder){this.containers[i].createPlaceholder(this)}else{this.placeholder=null}this.currentContainer=this.containers[i];itemWithLeastDistance?this.rearrange(e,itemWithLeastDistance,null,true):this.rearrange(e,null,this.containers[i].element,true);this.propagate("change",e);this.containers[i].propagate("change",e,this)}this.containers[i].propagate("over",e,this);this.containers[i].containerCache.over=1}}else{if(this.containers[i].containerCache.over){this.containers[i].propagate("out",e,this);this.containers[i].containerCache.over=0}}}},mouseCapture:function(e,overrideHandle){if(this.options.disabled||this.options.type=='static')return false;this.refreshItems();var currentItem=null,self=this,nodes=jq(e.target).parents().each(function(){if(jq.data(this,'sortable-item')==self){currentItem=jq(this);return false}});if(jq.data(e.target,'sortable-item')==self)currentItem=jq(e.target);if(!currentItem)return false;if(this.options.handle&&!overrideHandle){var validHandle=false;jq(this.options.handle,currentItem).find("*").andSelf().each(function(){if(this==e.target)validHandle=true});if(!validHandle)return false}this.currentItem=currentItem;return true},mouseStart:function(e,overrideHandle,noActivation){var o=this.options;this.currentContainer=this;this.refreshPositions();this.helper=typeof o.helper=='function'?jq(o.helper.apply(this.element[0],[e,this.currentItem])):this.currentItem.clone();if(!this.helper.parents('body').length)jq(o.appendTo!='parent'?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(this.helper[0]);this.helper.css({position:'absolute',clear:'both'}).addClass('ui-sortable-helper');this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)};this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();this.offsetParentBorders={top:(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};this.offset.parent={top:po.top+this.offsetParentBorders.top,left:po.left+this.offsetParentBorders.left};this.originalPosition=this.generatePosition(e);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(o.placeholder)this.createPlaceholder();this.propagate("start",e);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(o.cursorAt){if(o.cursorAt.left!=undefined)this.offset.click.left=o.cursorAt.left;if(o.cursorAt.right!=undefined)this.offset.click.left=this.helperProportions.width-o.cursorAt.right;if(o.cursorAt.top!=undefined)this.offset.click.top=o.cursorAt.top;if(o.cursorAt.bottom!=undefined)this.offset.click.top=this.helperProportions.height-o.cursorAt.bottom}if(o.containment){if(o.containment=='parent')o.containment=this.helper[0].parentNode;if(o.containment=='document'||o.containment=='window')this.containment=[0-this.offset.parent.left,0-this.offset.parent.top,jq(o.containment=='document'?document:window).width()-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(jq(o.containment=='document'?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];if(!(/^(document|window|parent)jq/).test(o.containment)){var ce=jq(o.containment)[0];var co=jq(o.containment).offset();this.containment=[co.left+(parseInt(jq(ce).css("borderLeftWidth"),10)||0)-this.offset.parent.left,co.top+(parseInt(jq(ce).css("borderTopWidth"),10)||0)-this.offset.parent.top,co.left+Math.max(ce.scrollWidth,ce.offsetWidth)-(parseInt(jq(ce).css("borderLeftWidth"),10)||0)-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.currentItem.css("marginRight"),10)||0),co.top+Math.max(ce.scrollHeight,ce.offsetHeight)-(parseInt(jq(ce).css("borderTopWidth"),10)||0)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.currentItem.css("marginBottom"),10)||0)]}}if(this.options.placeholder!='clone')this.currentItem.css('visibility','hidden');if(!noActivation){for(var i=this.containers.length-1;i>=0;i--){this.containers[i].propagate("activate",e,this)}}if(jq.ui.ddmanager)jq.ui.ddmanager.current=this;if(jq.ui.ddmanager&&!o.dropBehaviour)jq.ui.ddmanager.prepareOffsets(this,e);this.dragging=true;this.mouseDrag(e);return true},convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;return{top:(pos.top+this.offset.parent.top * mod-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)* mod+this.margins.top * mod),left:(pos.left+this.offset.parent.left * mod-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)* mod+this.margins.left * mod)}},generatePosition:function(e){var o=this.options;var position={top:(e.pageY-this.offset.click.top-this.offset.parent.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)),left:(e.pageX-this.offset.click.left-this.offset.parent.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft))};if(!this.originalPosition)return position;if(this.containment){if(position.left<this.containment[0])position.left=this.containment[0];if(position.top<this.containment[1])position.top=this.containment[1];if(position.left>this.containment[2])position.left=this.containment[2];if(position.top>this.containment[3])position.top=this.containment[3]}if(o.grid){var top=this.originalPosition.top+Math.round((position.top-this.originalPosition.top)/o.grid[1])* o.grid[1];position.top=this.containment?(!(top<this.containment[1]||top>this.containment[3])?top:(!(top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPosition.left+Math.round((position.left-this.originalPosition.left)/o.grid[0])* o.grid[0];position.left=this.containment?(!(left<this.containment[0]||left>this.containment[2])?left:(!(left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left}return position},mouseDrag:function(e){this.position=this.generatePosition(e);this.positionAbs=this.convertPositionTo("absolute");jq.ui.plugin.call(this,"sort",[e,this.ui()]);this.positionAbs=this.convertPositionTo("absolute");this.helper[0].style.left=this.position.left+'px';this.helper[0].style.top=this.position.top+'px';for(var i=this.items.length-1;i>=0;i--){var intersection=this.intersectsWithEdge(this.items[i]);if(!intersection)continue;if(this.items[i].item[0]!=this.currentItem[0]&&this.currentItem[intersection==1?"next":"prev"]()[0]!=this.items[i].item[0]&&!contains(this.currentItem[0],this.items[i].item[0])&&(this.options.type=='semi-dynamic'?!contains(this.element[0],this.items[i].item[0]):true)){this.direction=intersection==1?"down":"up";this.rearrange(e,this.items[i]);this.propagate("change",e);break}}this.contactContainers(e);if(jq.ui.ddmanager)jq.ui.ddmanager.drag(this,e);this.element.triggerHandler("sort",[e,this.ui()],this.options["sort"]);return false},rearrange:function(e,i,a,hardRefresh){a?a[0].appendChild(this.currentItem[0]):i.item[0].parentNode.insertBefore(this.currentItem[0],(this.direction=='down'?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var self=this,counter=this.counter;window.setTimeout(function(){if(counter==self.counter)self.refreshPositions(!hardRefresh)},0);if(this.options.placeholder)this.options.placeholder.update.call(this.element,this.currentItem,this.placeholder)},mouseStop:function(e,noPropagation){if(jq.ui.ddmanager&&!this.options.dropBehaviour)jq.ui.ddmanager.drop(this,e);if(this.options.revert){var self=this;var cur=self.currentItem.offset();if(self.placeholder)self.placeholder.animate({opacity:'hide'},(parseInt(this.options.revert,10)||500)-50);jq(this.helper).animate({left:cur.left-this.offset.parent.left-self.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:cur.top-this.offset.parent.top-self.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){self.clear(e)})}else{this.clear(e,noPropagation)}return false},clear:function(e,noPropagation){if(this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])this.propagate("update",e,null,noPropagation);if(!contains(this.element[0],this.currentItem[0])){this.propagate("remove",e,null,noPropagation);for(var i=this.containers.length-1;i>=0;i--){if(contains(this.containers[i].element[0],this.currentItem[0])){this.containers[i].propagate("update",e,this,noPropagation);this.containers[i].propagate("receive",e,this,noPropagation)}}};for(var i=this.containers.length-1;i>=0;i--){this.containers[i].propagate("deactivate",e,this,noPropagation);if(this.containers[i].containerCache.over){this.containers[i].propagate("out",e,this);this.containers[i].containerCache.over=0}}this.dragging=false;if(this.cancelHelperRemoval){this.propagate("stop",e,null,noPropagation);return false}jq(this.currentItem).css('visibility','');if(this.placeholder)this.placeholder.remove();this.helper.remove();this.helper=null;this.propagate("stop",e,null,noPropagation);return true}}));jq.extend(jq.ui.sortable,{getter:"serialize toArray",defaults:{helper:"clone",tolerance:"guess",distance:1,delay:0,scroll:true,scrollSensitivity:20,scrollSpeed:20,cancel:":input",items:'> *',zIndex:1000,dropOnEmpty:true,appendTo:"parent"}});jq.ui.plugin.add("sortable","cursor",{start:function(e,ui){var t=jq('body');if(t.css("cursor"))ui.options._2=t.css("cursor");t.css("cursor",ui.options.cursor)},stop:function(e,ui){if(ui.options._2)jq('body').css("cursor",ui.options._2)}});jq.ui.plugin.add("sortable","zIndex",{start:function(e,ui){var t=ui.helper;if(t.css("zIndex"))ui.options._1=t.css("zIndex");t.css('zIndex',ui.options.zIndex)},stop:function(e,ui){if(ui.options._1)jq(ui.helper).css('zIndex',ui.options._1)}});jq.ui.plugin.add("sortable","opacity",{start:function(e,ui){var t=ui.helper;if(t.css("opacity"))ui.options._0=t.css("opacity");t.css('opacity',ui.options.opacity)},stop:function(e,ui){if(ui.options._0)jq(ui.helper).css('opacity',ui.options._0)}});jq.ui.plugin.add("sortable","scroll",{start:function(e,ui){var o=ui.options;var i=jq(this).data("sortable");i.overflowY=function(el){do{if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-y')))return el;el=el.parent()}while(el[0].parentNode);return jq(document)}(i.currentItem);i.overflowX=function(el){do{if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-x')))return el;el=el.parent()}while(el[0].parentNode);return jq(document)}(i.currentItem);if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML')i.overflowYOffset=i.overflowY.offset();if(i.overflowX[0]!=document&&i.overflowX[0].tagName!='HTML')i.overflowXOffset=i.overflowX.offset()},sort:function(e,ui){var o=ui.options;var i=jq(this).data("sortable");if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML'){if((i.overflowYOffset.top+i.overflowY[0].offsetHeight)-e.pageY<o.scrollSensitivity)i.overflowY[0].scrollTop=i.overflowY[0].scrollTop+o.scrollSpeed;if(e.pageY-i.overflowYOffset.top<o.scrollSensitivity)i.overflowY[0].scrollTop=i.overflowY[0].scrollTop-o.scrollSpeed}else{if(e.pageY-jq(document).scrollTop()<o.scrollSensitivity)jq(document).scrollTop(jq(document).scrollTop()-o.scrollSpeed);if(jq(window).height()-(e.pageY-jq(document).scrollTop())<o.scrollSensitivity)jq(document).scrollTop(jq(document).scrollTop()+o.scrollSpeed)}if(i.overflowX[0]!=document&&i.overflowX[0].tagName!='HTML'){if((i.overflowXOffset.left+i.overflowX[0].offsetWidth)-e.pageX<o.scrollSensitivity)i.overflowX[0].scrollLeft=i.overflowX[0].scrollLeft+o.scrollSpeed;if(e.pageX-i.overflowXOffset.left<o.scrollSensitivity)i.overflowX[0].scrollLeft=i.overflowX[0].scrollLeft-o.scrollSpeed}else{if(e.pageX-jq(document).scrollLeft()<o.scrollSensitivity)jq(document).scrollLeft(jq(document).scrollLeft()-o.scrollSpeed);if(jq(window).width()-(e.pageX-jq(document).scrollLeft())<o.scrollSensitivity)jq(document).scrollLeft(jq(document).scrollLeft()+o.scrollSpeed)}}});jq.ui.plugin.add("sortable","axis",{sort:function(e,ui){var i=jq(this).data("sortable");if(ui.options.axis=="y")i.position.left=i.originalPosition.left;if(ui.options.axis=="x")i.position.top=i.originalPosition.top}})})(jQuery);

/* - ++resource++fhv.theme.scripts/fhv_ecma.js - */
// http://www.fhv.at/portal_javascripts/++resource++fhv.theme.scripts/fhv_ecma.js?original=1
var fhv={VERSION:"0.1",AUTHOR:"Kombinat Media Gestalter GmbH"};fhv.PageFunctions={portletOpenCookie:'portletData',portletRowOne:'portal-column-one',portletRowTwo:'portal-column-two',portletContent:'portal-column-content',portletInfo:new Array(),portletColumnOne:new Array(),portletColumnTwo:new Array(),portletColumnContent:new Array(),portletInit:function(){cookieArray=new Array(this.portletRowOne,this.portletRowTwo,this.portletOpenCookie);for(i=0,l=cookieArray.length;i<l;i++){this.readCookie(cookieArray[i])}this.doSorting(this.portletColumnOne,this.portletRowOne);this.doSorting(this.portletColumnTwo,this.portletRowTwo);this.portletStates();sortableArray=new Array(this.portletRowOne,this.portletRowTwo);for(j=0,k=sortableArray.length;j<k;j++){this.initSortable(sortableArray[j])}},portletToggle:function(target){var slideButton=jq(target);var portlet=jq(slideButton.parent().parent().parent().parent());var slideTarget=jq('.portletItem',portlet);var state=slideButton.parent().attr('class');if(!state){state=''};var currentState=state.search('closed');var msec=250;if(currentState==-1){this.portletClose(slideTarget,slideButton,portlet,msec)}else{this.portletOpen(slideTarget,slideButton,portlet,msec)}},portletOpen:function(t,b,p,ms){b.parent().removeClass('closed');t.slideToggle(ms);this.removeCookieData(p)},portletClose:function(t,b,p,ms){b.parent().addClass('closed');if(ms==0){t.toggle()}else{t.slideToggle(ms)}this.addCookieData(p)},portletStates:function(){info=this.portletInfo;for(i=0,l=info.length;i<l;i++){var portlet=jq('div#'+info[i]);var slideTarget=jq('dd.portletItem',portlet);var slideButtonParent=jq('span.portletTopLeft',portlet);var slideButton=jq('a',slideButtonParent);var msec=0;this.portletClose(slideTarget,slideButton,portlet,msec)}},initSortable:function(currentColumn){jq('.visualPadding','#'+currentColumn).sortable({placeholder:'ui-sortable-placeholder',delay:50,distance:15,handle:'dt.portletHeader'});jq(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix").find('.portletHeader').addClass("ui-widget-header").end().find('.portletItem')},getSorting:function(currentColumn){if(currentColumn=='plone.leftcolumn'){currentColumn=this.portletRowOne}else{currentColumn=this.portletRowTwo}var self=this;setTimeout(function(){var elements=jq('.portlet','#'+currentColumn);var sortingIds=new Array();sortingIds=[];for(i=0,j=elements.length;i<j;i++){sortingIds[i]=jq(elements[i]).parent().attr('id')}self.writeCookie(sortingIds,currentColumn)},1)},doSorting:function(ids,currentColumn){var columnId=jq('#'+currentColumn);var placeToInsert=jq('.visualPadding',columnId);for(i=0,l=ids.length-1;l>=i;l--){portlet=jq('#'+ids[l],columnId);placeToInsert.prepend(portlet)}placeToInsert.append(jq('.managePortletsLink',columnId))},readCookie:function(whichCookie){if(!document.cookie){tempArray=new Array();tempArray[0]=''}else{portletCookie=document.cookie;tempArray=portletCookie.split(';')}check=0;var cookieData=new Array();for(var i=0,l=tempArray.length;i<l;i++){var item=tempArray[i];if(item!=''){item=item.split('=')}cookieData[i]=item};for(var i=0,l=cookieData.length;i<l;i++){if(cookieData[i][0]&&jq.trim(cookieData[i][0].toString())==whichCookie){var data=cookieData[i][1];data=unescape(data);data=data.split(',');for(var j=0,k=data.length;j<k;j++){if(data[j]==''){data.splice(j,1)}}switch(whichCookie){case this.portletRowOne:this.portletColumnOne=data;break;case this.portletRowTwo:this.portletColumnTwo=data;break;default:this.portletInfo=data;break}check++}};if(check==0){this.writeCookie(check,whichCookie)}},addCookieData:function(id){id=id.attr('id');info=this.portletInfo;cookie=this.portletOpenCookie;check=0;for(var v=0;v<info.length;v++){if(info[v]==id){check++}};if(check==0){info[info.length]=id}this.writeCookie(info,cookie)},removeCookieData:function(id){id=id.attr('id');info=this.portletInfo;cookie=this.portletOpenCookie;for(var v=0;v<info.length;v++){if(info[v]==id){info.splice(v,1)}};this.writeCookie(info,cookie)},writeCookie:function(value,name){var expires=new Date();expires.setMonth(expires.getMonth()+1);if(value!=0){value=value.join(',')}document.cookie=name+'='+escape(value)+'; expires='+expires+'; path=/'},portletHover:function(target,events){events=jq(target).attr('events');var pos=this.getEventPosition(target);this.createHover(target,this.getHoverHtml(events,pos))},getEventPosition:function(element){var __isFireFox=navigator.userAgent.match(/gecko/i);var pos=new Object();pos.x=0;pos.y=0;if(element!==null){pos.x=element.offsetLeft;pos.y=element.offsetTop;var offsetParent=element.offsetParent;var parentNode=element.parentNode;while(offsetParent!==null){pos.x+=offsetParent.offsetLeft;pos.y+=offsetParent.offsetTop;if(offsetParent!=document.body&&offsetParent!=document.documentElement){pos.x-=offsetParent.scrollLeft;pos.y-=offsetParent.scrollTop}if(__isFireFox){while(offsetParent!=parentNode&&parentNode!==null){pos.x-=parentNode.scrollLeft;pos.y-=parentNode.scrollTop;parentNode=parentNode.parentNode}}parentNode=offsetParent.parentNode;offsetParent=offsetParent.offsetParent}}return pos},createHover:function(target,overlay){var target=jq(target);jq('body').append(overlay);var node=jq('.fhvCalendarOverlay');target.bind('mouseout',function(){if(node.length){node.remove()}})},getHoverHtml:function(events,pos){var hoverHtml='';var top=pos.y-4;var left=pos.x+15;var width=jq('body').width();var bg='left -120px';if(left+175>=width){left-=194;bg='right 5px'}hoverHtml+='<span style="top:'+top+'px; left:'+left+'px;'+'background-position:'+bg+';"'+'class="fhvCalendarOverlay">'+events+'</span>';return hoverHtml},initVideoSwitch:function(){var only_ogv_support=(jq.browser.mozilla||jq.browser.opera);var t=this;jq('.fhvVideoHTML5').each(function(){var video_container=jq(this);if(only_ogv_support&&jq('.html5video',video_container).find('source[type=video/ogg]').length==0){video_container.prepend(jq('.hdvideo',video_container).clone());jq('.html5video',video_container).remove();jq('.videoClipboard',video_container).remove();jq('.videoSwitch',video_container).remove()}else{jq('.videoSwitch',video_container).bind('click',function(){if(jq(this).hasClass('HD')){t._0(jq(this),'.hdvideo','.html5video');jq(this).text('HD Video')}else{t._0(jq(this),'.html5video','.hdvideo');jq(this).text('Normal Video')}jq(this).toggleClass('HD')})}})},_0:function(node,cut,paste){video_container=jq(node.parent());clipboard=jq('.videoClipboard',video_container);paste_content=jq(paste,clipboard).clone();clipboard.empty();cut_content=jq(cut,video_container);clipboard.append(cut_content.clone());cut_content.remove();video_container.prepend(paste_content)}};jq(document).ready(function(){jq('#fhv-viewlet-topnav').superfish();jq(".portletFHVAccordion").accordion({event:"mouseover",header:"h3",autoHeight:false});fhv.PageFunctions.portletInit();fhv.PageFunctions.initVideoSwitch()});

/* - ++resource++fhv.viewlet.hoverIntent.js - */
// http://www.fhv.at/portal_javascripts/++resource++fhv.viewlet.hoverIntent.js?original=1
(function(jq){jq.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=jq.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){jq(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout( function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode}catch(e){p=this}}if(p==this){return false}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;jq(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout( function(){compare(ev,ob)},cfg.interval)}}else{jq(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout( function(){delay(ev,ob)},cfg.timeout)}}};return this.mouseover(handleHover).mouseout(handleHover)}})(jQuery);

/* - ++resource++fhv.viewlet.topnav.js - */
// http://www.fhv.at/portal_javascripts/++resource++fhv.viewlet.topnav.js?original=1
;(function(jq){jq.fn.superfish=function(op){var sf=jq.fn.superfish,c=sf.c,jqarrow=jq(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),over=function(){var jqjq=jq(this),menu=getMenu(jqjq);clearTimeout(menu.sfTimer);jqjq.showSuperfishUl().siblings().hideSuperfishUl()},out=function(){var jqjq=jq(this),menu=getMenu(jqjq),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=(jq.inArray(jqjq[0],o.jqpath)>-1);jqjq.hideSuperfishUl();if(o.jqpath.length&&jqjq.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.jqpath)}},o.delay)},getMenu=function(jqmenu){var menu=jqmenu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu},addArrow=function(jqa){jqa.addClass(c.anchorClass).append(jqarrow.clone())};return this.each(function(){var s=this.serial=sf.o.length;var o=jq.extend({},sf.defaults,op);o.jqpath=jq('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){jq(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass)});sf.o[s]=sf.op=o;jq('li:has(ul)',this)[(jq.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow(jq('>a:first-child',this))}).not('.'+c.bcClass).hideSuperfishUl();var jqa=jq('a',this);jqa.each(function(i){var jqli=jqa.eq(i).parents('li');jqa.eq(i).focus(function(){over.call(jqli)}).blur(function(){out.call(jqli)})});o.onInit.call(this)}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!(jq.browser.msie&&jq.browser.version<7))menuClasses.push(c.shadowClass);jq(this).addClass(menuClasses.join(' '))})};var sf=jq.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if(jq.browser.msie&&jq.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)this.toggleClass(sf.c.shadowClass+'-off')};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:0,delay:300,animation:{opacity:'show'},speed:'normal',autoArrows:false,dropShadows:false,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};jq.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.jqpath:'';o.retainPath=false;var jqul=jq(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call(jqul);return this},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',jqul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call(jqul);o.onBeforeShow.call(jqul);jqul.animate(o.animation,o.speed,function(){sf.IE7fix.call(jqul);o.onShow.call(jqul)});return this}})})(jQuery);

/* - easyshop.js - */
// http://www.fhv.at/portal_javascripts/easyshop.js?original=1
function easyShopZoomWindow(url,w,h){w=window.open(url,"Preview","height="+h+", width="+w+", screenX=500, screenY=150, scrollbars=yes, resizable=yes");w.focus()}
function myToggleSelect(){for(i=0;i<document.getElementsByName("paths:list").length;i++){var status=document.getElementsByName("paths:list")[i].checked;if(status==false){var new_status=true}
else{var new_status=false}
document.getElementsByName("paths:list")[i].checked=new_status}}

/* - jquery.plugins.js - */
// http://www.fhv.at/portal_javascripts/jquery.plugins.js?original=1
(function($){$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this}if(typeof options=='function')options={success:options};options=$.extend({url:this.attr('action')||window.location.toString(),type:this.attr('method')||'GET'},options||{});var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this}var a=this.formToArray(options.semantic);if(options.data){options.extraData=options.data;for(var n in options.data)a.push({name:n,value:options.data[n]})}if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this}this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this}var q=$.param(a);if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null}else options.data=q;var $form=this,callbacks=[];if(options.resetForm)callbacks.push(function(){$form.resetForm()});if(options.clearForm)callbacks.push(function(){$form.clearForm()});if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){$(options.target).html(data).each(oldSuccess,arguments)})}else if(options.success)callbacks.push(options.success);options.success=function(data,status){for(var i=0,max=callbacks.length;i<max;i++)callbacks[i](data,status,$form)};var files=$('input:file',this).fieldValue();var found=false;for(var j=0;j<files.length;j++)if(files[j])found=true;if(options.iframe||found){if($.browser.safari&&options.closeKeepAlive)$.get(options.closeKeepAlive,fileUpload);else fileUpload()}else $.ajax(options);this.trigger('form-submit-notify',[this,options]);return this;function fileUpload(){var form=$form[0];if($(':input[@name=submit]',form).length){alert('Error: Form elements must not be named "submit".');return}var opts=$.extend({},$.ajaxSettings,options);var id='jqFormIO'+(new Date().getTime());var $io=$('<iframe id="'+id+'" name="'+id+'" />');var io=$io[0];if($.browser.msie||$.browser.opera)io.src='javascript:false;document.write("");';$io.css({position:'absolute',top:'-1000px',left:'-1000px'});var xhr={responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var g=opts.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[xhr,opts]);var cbInvoked=0;var timedOut=0;var sub=form.clk;if(sub){var n=sub.name;if(n&&!sub.disabled){options.extraData=options.extraData||{};options.extraData[n]=sub.value;if(sub.type=="image"){options.extraData[name+'.x']=form.clk_x;options.extraData[name+'.y']=form.clk_y}}}setTimeout(function(){var t=$form.attr('target'),a=$form.attr('action');$form.attr({target:id,encoding:'multipart/form-data',enctype:'multipart/form-data',method:'POST',action:opts.url});if(opts.timeout)setTimeout(function(){timedOut=true;cb()},opts.timeout);var extraInputs=[];try{if(options.extraData)for(var n in options.extraData)extraInputs.push($('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />').appendTo(form)[0]);$io.appendTo('body');io.attachEvent?io.attachEvent('onload',cb):io.addEventListener('load',cb,false);form.submit()}finally{$form.attr('action',a);t?$form.attr('target',t):$form.removeAttr('target');$(extraInputs).remove()}},10);function cb(){if(cbInvoked++)return;io.detachEvent?io.detachEvent('onload',cb):io.removeEventListener('load',cb,false);var operaHack=0;var ok=true;try{if(timedOut)throw'timeout';var data,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;if(doc.body==null&&!operaHack&&$.browser.opera){operaHack=1;cbInvoked--;setTimeout(cb,100);return}xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;xhr.getResponseHeader=function(header){var headers={'content-type':opts.dataType};return headers[header]};if(opts.dataType=='json'||opts.dataType=='script'){var ta=doc.getElementsByTagName('textarea')[0];xhr.responseText=ta?ta.value:xhr.responseText}else if(opts.dataType=='xml'&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText)}data=$.httpData(xhr,opts.dataType)}catch(e){ok=false;$.handleError(opts,xhr,'error',e)}if(ok){opts.success(data,'success');if(g)$.event.trigger("ajaxSuccess",[xhr,opts])}if(g)$.event.trigger("ajaxComplete",[xhr,opts]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(opts.complete)opts.complete(xhr,ok?'success':'error');setTimeout(function(){$io.remove();xhr.responseXML=null},100)};function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s)}else doc=(new DOMParser()).parseFromString(s,'text/xml');return(doc&&doc.documentElement&&doc.documentElement.tagName!='parsererror')?doc:null}}};$.fn.ajaxForm=function(options){return this.ajaxFormUnbind().bind('submit.form-plugin',function(){$(this).ajaxSubmit(options);return false}).each(function(){$(":submit,input:image",this).bind('click.form-plugin',function(e){var $form=this.form;$form.clk=this;if(this.type=='image'){if(e.offsetX!=undefined){$form.clk_x=e.offsetX;$form.clk_y=e.offsetY}else if(typeof $.fn.offset=='function'){var offset=$(this).offset();$form.clk_x=e.pageX-offset.left;$form.clk_y=e.pageY-offset.top}else{$form.clk_x=e.pageX-this.offsetLeft;$form.clk_y=e.pageY-this.offsetTop}}setTimeout(function(){$form.clk=$form.clk_x=$form.clk_y=null},10)})})};$.fn.ajaxFormUnbind=function(){this.unbind('submit.form-plugin');return this.each(function(){$(":submit,input:image",this).unbind('click.form-plugin')})};$.fn.formToArray=function(semantic){var a=[];if(this.length==0)return a;var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els)return a;for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n)continue;if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el)a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});continue}var v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++)a.push({name:n,value:v[j]})}else if(v!==null&&typeof v!='undefined')a.push({name:n,value:v})}if(!semantic&&form.clk){var inputs=form.getElementsByTagName("input");for(var i=0,max=inputs.length;i<max;i++){var input=inputs[i];var n=input.name;if(n&&!input.disabled&&input.type=="image"&&form.clk==input)a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y})}}return a};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic))};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n)return;var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++)a.push({name:n,value:v[i]})}else if(v!==null&&typeof v!='undefined')a.push({name:this.name,value:v})});return $.param(a)};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length))continue;v.constructor==Array?$.merge(val,v):val.push(v)}return val};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof successful=='undefined')successful=true;if(successful&&(!n||el.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!el.checked||(t=='submit'||t=='image')&&el.form&&el.form.clk!=el||tag=='select'&&el.selectedIndex==-1))return null;if(tag=='select'){var index=el.selectedIndex;if(index<0)return null;var a=[],ops=el.options;var one=(t=='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=$.browser.msie&&$.browser.version<8&&!(op.attributes['value'].specified)?op.text:op.value;if(one)return v;a.push(v)}}return a}return el.value};$.fn.clearForm=function(){return this.each(function(){$('input,select,textarea',this).clearFields()})};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=='text'||t=='password'||tag=='textarea')this.value='';else if(t=='checkbox'||t=='radio')this.checked=false;else if(tag=='select')this.selectedIndex=-1})};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType))this.reset()})};$.fn.enable=function(b){if(b==undefined)b=true;return this.each(function(){this.disabled=!b})};$.fn.select=function(select){if(select==undefined)select=true;return this.each(function(){var t=this.type;if(t=='checkbox'||t=='radio')this.checked=select;else if(this.tagName.toLowerCase()=='option'){var $sel=$(this).parent('select');if(select&&$sel[0]&&$sel[0].type=='select-one'){$sel.find('option').select(false)}this.selected=select}})};function log(){if($.fn.ajaxSubmit.debug&&window.console&&window.console.log)window.console.log('[jquery.form] '+Array.prototype.join.call(arguments,''))}})(jQuery);eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4($){$.R($.7,{3:4(c,b,d){9 e=2,q;5($.O(c))d=b,b=c,c=z;$.h($.3.j,4(i,a){5(e.8==a.8&&e.g==a.g&&c==a.m&&(!b||b.$6==a.7.$6)&&(!d||d.$6==a.o.$6))l(q=a)&&v});q=q||Y $.3(2.8,2.g,c,b,d);q.u=v;$.3.s(q.F);l 2},T:4(c,b,d){9 e=2;5($.O(c))d=b,b=c,c=z;$.h($.3.j,4(i,a){5(e.8==a.8&&e.g==a.g&&(!c||c==a.m)&&(!b||b.$6==a.7.$6)&&(!d||d.$6==a.o.$6)&&!2.u)$.3.y(a.F)});l 2}});$.3=4(e,c,a,b,d){2.8=e;2.g=c||S;2.m=a;2.7=b;2.o=d;2.t=[];2.u=v;2.F=$.3.j.K(2)-1;b.$6=b.$6||$.3.I++;5(d)d.$6=d.$6||$.3.I++;l 2};$.3.p={y:4(){9 b=2;5(2.m)2.t.16(2.m,2.7);E 5(2.o)2.t.h(4(i,a){b.o.x(a)});2.t=[];2.u=Q},s:4(){5(2.u)l;9 b=2;9 c=2.t,w=$(2.8,2.g),H=w.11(c);2.t=w;5(2.m){H.10(2.m,2.7);5(c.C>0)$.h(c,4(i,a){5($.B(a,w)<0)$.Z.P(a,b.m,b.7)})}E{H.h(4(){b.7.x(2)});5(2.o&&c.C>0)$.h(c,4(i,a){5($.B(a,w)<0)b.o.x(a)})}}};$.R($.3,{I:0,j:[],k:[],A:v,D:X,N:4(){5($.3.A&&$.3.k.C){9 a=$.3.k.C;W(a--)$.3.j[$.3.k.V()].s()}},U:4(){$.3.A=v},M:4(){$.3.A=Q;$.3.s()},L:4(){$.h(G,4(i,n){5(!$.7[n])l;9 a=$.7[n];$.7[n]=4(){9 r=a.x(2,G);$.3.s();l r}})},s:4(b){5(b!=z){5($.B(b,$.3.k)<0)$.3.k.K(b)}E $.h($.3.j,4(a){5($.B(a,$.3.k)<0)$.3.k.K(a)});5($.3.D)1j($.3.D);$.3.D=1i($.3.N,1h)},y:4(b){5(b!=z)$.3.j[b].y();E $.h($.3.j,4(a){$.3.j[a].y()})}});$.3.L(\'1g\',\'1f\',\'1e\',\'1b\',\'1a\',\'19\',\'18\',\'17\',\'1c\',\'15\',\'1d\',\'P\');$(4(){$.3.M()});9 f=$.p.J;$.p.J=4(a,c){9 r=f.x(2,G);5(a&&a.8)r.g=a.g,r.8=a.8;5(14 a==\'13\')r.g=c||S,r.8=a;l r};$.p.J.p=$.p})(12);',62,82,'||this|livequery|function|if|lqguid|fn|selector|var|||||||context|each||queries|queue|return|type||fn2|prototype|||run|elements|stopped|false|els|apply|stop|undefined|running|inArray|length|timeout|else|id|arguments|nEls|guid|init|push|registerPlugin|play|checkQueue|isFunction|remove|true|extend|document|expire|pause|shift|while|null|new|event|bind|not|jQuery|string|typeof|toggleClass|unbind|addClass|removeAttr|attr|wrap|before|removeClass|empty|after|prepend|append|20|setTimeout|clearTimeout'.split('|'),0,{}))

/* - ++resource++seo_custommetatags.js - */
// http://www.fhv.at/portal_javascripts/++resource++seo_custommetatags.js?original=1
customMetaTagsFunctions=new Object()
customMetaTagsFunctions.getInputOrSelect=function(node){var inputs=node.getElementsByTagName("input");if(inputs.length>0){return inputs[0]}
var selects=node.getElementsByTagName("select");if(selects.length>0){return selects[0]}
return null}
customMetaTagsFunctions.getWidgetRows=function(currnode){tbody=this.getParentElementById(currnode,"datagridwidget-tbody");return this.getRows(tbody)}
customMetaTagsFunctions.getRows=function(tbody){var rows=new Array()
child=tbody.firstChild;while(child!=null){if(child.tagName!=null){if(child.tagName.toLowerCase()=="tr"){rows=rows.concat(child)}}
child=child.nextSibling}
return rows}
customMetaTagsFunctions.autoInsertRow=function(e){var currnode=window.event?window.event.srcElement:e.currentTarget;var tbody=this.getParentElement(currnode,"TBODY");var rows=this.getRows(tbody);var lastRow=rows[rows.length-1];var thisRow=this.getParentElementById(currnode,"datagridwidget-row");if(rows.length-1==(thisRow.rowIndex)){var newtr=this.createNewRow(lastRow);lastRow.parentNode.insertBefore(newtr,lastRow);this.updateOrderIndex(tbody)}}
customMetaTagsFunctions.addRowAfter=function(currnode){var tbody=this.getParentElementById(currnode,"datagridwidget-tbody");var thisRow=this.getParentElementById(currnode,"datagridwidget-row");var newtr=this.createNewRow(thisRow);thisRow.parentNode.insertBefore(newtr,thisRow);this.updateOrderIndex(tbody)}
customMetaTagsFunctions.addRow=function(id){var tbody=document.getElementById("datagridwidget-tbody-"+id);var rows=this.getRows(tbody);var lastRow=rows[rows.length-1];var oldRows=rows.length;var newtr=this.createNewRow(lastRow);newNode=lastRow.parentNode.insertBefore(newtr,lastRow);this.updateOrderIndex(tbody)}
customMetaTagsFunctions.createNewRow=function(tr){var tbody=this.getParentElementById(tr,"datagridwidget-tbody");var rows=this.getRows(tbody);var lastRow=rows[rows.length-1];var newtr=document.createElement("tr");newtr.setAttribute("id","datagridwidget-row");newtr.setAttribute("class","datagridwidget-row");child=lastRow.firstChild;while(child!=null){newchild=child.cloneNode(true);newtr.appendChild(newchild);child=child.nextSibling}
return newtr}
customMetaTagsFunctions.removeFieldRow=function(node){var row=this.getParentElementById(node,'datagridwidget-row');var tbody=this.getParentElementById(node,'datagridwidget-tbody');tbody.removeChild(row)}
customMetaTagsFunctions.moveRowDown=function(currnode){var tbody=this.getParentElementById(currnode,"datagridwidget-tbody");var rows=this.getWidgetRows(currnode);var row=this.getParentElementById(currnode,"datagridwidget-row");if(row==null){alert("Couldn't find DataGridWidget row");return}
var idx=null
for(var t=0;t<rows.length;t++){if(rows[t]==row){idx=t;break}}
if(idx==null)
return;if(idx+2==rows.length){var nextRow=rows.item[0]
this.shiftRow(row,nextRow)} else{var nextRow=rows[idx+1]
this.shiftRow(nextRow,row)}
this.updateOrderIndex(tbody)}
customMetaTagsFunctions.moveRowUp=function(currnode){var tbody=this.getParentElementById(currnode,"datagridwidget-tbody");var rows=this.getWidgetRows(currnode);var row=this.getParentElementById(currnode,"datagridwidget-row");if(row==null){alert("Couldn't find DataGridWidget row");return}
var idx=null
for(var t=0;t<rows.length;t++){if(rows[t]==row){idx=t;break}}
if(idx==null)
return;if(idx==0){var previousRow=rows[rows.length-1]
this.shiftRow(row,previousRow)} else{var previousRow=rows[idx-1];this.shiftRow(row,previousRow)}
this.updateOrderIndex(tbody)}
customMetaTagsFunctions.shiftRow=function(bottom,top){bottom.parentNode.insertBefore(bottom,top)}
customMetaTagsFunctions.updateOrderIndex=function(tbody){var xre=new RegExp(/^orderindex__/)
var idx=0;var cell;var rows=this.getRows(tbody);for(var i=0;i<rows.length-1;i++){for(var c=0;(cell=rows[i].getElementsByTagName('INPUT').item(c));c++){if(cell.getAttribute('id')){if(xre.exec(cell.id)){cell.value=idx}}
this.updateRadioButtonGroupName(this.getParentElement(cell,"TR"),idx);idx++}}}
customMetaTagsFunctions.updateRadioButtonGroupName=function(row,newIndex){var cell;var xre=new RegExp(/^radio/)
var xre2=new RegExp(/^checkbox/)
for(var c=0;(cell=row.getElementsByTagName('INPUT').item(c));c++){if(cell.getAttribute('type')){var type=cell.getAttribute('type');if(xre.exec(type)||xre2.exec(type)){var name=cell.getAttribute("NAME")
if(name==null) continue;var baseLabel=name.substring(0,name.lastIndexOf("."));cell.setAttribute("NAME",baseLabel+"."+newIndex)}}}}
customMetaTagsFunctions.getParentElement=function(currnode,tagname){tagname=tagname.toUpperCase();var parent=currnode.parentNode;while(parent.tagName.toUpperCase()!=tagname){parent=parent.parentNode;if(parent.tagName.toUpperCase()=="BODY")
return null}
return parent}
customMetaTagsFunctions.getParentElementById=function(currnode,id){id=id.toLowerCase();var parent=currnode.parentNode;while(true){var parentId=parent.getAttribute("id");if(parentId!=null){if(parentId.toLowerCase().substring(0,id.length)==id) break}
parent=parent.parentNode;if(parent.tagName.toUpperCase()=="BODY")
return null}
return parent}
