
/* 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++gesundesleben.theme.scripts/magnifier.js - */
// http://www.gesundesleben.at/portal_javascripts/++resource++gesundesleben.theme.scripts/magnifier.js?original=1
function image_magnifier(){jq('.contentSidebar a.image-zoom').each(function(){var element=jq(this);element.append('<span class="magnifier"></span>')})}
registerPloneFunction(image_magnifier);

/* - ++resource++gesundesleben.theme.scripts/jquery.flash.js - */
// http://www.gesundesleben.at/portal_javascripts/++resource++gesundesleben.theme.scripts/jquery.flash.js?original=1
;(function(){var $$;$$=jQuery.fn.flash=function(htmlOptions,pluginOptions,replace,update){var block=replace||$$.replace;pluginOptions=$$.copy($$.pluginOptions,pluginOptions);if(!$$.hasFlash(pluginOptions.version)){if(pluginOptions.expressInstall&&$$.hasFlash(6,0,65)){var expressInstallOptions={flashvars:{MMredirectURL:location,MMplayerType:'PlugIn',MMdoctitle:jQuery('title').text()}}}else if(pluginOptions.update){block=update||$$.update}else{return this}}htmlOptions=$$.copy($$.htmlOptions,expressInstallOptions,htmlOptions);return this.each(function(){block.call(this,$$.copy(htmlOptions))})};$$.copy=function(){var options={},flashvars={};for(var i=0;i<arguments.length;i++){var arg=arguments[i];if(arg==undefined)continue;jQuery.extend(options,arg);if(arg.flashvars==undefined)continue;jQuery.extend(flashvars,arg.flashvars)}options.flashvars=flashvars;return options};$$.hasFlash=function(){if(/hasFlash\=true/.test(location))return true;if(/hasFlash\=false/.test(location))return false;var pv=$$.hasFlash.playerVersion().match(/\d+/g);var rv=String([arguments[0],arguments[1],arguments[2]]).match(/\d+/g) || String($$.pluginOptions.version).match(/\d+/g);for(var i=0;i<3;i++){pv[i]=parseInt(pv[i]||0);rv[i]=parseInt(rv[i]||0);if(pv[i]<rv[i])return false;if(pv[i]>rv[i])return true}return true};$$.hasFlash.playerVersion=function(){try{try{var axo=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');try{axo.AllowScriptAccess='always'}catch(e){return '6,0,0'}}catch(e){}return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1]}catch(e){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1]}}catch(e){}}return '0,0,0'};$$.htmlOptions={height:240,flashvars:{},pluginspage:'http://www.adobe.com/go/getflashplayer',src:'#',type:'application/x-shockwave-flash',width:320};$$.pluginOptions={expressInstall:false,update:true,version:'6.0.65'};$$.replace=function(htmlOptions){this.innerHTML='<div class="alt">'+this.innerHTML+'</div>';jQuery(this).addClass('flash-replaced').prepend($$.transform(htmlOptions))};$$.update=function(htmlOptions){var url=String(location).split('?');url.splice(1,0,'?hasFlash=true&');url=url.join('');var msg='<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="'+url+'">Click here.</a></p>';this.innerHTML='<span class="alt">'+this.innerHTML+'</span>';jQuery(this).addClass('flash-update').prepend(msg)};function toAttributeString(){var s='';for(var key in this)if(typeof this[key]!='function')s+=key+'="'+this[key]+'" ';return s};function toFlashvarsString(){var s='';for(var key in this)if(typeof this[key]!='function')s+=key+'='+encodeURIComponent(this[key])+'&';return s.replace(/&$/,'')};$$.transform=function(htmlOptions){htmlOptions.toString=toAttributeString;if(htmlOptions.flashvars)htmlOptions.flashvars.toString=toFlashvarsString;return '<embed '+String(htmlOptions)+'/>'};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}})();

/* - ++resource++seo_custommetatags.js - */
// http://www.gesundesleben.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}
