/* <![CDATA[ */

// JavaScript Document
// 28.05.2010 fw@m:e Sammlung aller Seitenspezifischen Javascripte




/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* Code aus Datei /scripts/styleswitcher.js */ 
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

function createCookie(name,value,days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    } else expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}

function setFontSize(font){   
    createCookie('me-font', font, 30);
    if(jQuery.browser.msie && jQuery.browser.version == "6.0"){
        location.reload();
    } else {
        jQuery('body').attr('class', font);
        jQuery('#ssologin-iframe').attr('src',jQuery('#ssologin-iframe').attr('src').replace(/(new=)[0-9]{13}/g, "new="+ new Date().getTime()));
    }
}

function setInverse(inverse){    
    createCookie('me-inverse', inverse, 30);		
    if(jQuery.browser.msie && jQuery.browser.version == "6.0"){
        location.reload();
    } else {
        jQuery('body').attr('id', inverse);
        jQuery('#ssologin-iframe').attr('src',jQuery('#ssologin-iframe').attr('src').replace(/(new=)[0-9]{13}/g, "new="+ new Date().getTime()));
    }
}





/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* Code aus Datei /libs/slimbox/js/slimbox2.js */ 
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

/*
	Slimbox v2.02 - The ultimate lightweight Lightbox clone for jQuery
	(c) 2007-2009 Christophe Beyls <http://www.digitalia.be>
	MIT-style license.
*/
(function(w){
    var E=w(window),u,g,F=-1,o,x,D,v,y,L,s,n=!window.XMLHttpRequest,e=window.opera&&(document.compatMode=="CSS1Compat")&&(w.browser.version>=9.3),m=document.documentElement,l={},t=new Image(),J=new Image(),H,a,h,q,I,d,G,c,A,K;
    w(function(){
        w("body").append(w([H=w('<div id="lbOverlay" />')[0],a=w('<div id="lbCenter" />')[0],G=w('<div id="lbBottomContainer" />')[0]]).css("display","none"));
        h=w('<div id="lbImage" />').appendTo(a).append(q=w('<div style="position: relative;" />').append([I=w('<a id="lbPrevLink" href="#" />').click(B)[0],d=w('<a id="lbNextLink" href="#" />').click(f)[0]])[0])[0];
        c=w('<div id="lbBottom" />').appendTo(G).append([w('<a id="lbCloseLink" href="#" />').add(H).click(C)[0],A=w('<div id="lbCaption" />')[0],K=w('<div id="lbNumber" />')[0],w('<div style="clear: both;" />')[0]])[0]
        });
    w.slimbox=function(O,N,M){
        u=w.extend({
            loop:false,
            overlayOpacity:0.8,
            overlayFadeDuration:400,
            resizeDuration:400,
            resizeEasing:"swing",
            initialWidth:250,
            initialHeight:250,
            imageFadeDuration:400,
            captionAnimationDuration:400,
            counterText:"Bild {x} of {y}",
            closeKeys:[27,88,67],
            previousKeys:[37,80],
            nextKeys:[39,78]
            },M);
        if(typeof O=="string"){
            O=[[O,N]];
            N=0
            }
            y=E.scrollTop()+((e?m.clientHeight:E.height())/2);
        L=u.initialWidth;
        s=u.initialHeight;
        w(a).css({
            top:Math.max(0,y-(s/2)),
            width:L,
            height:s,
            marginLeft:-L/2
            }).show();
        v=n||(H.currentStyle&&(H.currentStyle.position!="fixed"));
        if(v){
            H.style.position="absolute"
            }
            w(H).css("opacity",u.overlayOpacity).fadeIn(u.overlayFadeDuration);
        z();
        k(1);
        g=O;
        u.loop=u.loop&&(g.length>1);
        return b(N)
        };
        
    w.fn.slimbox=function(M,P,O){
        P=P||function(Q){
            return[Q.href,Q.title]
            };
            
        O=O||function(){
            return true
            };
            
        var N=this;
        return N.unbind("click").click(function(){
            var S=this,U=0,T,Q=0,R;
            T=w.grep(N,function(W,V){
                return O.call(S,W,V)
                });
            for(R=T.length;Q<R;++Q){
                if(T[Q]==S){
                    U=Q
                    }
                    T[Q]=P(T[Q],Q)
                }
                return w.slimbox(T,U,M)
            })
        };
        
    function z(){
        var N=E.scrollLeft(),M=e?m.clientWidth:E.width();
        w([a,G]).css("left",N+(M/2));
        if(v){
            w(H).css({
                left:N,
                top:E.scrollTop(),
                width:M,
                height:E.height()
                })
            }
        }
    function k(M){
    w("object").add(n?"select":"embed").each(function(O,P){
        if(M){
            w.data(P,"slimbox",P.style.visibility)
            }
            P.style.visibility=M?"hidden":w.data(P,"slimbox")
        });
    var N=M?"bind":"unbind";
    E[N]("scroll resize",z);
    w(document)[N]("keydown",p)
    }
    function p(O){
    var N=O.keyCode,M=w.inArray;
    return(M(N,u.closeKeys)>=0)?C():(M(N,u.nextKeys)>=0)?f():(M(N,u.previousKeys)>=0)?B():false
    }
    function B(){
    return b(x)
    }
    function f(){
    return b(D)
    }
    function b(M){
    if(M>=0){
        F=M;
        o=g[F][0];
        x=(F||(u.loop?g.length:0))-1;
        D=((F+1)%g.length)||(u.loop?0:-1);
        r();
        a.className="lbLoading";
        l=new Image();
        l.onload=j;
        l.src=o
        }
        return false
    }
    function j(){
    a.className="";
    w(h).css({
        backgroundImage:"url("+o+")",
        visibility:"hidden",
        display:""
    });
    w(q).width(l.width);
    w([q,I,d]).height(l.height);
    w(A).html(g[F][1]||"");
    w(K).html((((g.length>1)&&u.counterText)||"").replace(/{x}/,F+1).replace(/{y}/,g.length));
    if(x>=0){
        t.src=g[x][0]
        }
        if(D>=0){
        J.src=g[D][0]
        }
        L=h.offsetWidth;
    s=h.offsetHeight;
    var M=Math.max(0,y-(s/2));
    if(a.offsetHeight!=s){
        w(a).animate({
            height:s,
            top:M
        },u.resizeDuration,u.resizeEasing)
        }
        if(a.offsetWidth!=L){
        w(a).animate({
            width:L,
            marginLeft:-L/2
            },u.resizeDuration,u.resizeEasing)
        }
        w(a).queue(function(){
        w(G).css({
            width:L,
            top:M+s,
            marginLeft:-L/2,
            visibility:"hidden",
            display:""
        });
        w(h).css({
            display:"none",
            visibility:"",
            opacity:""
        }).fadeIn(u.imageFadeDuration,i)
        })
    }
    function i(){
    if(x>=0){
        w(I).show()
        }
        if(D>=0){
        w(d).show()
        }
        w(c).css("marginTop",-c.offsetHeight).animate({
        marginTop:0
    },u.captionAnimationDuration);
    G.style.visibility=""
    }
    function r(){
    l.onload=null;
    l.src=t.src=J.src=o;
    w([a,h,c]).stop(true);
    w([I,d,h,G]).hide()
    }
    function C(){
    if(F>=0){
        r();
        F=x=D=-1;
        w(a).hide();
        w(H).stop().fadeOut(u.overlayFadeDuration,k)
        }
        return false
    }
})(jQuery);

// AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED)
jQuery(function(jQuery) {
    jQuery("a[rel^='lightbox']").slimbox({/* Put custom options here */}, null, function(el) {
        return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
    });
});







/* ------------------------------------------------------------------------
 * Class: prettyPhoto
 * Use: Lightbox clone for jQuery
 * Author: Stephane Caron (http://www.no-margin-for-errors.com)
 * Version: 3.0.1
 * ------------------------------------------------------------------------- */

(function($){
    $.prettyPhoto={
        version:'3.0'
    };
    
    $.fn.prettyPhoto=function(pp_settings){
        pp_settings=jQuery.extend({
            animation_speed:'fast',
            slideshow:false,
            autoplay_slideshow:false,
            opacity:0.80,
            show_title:true,
            allow_resize:true,
            default_width:800,
            default_height:600,
            counter_separator_label:'/',
            theme:'facebook',
            hideflash:false,
            wmode:'opaque',
            autoplay:true,
            modal:false,
            overlay_gallery:true,
            keyboard_shortcuts:true,
            changepicturecallback:function(){},
            callback:function(){},
            markup:'<div class="pp_pic_holder"> \
      <div class="ppt">&nbsp;</div> \
      <div class="pp_top"> \
       <div class="pp_left"></div> \
       <div class="pp_middle"></div> \
       <div class="pp_right"><a href="#" class="pp_close" id="close_top_icon"><span>close</span></a></div> \
      </div> \
      <div class="pp_content_container"> \
       <div class="pp_left"> \
       <div class="pp_right"> \
        <div class="pp_content"> \
         <div class="pp_loaderIcon"></div> \
         <div class="pp_fade"> \
          <a href="#" class="pp_expand" title="Expand the image">Expand</a> \
          <div class="pp_hoverContainer"> \
           <a class="pp_next" href="#">next</a> \
           <a class="pp_previous" href="#">previous</a> \
          </div> \
          <div id="pp_full_res"></div> \
          <div class="pp_details clearfix"> \
           <p class="pp_description"></p> \
           <a class="pp_close" href="#">Close</a> \
           <div class="pp_nav"> \
            <a href="#" class="pp_arrow_previous">Previous</a> \
            <p class="currentTextHolder">0/0</p> \
            <a href="#" class="pp_arrow_next">Next</a> \
           </div> \
          </div> \
         </div> \
        </div> \
       </div> \
       </div> \
      </div> \
      <div class="pp_bottom"> \
       <div class="pp_left"></div> \
       <div class="pp_middle"></div> \
       <div class="pp_right"></div> \
      </div> \
     </div> \
     <div class="pp_overlay"></div>',
            gallery_markup:'<div class="pp_gallery"> \
        <a href="#" class="pp_arrow_previous">Previous</a> \
        <ul> \
         {gallery} \
        </ul> \
        <a href="#" class="pp_arrow_next">Next</a> \
       </div>',
            image_markup:'<img id="fullResImage" src="" />',
            flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',
            quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',
            iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',
            inline_markup:'<div class="pp_inline clearfix">{content}</div>',
            custom_markup:''
        },pp_settings);
        var matchedObjects=this,percentBased=false,correctSizes,pp_open,pp_contentHeight,pp_contentWidth,pp_containerHeight,pp_containerWidth,windowHeight=$(window).height(),windowWidth=$(window).width(),pp_slideshow;
        doresize=true,scroll_pos=_get_scroll();
        $(window).unbind('resize').resize(function(){
            _center_overlay();
            _resize_overlay();
        });
        if(pp_settings.keyboard_shortcuts){
            $(document).unbind('keydown').keydown(function(e){
                if(typeof $pp_pic_holder!='undefined'){
                    if($pp_pic_holder.is(':visible')){
                        switch(e.keyCode){
                            case 37:
                                $.prettyPhoto.changePage('previous');
                                break;
                            case 39:
                                $.prettyPhoto.changePage('next');
                                break;
                            case 27:
                                if(!settings.modal)
                                $.prettyPhoto.close();
                            break;
                        };
                        
                        return false;
                    };
                
            };
            
        });
}
$.prettyPhoto.initialize=function(){
    settings=pp_settings;
    if($.browser.msie&&parseInt($.browser.version)==6)settings.theme="light_square";
    _buildOverlay(this);
    if(settings.allow_resize)
        $(window).scroll(function(){
            _center_overlay();
        });
    _center_overlay();
    set_position=jQuery.inArray($(this).attr('href'),pp_images);
    $.prettyPhoto.open();
    return false;
}
$.prettyPhoto.open=function(event){
    if(typeof settings=="undefined"){
        settings=pp_settings;
        if($.browser.msie&&$.browser.version==6)settings.theme="light_square";
        _buildOverlay(event.target);
        pp_images=$.makeArray(arguments[0]);
        pp_titles=(arguments[1])?$.makeArray(arguments[1]):$.makeArray("");
        pp_descriptions=(arguments[2])?$.makeArray(arguments[2]):$.makeArray("");
        isSet=(pp_images.length>1)?true:false;
        set_position=0;
    }
    if($.browser.msie&&$.browser.version==6)$('select').css('visibility','hidden');
    if(settings.hideflash)$('object,embed').css('visibility','hidden');
    _checkPosition($(pp_images).size());
    $('.pp_loaderIcon').show();
    if($ppt.is(':hidden'))$ppt.css('opacity',0).show();
    $pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);
    $pp_pic_holder.find('.currentTextHolder').text((set_position+1)+settings.counter_separator_label+$(pp_images).size());
    $pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));
    (settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined")?$ppt.html(unescape(pp_titles[set_position])):$ppt.html('&nbsp;');
    movie_width=(parseFloat(grab_param('width',pp_images[set_position])))?grab_param('width',pp_images[set_position]):settings.default_width.toString();
    movie_height=(parseFloat(grab_param('height',pp_images[set_position])))?grab_param('height',pp_images[set_position]):settings.default_height.toString();
    if(movie_width.indexOf('%')!=-1||movie_height.indexOf('%')!=-1){
        movie_height=parseFloat(($(window).height()*parseFloat(movie_height)/100)-150);
        movie_width=parseFloat(($(window).width()*parseFloat(movie_width)/100)-150);
        percentBased=true;
    }else{
        percentBased=false;
    }
    $pp_pic_holder.fadeIn(function(){
        imgPreloader="";
        switch(_getFileType(pp_images[set_position])){
            case'image':
                imgPreloader=new Image();
                nextImage=new Image();
                if(isSet&&set_position>$(pp_images).size())nextImage.src=pp_images[set_position+1];
                prevImage=new Image();
                if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-1];
                $pp_pic_holder.find('#pp_full_res')[0].innerHTML=settings.image_markup;
                $pp_pic_holder.find('#fullResImage').attr('src',pp_images[set_position]);
                imgPreloader.onload=function(){
                correctSizes=_fitToViewport(imgPreloader.width,imgPreloader.height);
                _showContent();
            };
            
            imgPreloader.onerror=function(){
                alert('Image cannot be loaded. Make sure the path is correct and image exist.');
                $.prettyPhoto.close();
            };
            
            imgPreloader.src=pp_images[set_position];
            break;
            case'youtube':
                correctSizes=_fitToViewport(movie_width,movie_height);
                movie='http://www.youtube.com/v/'+grab_param('v',pp_images[set_position])+'&rel=0&fs=1&ap=%2526fmt%3D18';
                if(settings.autoplay)movie+="&autoplay=1";
                toInject=settings.flash_markup.replace(/{width}/g,correctSizes['width']).replace(/{height}/g,correctSizes['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);
                break;
            case'vimeo':
                correctSizes=_fitToViewport(movie_width,movie_height);
                movie_id=pp_images[set_position];
                var regExp=/http:\/\/(www\.)?vimeo.com\/(\d+)/;
                var match=movie_id.match(regExp);
                movie='http://player.vimeo.com/video/'+match[2]+'?title=0&amp;byline=0&amp;portrait=0';
                if(settings.autoplay)movie+="&autoplay=1;";
                vimeo_width=correctSizes['width']+'/embed/?moog_width='+correctSizes['width'];
                toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,correctSizes['height']).replace(/{path}/g,movie);
                break;
            case'quicktime':
                correctSizes=_fitToViewport(movie_width,movie_height);
                correctSizes['height']+=15;
                correctSizes['contentHeight']+=15;
                correctSizes['containerHeight']+=15;
                toInject=settings.quicktime_markup.replace(/{width}/g,correctSizes['width']).replace(/{height}/g,correctSizes['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);
                break;
            case'flash':
                correctSizes=_fitToViewport(movie_width,movie_height);
                flash_vars=pp_images[set_position];
                flash_vars=flash_vars.substring(pp_images[set_position].indexOf('flashvars')+10,pp_images[set_position].length);
                filename=pp_images[set_position];
                filename=filename.substring(0,filename.indexOf('?'));
                toInject=settings.flash_markup.replace(/{width}/g,correctSizes['width']).replace(/{height}/g,correctSizes['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);
                break;
            case'iframe':
                correctSizes=_fitToViewport(movie_width,movie_height);
                frame_url=pp_images[set_position];
                frame_url=frame_url.substr(0,frame_url.indexOf('iframe')-1);
                toInject=settings.iframe_markup.replace(/{width}/g,correctSizes['width']).replace(/{height}/g,correctSizes['height']).replace(/{path}/g,frame_url);
                break;
            case'custom':
                correctSizes=_fitToViewport(movie_width,movie_height);
                toInject=settings.custom_markup;
                break;
            case'inline':
                myClone=$(pp_images[set_position]).clone().css({
                'width':settings.default_width
                }).wrapInner('<div id="pp_full_res"><div class="pp_inline clearfix"></div></div>').appendTo($('body'));
                correctSizes=_fitToViewport($(myClone).width(),$(myClone).height());
                $(myClone).remove();
                toInject=settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());
                break;
        };
        
        if(!imgPreloader){
            $pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;
            _showContent();
        };
    
    });
return false;
};

$.prettyPhoto.changePage=function(direction){
    currentGalleryPage=0;
    if(direction=='previous'){
        set_position--;
        if(set_position<0){
            set_position=0;
            return;
        };
    
}else if(direction=='next'){
    set_position++;
    if(set_position>$(pp_images).size()-1){
        set_position=0;
    }
}else{
    set_position=direction;
};

if(!doresize)doresize=true;
$('.pp_contract').removeClass('pp_contract').addClass('pp_expand');
_hideContent(function(){
    $.prettyPhoto.open();
});
};

$.prettyPhoto.changeGalleryPage=function(direction){
    if(direction=='next'){
        currentGalleryPage++;
        if(currentGalleryPage>totalPage){
            currentGalleryPage=0;
        };
    
}else if(direction=='previous'){
    currentGalleryPage--;
    if(currentGalleryPage<0){
        currentGalleryPage=totalPage;
    };

}else{
    currentGalleryPage=direction;
};

itemsToSlide=(currentGalleryPage==totalPage)?pp_images.length-((totalPage)*itemsPerPage):itemsPerPage;
$pp_pic_holder.find('.pp_gallery li').each(function(i){
    $(this).animate({
        'left':(i*itemWidth)-((itemsToSlide*itemWidth)*currentGalleryPage)
        });
});
};

$.prettyPhoto.startSlideshow=function(){
    if(typeof pp_slideshow=='undefined'){
        $pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){
            $.prettyPhoto.stopSlideshow();
            return false;
        });
        pp_slideshow=setInterval($.prettyPhoto.startSlideshow,settings.slideshow);
    }else{
        $.prettyPhoto.changePage('next');
    };

}
$.prettyPhoto.stopSlideshow=function(){
    $pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){
        $.prettyPhoto.startSlideshow();
        return false;
    });
    clearInterval(pp_slideshow);
    pp_slideshow=undefined;
}
$.prettyPhoto.close=function(){
    clearInterval(pp_slideshow);
    $pp_pic_holder.stop().find('object,embed').css('visibility','hidden');
    $('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){
        $(this).remove();
    });
    $pp_overlay.fadeOut(settings.animation_speed,function(){
        if($.browser.msie&&$.browser.version==6)$('select').css('visibility','visible');
        if(settings.hideflash)$('object,embed').css('visibility','visible');
        $(this).remove();
        $(window).unbind('scroll');
        settings.callback();
        doresize=true;
        pp_open=false;
        delete settings;
    });
};

_showContent=function(){
    $('.pp_loaderIcon').hide();
    $ppt.fadeTo(settings.animation_speed,1);
    projectedTop=scroll_pos['scrollTop']+((windowHeight/2)-(correctSizes['containerHeight']/2));
    if(projectedTop<0)projectedTop=0;
    $pp_pic_holder.find('.pp_content').animate({
        'height':correctSizes['contentHeight']
        },settings.animation_speed);
    $pp_pic_holder.animate({
        'top':projectedTop,
        'left':(windowWidth/2)-(correctSizes['containerWidth']/2),
        'width':correctSizes['containerWidth']
        },settings.animation_speed,function(){
        $pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(correctSizes['height']).width(correctSizes['width']);
        $pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed);
        if(isSet&&_getFileType(pp_images[set_position])=="image"){
            $pp_pic_holder.find('.pp_hoverContainer').show();
        }else{
            $pp_pic_holder.find('.pp_hoverContainer').hide();
        }
        if(correctSizes['resized'])$('a.pp_expand,a.pp_contract').fadeIn(settings.animation_speed);
        if(settings.autoplay_slideshow&&!pp_slideshow&&!pp_open)$.prettyPhoto.startSlideshow();
        settings.changepicturecallback();
        pp_open=true;
    });
    _insert_gallery();
};

function _hideContent(callback){
    $pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden');
    $pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){
        $('.pp_loaderIcon').show();
        callback();
    });
};

function _checkPosition(setCount){
    if(set_position==setCount-1){
        $pp_pic_holder.find('a.pp_next').css('visibility','hidden');
        $pp_pic_holder.find('a.pp_next').addClass('disabled').unbind('click');
    }else{
        $pp_pic_holder.find('a.pp_next').css('visibility','visible');
        $pp_pic_holder.find('a.pp_next.disabled').removeClass('disabled').bind('click',function(){
            $.prettyPhoto.changePage('next');
            return false;
        });
    };
    
    if(set_position==0){
        $pp_pic_holder.find('a.pp_previous').css('visibility','hidden').addClass('disabled').unbind('click');
    }else{
        $pp_pic_holder.find('a.pp_previous.disabled').css('visibility','visible').removeClass('disabled').bind('click',function(){
            $.prettyPhoto.changePage('previous');
            return false;
        });
    };
    (setCount>1)?$('.pp_nav').show():$('.pp_nav').hide();
};

function _fitToViewport(width,height){
    resized=false;
    _getDimensions(width,height);
    imageWidth=width,imageHeight=height;
    if(((pp_containerWidth>windowWidth)||(pp_containerHeight>windowHeight))&&doresize&&settings.allow_resize&&!percentBased){
        resized=true,fitting=false;
        while(!fitting){
            if((pp_containerWidth>windowWidth)){
                imageWidth=(windowWidth-200);
                imageHeight=(height/width)*imageWidth;
            }else if((pp_containerHeight>windowHeight)){
                imageHeight=(windowHeight-200);
                imageWidth=(width/height)*imageHeight;
            }else{
                fitting=true;
            };
            
            pp_containerHeight=imageHeight,pp_containerWidth=imageWidth;
        };
        
        _getDimensions(imageWidth,imageHeight);
    };
    
    return{
        width:Math.floor(imageWidth),
        height:Math.floor(imageHeight),
        containerHeight:Math.floor(pp_containerHeight),
        containerWidth:Math.floor(pp_containerWidth)+40,
        contentHeight:Math.floor(pp_contentHeight),
        contentWidth:Math.floor(pp_contentWidth),
        resized:resized
    };

};

function _getDimensions(width,height){
    width=parseFloat(width);
    height=parseFloat(height);
    $pp_details=$pp_pic_holder.find('.pp_details');
    $pp_details.width(width);
    detailsHeight=parseFloat($pp_details.css('marginTop'))+parseFloat($pp_details.css('marginBottom'));
    $pp_details=$pp_details.clone().appendTo($('body')).css({
        'position':'absolute',
        'top':-10000
    });
    detailsHeight+=$pp_details.height();
    detailsHeight=(detailsHeight<=34)?36:detailsHeight;
    if($.browser.msie&&$.browser.version==7)detailsHeight+=8;
    $pp_details.remove();
    pp_contentHeight=height+detailsHeight;
    pp_contentWidth=width;
    pp_containerHeight=pp_contentHeight+$ppt.height()+$pp_pic_holder.find('.pp_top').height()+$pp_pic_holder.find('.pp_bottom').height();
    pp_containerWidth=width;
}
function _getFileType(itemSrc){
    if(itemSrc.match(/youtube\.com\/watch/i)){
        return'youtube';
    }else if(itemSrc.match(/vimeo\.com/i)){
        return'vimeo';
    }else if(itemSrc.indexOf('.mov')!=-1){
        return'quicktime';
    }else if(itemSrc.indexOf('.swf')!=-1){
        return'flash';
    }else if(itemSrc.indexOf('iframe')!=-1){
        return'iframe';
    }else if(itemSrc.indexOf('custom')!=-1){
        return'custom';
    }else if(itemSrc.substr(0,1)=='#'){
        return'inline';
    }else{
        return'image';
    };

};

function _center_overlay(){
    if(doresize&&typeof $pp_pic_holder!='undefined'){
        scroll_pos=_get_scroll();
        titleHeight=$ppt.height(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();
        projectedTop=(windowHeight/2)+scroll_pos['scrollTop']-(contentHeight/2);
        $pp_pic_holder.css({
            'top':projectedTop,
            'left':(windowWidth/2)+scroll_pos['scrollLeft']-(contentwidth/2)
            });
    };

};

function _get_scroll(){
    if(self.pageYOffset){
        return{
            scrollTop:self.pageYOffset,
            scrollLeft:self.pageXOffset
            };
        
}else if(document.documentElement&&document.documentElement.scrollTop){
    return{
        scrollTop:document.documentElement.scrollTop,
        scrollLeft:document.documentElement.scrollLeft
        };
    
}else if(document.body){
    return{
        scrollTop:document.body.scrollTop,
        scrollLeft:document.body.scrollLeft
        };
    
};

};

function _resize_overlay(){
    windowHeight=$(window).height(),windowWidth=$(window).width();
    if(typeof $pp_overlay!="undefined")$pp_overlay.height($(document).height());
};

function _insert_gallery(){
    if(isSet&&settings.overlay_gallery&&_getFileType(pp_images[set_position])=="image"){
        itemWidth=52+5;
        navWidth=(settings.theme=="facebook")?58:38;
        itemsPerPage=Math.floor((correctSizes['containerWidth']-100-navWidth)/itemWidth);
        itemsPerPage=(itemsPerPage<pp_images.length)?itemsPerPage:pp_images.length;
        totalPage=Math.ceil(pp_images.length/itemsPerPage)-1;
        if(totalPage==0){
            navWidth=0;
            $pp_pic_holder.find('.pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous').hide();
        }else{
            $pp_pic_holder.find('.pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous').show();
        };
        
        galleryWidth=itemsPerPage*itemWidth+navWidth;
        $pp_pic_holder.find('.pp_gallery').width(galleryWidth).css('margin-left',-(galleryWidth/2));
        $pp_pic_holder.find('.pp_gallery ul').width(itemsPerPage*itemWidth).find('li.selected').removeClass('selected');
        goToPage=(Math.floor(set_position/itemsPerPage)<=totalPage)?Math.floor(set_position/itemsPerPage):totalPage;
        if(itemsPerPage){
            $pp_pic_holder.find('.pp_gallery').hide().show().removeClass('disabled');
        }else{
            $pp_pic_holder.find('.pp_gallery').hide().addClass('disabled');
        }
        $.prettyPhoto.changeGalleryPage(goToPage);
        $pp_pic_holder.find('.pp_gallery ul li:eq('+set_position+')').addClass('selected');
    }else{
        $pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave');
        $pp_pic_holder.find('.pp_gallery').hide();
    }
}
function _buildOverlay(caller){
    theRel=$(caller).attr('rel');
    galleryRegExp=/\[(?:.*)\]/;
    isSet=(galleryRegExp.exec(theRel))?true:false;
    pp_images=(isSet)?jQuery.map(matchedObjects,function(n,i){
        if($(n).attr('rel').indexOf(theRel)!=-1)return $(n).attr('href');
    }):$.makeArray($(caller).attr('href'));
    pp_titles=(isSet)?jQuery.map(matchedObjects,function(n,i){
        if($(n).attr('rel').indexOf(theRel)!=-1)return($(n).find('img').attr('alt'))?$(n).find('img').attr('alt'):"";
    }):$.makeArray($(caller).find('img').attr('alt'));
    pp_descriptions=(isSet)?jQuery.map(matchedObjects,function(n,i){
        if($(n).attr('rel').indexOf(theRel)!=-1)return($(n).attr('title'))?$(n).attr('title'):"";
    }):$.makeArray($(caller).attr('title'));
    $('body').append(settings.markup);
    $pp_pic_holder=$('.pp_pic_holder'),$ppt=$('.ppt'),$pp_overlay=$('div.pp_overlay');
    if(isSet&&settings.overlay_gallery){
        currentGalleryPage=0;
        toInject="";
        for(var i=0;i<pp_images.length;i++){
            var regex=new RegExp("(.*?)\.(jpg|jpeg|png|gif)$");
            var results=regex.exec(pp_images[i]);
            if(!results){
                classname='default';
            }else{
                classname='';
            }
            toInject+="<li class='"+classname+"'><a href='#'><img src='"+pp_images[i]+"' width='50' alt='' /></a></li>";
        };
        
        toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);
        $pp_pic_holder.find('#pp_full_res').after(toInject);
        $pp_pic_holder.find('.pp_gallery .pp_arrow_next').click(function(){
            $.prettyPhoto.changeGalleryPage('next');
            $.prettyPhoto.stopSlideshow();
            return false;
        });
        $pp_pic_holder.find('.pp_gallery .pp_arrow_previous').click(function(){
            $.prettyPhoto.changeGalleryPage('previous');
            $.prettyPhoto.stopSlideshow();
            return false;
        });
        $pp_pic_holder.find('.pp_content').hover(function(){
            $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();
        },function(){
            $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();
        });
        itemWidth=52+5;
        $pp_pic_holder.find('.pp_gallery ul li').each(function(i){
            $(this).css({
                'position':'absolute',
                'left':i*itemWidth
                });
            $(this).find('a').unbind('click').click(function(){
                $.prettyPhoto.changePage(i);
                $.prettyPhoto.stopSlideshow();
                return false;
            });
        });
    };
    
    if(settings.slideshow){
        $pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>')
        $pp_pic_holder.find('.pp_nav .pp_play').click(function(){
            $.prettyPhoto.startSlideshow();
            return false;
        });
    }
    $pp_pic_holder.attr('class','pp_pic_holder '+settings.theme);
    $pp_overlay.css({
        'opacity':0,
        'height':$(document).height(),
        'width':$(document).width()
        }).bind('click',function(){
        if(!settings.modal)$.prettyPhoto.close();
    });
    $('a.pp_close').bind('click',function(){
        $.prettyPhoto.close();
        return false;
    });
    $('a.pp_expand').bind('click',function(e){
        if($(this).hasClass('pp_expand')){
            $(this).removeClass('pp_expand').addClass('pp_contract');
            doresize=false;
        }else{
            $(this).removeClass('pp_contract').addClass('pp_expand');
            doresize=true;
        };
        
        _hideContent(function(){
            $.prettyPhoto.open();
        });
        return false;
    });
    $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){
        $.prettyPhoto.changePage('previous');
        $.prettyPhoto.stopSlideshow();
        return false;
    });
    $pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){
        $.prettyPhoto.changePage('next');
        $.prettyPhoto.stopSlideshow();
        return false;
    });
    _center_overlay();
};

return this.unbind('click').click($.prettyPhoto.initialize);
};

function grab_param(name,url){
    name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
    var regexS="[\\?&]"+name+"=([^&#]*)";
    var regex=new RegExp(regexS);
    var results=regex.exec(url);
    return(results==null)?"":results[1];
}
})(jQuery);


/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* Prety Foto Aktivieren */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */


$(document).ready(function(){
    $("a[rel^='prettyPhoto']").prettyPhoto({
        theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
        slideshow: 5000 ,/* false OR interval time in ms */
        keyboard_shortcuts: true,
        overlay_gallery: false
    });
        
    // AutoOpen Video
    var openVideo = getUrlVars()["openVideo"];
    if(openVideo !== 'undefined'){
        $('.tx-mevideocenter-pi1 .me-video-film a').prettyPhoto({
            theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
            slideshow: 5000 ,/* false OR interval time in ms */
            keyboard_shortcuts: true,
            overlay_gallery: false
        });
    }
        
});

function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}





/**
 * Flash (http://jquery.lukelutman.com/plugins/flash)
 * A jQuery plugin for embedding Flash movies.
 * 
 * Version 1.0
 * November 9th, 2006
 *
 * Copyright (c) 2006 Luke Lutman (http://www.lukelutman.com)
 * Dual licensed under the MIT and GPL licenses.
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.opensource.org/licenses/gpl-license.php
 * 
 * Inspired by:
 * SWFObject (http://blog.deconcept.com/swfobject/)
 * UFO (http://www.bobbyvandersluis.com/ufo/)
 * sIFR (http://www.mikeindustries.com/sifr/)
 * 
 * IMPORTANT: 
 * The packed version of jQuery breaks ActiveX control
 * activation in Internet Explorer. Use JSMin to minifiy
 * jQuery (see: http://jquery.lukelutman.com/plugins/flash#activex).
 *
 **/ 
;
(function(){
	
    var $$;

    /**
 * 
 * @desc Replace matching elements with a flash movie.
 * @author Luke Lutman
 * @version 1.0.1
 *
 * @name flash
 * @param Hash htmlOptions Options for the embed/object tag.
 * @param Hash pluginOptions Options for detecting/updating the Flash plugin (optional).
 * @param Function replace Custom block called for each matched element if flash is installed (optional).
 * @param Function update Custom block called for each matched if flash isn't installed (optional).
 * @type jQuery
 *
 * @cat plugins/flash
 * 
 * @example $('#hello').flash({ src: 'hello.swf' });
 * @desc Embed a Flash movie.
 *
 * @example $('#hello').flash({ src: 'hello.swf' }, { version: 8 });
 * @desc Embed a Flash 8 movie.
 *
 * @example $('#hello').flash({ src: 'hello.swf' }, { expressInstall: true });
 * @desc Embed a Flash movie using Express Install if flash isn't installed.
 *
 * @example $('#hello').flash({ src: 'hello.swf' }, { update: false });
 * @desc Embed a Flash movie, don't show an update message if Flash isn't installed.
 *
**/
    $$ = jQuery.fn.flash = function(htmlOptions, pluginOptions, replace, update) {
	
        // Set the default block.
        var block = replace || $$.replace;
	
        // Merge the default and passed plugin options.
        pluginOptions = $$.copy($$.pluginOptions, pluginOptions);
	
        // Detect Flash.
        if(!$$.hasFlash(pluginOptions.version)) {
            // Use Express Install (if specified and Flash plugin 6,0,65 or higher is installed).
            if(pluginOptions.expressInstall && $$.hasFlash(6,0,65)) {
                // Add the necessary flashvars (merged later).
                var expressInstallOptions = {
                    flashvars: {  	
                        MMredirectURL: location,
                        MMplayerType: 'PlugIn',
                        MMdoctitle: jQuery('title').text() 
                    }					
                };
            // Ask the user to update (if specified).
            } else if (pluginOptions.update) {
                // Change the block to insert the update message instead of the flash movie.
                block = update || $$.update;
            // Fail
            } else {
                // The required version of flash isn't installed.
                // Express Install is turned off, or flash 6,0,65 isn't installed.
                // Update is turned off.
                // Return without doing anything.
                return this;
            }
        }
	
        // Merge the default, express install and passed html options.
        htmlOptions = $$.copy($$.htmlOptions, expressInstallOptions, htmlOptions);
	
        // Invoke $block (with a copy of the merged html options) for each element.
        return this.each(function(){
            block.call(this, $$.copy(htmlOptions));
        });
	
    };
    /**
 *
 * @name flash.copy
 * @desc Copy an arbitrary number of objects into a new object.
 * @type Object
 * 
 * @example $$.copy({ foo: 1 }, { bar: 2 });
 * @result { foo: 1, bar: 2 };
 *
**/
    $$.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);
            // don't clobber one flash vars object with another
            // merge them instead
            if(arg.flashvars == undefined) continue;
            jQuery.extend(flashvars, arg.flashvars);
        }
        options.flashvars = flashvars;
        return options;
    };
    /*
 * @name flash.hasFlash
 * @desc Check if a specific version of the Flash plugin is installed
 * @type Boolean
 *
**/
    $$.hasFlash = function() {
        // look for a flag in the query string to bypass flash detection
        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);
            // player is less than required
            if(pv[i] < rv[i]) return false;
            // player is greater than required
            if(pv[i] > rv[i]) return true;
        }
        // major version, minor version and revision match exactly
        return true;
    };
    /**
 *
 * @name flash.hasFlash.playerVersion
 * @desc Get the version of the installed Flash plugin.
 * @type String
 *
**/
    $$.hasFlash.playerVersion = function() {
        // ie
        try {
            try {
                // avoid fp6 minor version lookup issues
                // see: http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
                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];
        // other browsers
        } 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';
    };
    /**
 *
 * @name flash.htmlOptions
 * @desc The default set of options for the object or embed tag.
 *
**/
    $$.htmlOptions = {
        height: 240,
        flashvars: {},
        pluginspage: 'http://www.adobe.com/go/getflashplayer',
        src: '#',
        type: 'application/x-shockwave-flash',
        width: 320		
    };
    /**
 *
 * @name flash.pluginOptions
 * @desc The default set of options for checking/updating the flash Plugin.
 *
**/
    $$.pluginOptions = {
        expressInstall: false,
        update: true,
        version: '6.0.65'
    };
    /**
 *
 * @name flash.replace
 * @desc The default method for replacing an element with a Flash movie.
 *
**/
    $$.replace = function(htmlOptions) {
        this.innerHTML = '<div class="alt">'+this.innerHTML+'</div>';
        /* FW alternative bei Flasherkennung nich ausgeben */
        this.innerHTML = '';
        jQuery(this)
        .addClass('flash-replaced')
        .prepend($$.transform(htmlOptions));
    };
    /**
 *
 * @name flash.update
 * @desc The default method for replacing an element with an update message.
 *
**/
    $$.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);
    };
    /**
 *
 * @desc Convert a hash of html options to a string of attributes, using Function.apply(). 
 * @example toAttributeString.apply(htmlOptions)
 * @result foo="bar" foo="bar"
 *
**/
    function toAttributeString() {
        var s = '';
        for(var key in this)
            if(typeof this[key] != 'function')
                s += key+'="'+this[key]+'" ';
        return s;		
    };
    /**
 *
 * @desc Convert a hash of flashvars to a url-encoded string, using Function.apply(). 
 * @example toFlashvarsString.apply(flashvarsObject)
 * @result foo=bar&foo=bar
 *
**/
    function toFlashvarsString() {
        var s = '';
        for(var key in this)
            if(typeof this[key] != 'function')
                s += key+'='+encodeURIComponent(this[key])+'&';
        return s.replace(/&$/, '');		
    };
    /**
 *
 * @name flash.transform
 * @desc Transform a set of html options into an embed tag.
 * @type String 
 *
 * @example $$.transform(htmlOptions)
 * @result <embed src="foo.swf" ... />
 *
 * Note: The embed tag is NOT standards-compliant, but it 
 * works in all current browsers. flash.transform can be
 * overwritten with a custom function to generate more 
 * standards-compliant markup.
 *
**/
    $$.transform = function(htmlOptions) {
        htmlOptions.toString = toAttributeString;
        if(htmlOptions.flashvars) htmlOptions.flashvars.toString = toFlashvarsString;
        return '<embed ' + String(htmlOptions) + '/>';		
    };

    /**
 *
 * Flash Player 9 Fix (http://blog.deconcept.com/2006/07/28/swfobject-143-released/)
 *
**/
    if (window.attachEvent) {
        window.attachEvent("onbeforeunload", function(){
            __flash_unloadHandler = function() {};
            __flash_savedUnloadHandler = function() {};
        });
    }
	
})();


/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* Code aus Datei typo3conf/ext/pmkisac/res/jquery/autocomplete.js */ 
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

/*
*  Ajax Autocomplete for jQuery, version 1.0.7
*  (c) 2009 Tomas Kirda
*
*  Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
*  For details, see the web site: http://www.devbridge.com/projects/autocomplete/jquery/
*
*  Last Review: 07/01/2009
*/

(function(jQuery) {

    jQuery.fn.autocomplete = function(options) {
        return this.each(function() {
            return new Autocomplete(this, options);
        });
    };

    var reEscape = new RegExp('(\\' + ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\'].join('|\\') + ')', 'g');

    var fnFormatResult = function(value, data, currentValue) {
        var pattern = '(' + currentValue.replace(reEscape, '\\$1') + ')';
        return value.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>');
    };

    var Autocomplete = function(el, options) {
        this.el = jQuery(el);
        this.el.attr('autocomplete', 'off');
        this.suggestions = [];
        this.data = [];
        this.badQueries = [];
        this.selectedIndex = -1;
        this.currentValue = this.el.val();
        this.intervalId = 0;
        this.cachedResponse = [];
        this.onChangeInterval = null;
        this.ignoreValueChange = false;
        this.serviceUrl = options.serviceUrl;
        this.isLocal = false;
        this.options = {
            autoSubmit: false,
            minChars: 1,
            maxHeight: 300,
            deferRequestBy: 0,
            width: 0,
            highlight: true,
            params: {},
            fnFormatResult: fnFormatResult,
            delimiter: null
        };
        if (options) {
            jQuery.extend(this.options, options);
        }
        if(this.options.lookup){
            this.isLocal = true;
            if(jQuery.isArray(this.options.lookup)){
                this.options.lookup = {
                    suggestions:this.options.lookup, 
                    data:[]
                };            
        }
    }
    this.initialize();
};

Autocomplete.prototype = {

    killerFn: null,

    initialize: function() {

        var me, zindex;
        me = this;

        zindex = Math.max.apply(null, jQuery.map(jQuery('body > *'), function(e, n) {
            var pos = jQuery(e).css('position');
            if (pos === 'absolute' || pos === 'relative') {
                return parseInt(jQuery(e).css('z-index'), 10) || 1;
            }
        }));

    this.killerFn = function(e) {
        if (jQuery(e.target).parents('.autocomplete').size() === 0) {
            me.killSuggestions();
            me.disableKillerFn();
        }
    };

    var uid = new Date().getTime();
    var autocompleteElId = 'Autocomplete_' + uid;

    if (!this.options.width) {
        this.options.width = this.el.width();
    }
    this.mainContainerId = 'AutocompleteContainter_' + uid;

    jQuery('<div id="' + this.mainContainerId + '" style="position:absolute;z-index:' + zindex + '"><div class="autocomplete-w1"><div class="autocomplete" id="' + autocompleteElId + '" style="display:none; width:' + this.options.width + 'px;"></div></div></div>').appendTo('body');

    this.container = jQuery('#' + autocompleteElId);
    this.fixPosition();
    if (window.opera) {
        this.el.keypress(function(e) {
            me.onKeyPress(e);
        });
    } else {
        this.el.keydown(function(e) {
            me.onKeyPress(e);
        });
    }
    this.el.keyup(function(e) {
        me.onKeyUp(e);
    });
    this.el.blur(function() {
        me.enableKillerFn();
    });
    this.el.focus(function() {
        me.fixPosition();
    });

    this.container.css({
        maxHeight: this.options.maxHeight + 'px'
    });
},

fixPosition: function() {
    var offset = this.el.offset();
    jQuery('#' + this.mainContainerId).css({
        top: (offset.top + this.el.innerHeight()) + 'px', 
        left: offset.left + 'px'
    });
},

enableKillerFn: function() {
    var me = this;
    jQuery(document).bind('click', me.killerFn);
},

disableKillerFn: function() {
    var me = this;
    jQuery(document).unbind('click', me.killerFn);
},

killSuggestions: function() {
    var me = this;
    this.stopKillSuggestions();
    this.intervalId = window.setInterval(function() {
        me.hide();
        me.stopKillSuggestions();
    }, 300);
},

stopKillSuggestions: function() {
    window.clearInterval(this.intervalId);
},

onKeyPress: function(e) {

    if (!this.enabled) {
        return;
    }
    // return will exit the function
    // and event will not fire
    switch (e.keyCode) {
        case 27: //Event.KEY_ESC:
            this.el.val(this.currentValue);
            this.hide();
            break;
        case 9: //Event.KEY_TAB:
        case 13: //Event.KEY_RETURN:
            if (this.selectedIndex === -1) {
                this.hide();
                return;
            }
            this.select(this.selectedIndex);
            if (e.keyCode === 9/* Event.KEY_TAB */) {
                return;
            }
            break;
        case 38: //Event.KEY_UP:
            this.moveUp();
            break;
        case 40: //Event.KEY_DOWN:
            this.moveDown();
            break;
        default:
            return;
    }
    e.stopImmediatePropagation();
    e.preventDefault();
},

onKeyUp: function(e) {
    switch (e.keyCode) {
        case 38: //Event.KEY_UP:
        case 40: //Event.KEY_DOWN:
            return;
    }
    clearInterval(this.onChangeInterval);
    if (this.currentValue !== this.el.val()) {
        if (this.options.deferRequestBy > 0) {
            // Defer lookup in case when value changes very quickly:
            var me = this;
            this.onChangeInterval = setInterval(function() {
                me.onValueChange();
            }, this.options.deferRequestBy);
        } else {
            this.onValueChange();
        }
    }
},

onValueChange: function() {
    clearInterval(this.onChangeInterval);
    this.currentValue = this.el.val();
    var q = this.getQuery(this.currentValue);
    this.selectedIndex = -1;
    if (this.ignoreValueChange) {
        this.ignoreValueChange = false;
        return;
    }
    if (q === '' || q.length < this.options.minChars) {
        this.hide();
    } else {
        this.getSuggestions(q);
    }
},

getQuery: function(val) {
    var d, arr;
    d = this.options.delimiter;
    if (!d) {
        return jQuery.trim(val);
    }
    arr = val.split(d);
    return jQuery.trim(arr[arr.length - 1]);
},

getSuggestionsLocal: function(q) {
    var ret, arr, len, val;
    arr = this.options.lookup;
    len = arr.suggestions.length;
    ret = {
        suggestions:[], 
        data:[]
    };
    for(var i=0; i< len; i++){
        val = arr.suggestions[i];
        if(val.toLowerCase().indexOf(q.toLowerCase()) === 0){
            ret.suggestions.push(val);
            ret.data.push(arr.data[i]);
        }
    }
    return ret;
},
    
getSuggestions: function(q) {
    var cr, me, ls;
    cr = this.isLocal ? this.getSuggestionsLocal(q) : this.cachedResponse[q];
    if (cr && jQuery.isArray(cr.suggestions)) {
        this.suggestions = cr.suggestions;
        this.data = cr.data;
        this.suggest();
    } else if (!this.isBadQuery(q)) {
        me = this;
        me.options.params.query = q;
        jQuery.get(this.serviceUrl, me.options.params, function(txt) {
            me.processResponse(txt);
        }, 'text');
    }
},

isBadQuery: function(q) {
    var i = this.badQueries.length;
    while (i--) {
        if (q.indexOf(this.badQueries[i]) === 0) {
            return true;
        }
    }
    return false;
},

hide: function() {
    this.enabled = false;
    this.selectedIndex = -1;
    this.container.hide();
},

suggest: function() {
    if (this.suggestions.length === 0) {
        this.hide();
        return;
    }

    var me, len, div, f;
    me = this;
    len = this.suggestions.length;
    f = this.options.fnFormatResult;
    v = this.getQuery(this.currentValue);
    this.container.hide().empty();
    for (var i = 0; i < len; i++) {
        div = jQuery((me.selectedIndex === i ? '<div class="selected"' : '<div') + ' title="' + this.suggestions[i] + '">' + f(this.suggestions[i], this.data[i], v) + '</div>');
        div.mouseover((function(xi) {
            return function() {
                me.activate(xi);
            };        
        })(i));
    div.click((function(xi) {
        return function() {
            me.select(xi);
        };    
    })(i));
    //console.log(div);
    this.container.append(div);
}
this.enabled = true;
this.container.show();
},

processResponse: function(text) {
    var response;
    try {
        response = eval('(' + text + ')');
    } catch (err) {
        return;
    }
    if (!jQuery.isArray(response.data)) {
        response.data = [];
    }
    this.cachedResponse[response.query] = response;
    if (response.suggestions.length === 0) {
        this.badQueries.push(response.query);
    }
    if (response.query === this.getQuery(this.currentValue)) {
        this.suggestions = response.suggestions;
        this.data = response.data;
        this.suggest(); 
    }
},

activate: function(index) {
    var divs = this.container.children();
    var activeItem;
    // Clear previous selection:
    if (this.selectedIndex !== -1 && divs.length > this.selectedIndex) {
        jQuery(divs.get(this.selectedIndex)).attr('class', '');
    }
    this.selectedIndex = index;
    if (this.selectedIndex !== -1 && divs.length > this.selectedIndex) {
        activeItem = divs.get(this.selectedIndex);
        jQuery(activeItem).attr('class', 'selected');
    }
    return activeItem;
},

deactivate: function(div, index) {
    div.className = '';
    if (this.selectedIndex === index) {
        this.selectedIndex = -1;
    }
},

select: function(i) {
    var selectedValue = this.suggestions[i];
    if (selectedValue) {
        this.el.val(selectedValue);
        if (this.options.autoSubmit) {
            var f = this.el.parents('form');
            if (f.length > 0) {
                f.get(0).submit();
            }
        }
        this.ignoreValueChange = true;
        this.hide();
        this.onSelect(i);
    }
},

moveUp: function() {
    if (this.selectedIndex === -1) {
        return;
    }
    if (this.selectedIndex === 0) {
        this.container.children().get(0).className = '';
        this.selectedIndex = -1;
        this.el.val(this.currentValue);
        return;
    }
    this.adjustScroll(this.selectedIndex - 1);
},

moveDown: function() {
    if (this.selectedIndex === (this.suggestions.length - 1)) {
        return;
    }
    this.adjustScroll(this.selectedIndex + 1);
},

adjustScroll: function(i) {
    var activeItem, offsetTop, upperBound, lowerBound;
    activeItem = this.activate(i);
    offsetTop = activeItem.offsetTop;
    upperBound = this.container.scrollTop();
    lowerBound = upperBound + this.options.maxHeight - 25;
    if (offsetTop < upperBound) {
        this.container.scrollTop(offsetTop);
    } else if (offsetTop > lowerBound) {
        this.container.scrollTop(offsetTop - this.options.maxHeight + 25);
    }
//this.el.val(this.suggestions[i]);
},

onSelect: function(i) {
    var me, onSelect, getValue, s, d;
    me = this;
    onSelect = me.options.onSelect;
    getValue = function(value) {
        var del, currVal;
        del = me.options.delimiter;
        currVal = me.currentValue;
        if (!del) {
            return value;
        }
        var arr = currVal.split(del);
        if (arr.length === 1) {
            return value;
        }
        return currVal.substr(0, currVal.length - arr[arr.length - 1].length) + value;
    };
    s = me.suggestions[i];
    d = me.data[i];
    me.el.val(getValue(s));
    if (jQuery.isFunction(onSelect)) {
        onSelect(s, d);
    }
}

};

})(jQuery);




/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* Statische Version des Autokomplete Code aus Datei scripts/pmkisac_autocomplete_static.js */ 
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

jQuery(document).ready(function() {
    var el = jQuery("tx-indexedsearch-searchbox-sword");
    if (el) {
        var form = el;
        for (var i=0;i<20;i++) {
            form = form.parent();
            if (form.nodeName=="FORM") break;
        }
        var sectionpid = 0;
        var section = jQuery("tx-indexedsearch-selectbox-sectionsxx");
        if (section) {
            sectionpid = section.value;
        }
        var languageid = 0;
        var language = jQuery("tx-indexedsearch-selectbox-langxx");
        if (language) {
            languageid = language.value;
        }
        var mediaid = -1;
        var media = jQuery("tx-indexedsearch-selectbox-media");
        if (media) {
            mediaid = media.value;
        }
        jQuery("#tx-indexedsearch-searchbox-sword").autocomplete({ 
            serviceUrl:"index.php?eID=pmkisac&id=17&sp="+sectionpid+"&la="+languageid+"&me="+mediaid+"&sw=1&ml=3&mc=20&wc=1",
            minChars:3, 
            maxHeight:400,
            autoSubmit: 0,
            spinner: 1,
            width:180,
            delimiter: " ",
            // callback function:
            onSelect: function(value, data){
            //alert("You selected: " + value + ", " + data);
            }
        });
    }
});









// JavaScript Document
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* Code aus Datei jqueryui/custom/jqueryuitabs-me.js */ 
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};
jQuery.fn.extend(jQuery.ui.tabs.prototype,{
    _tabify: function(init){
        this.list = this.element.children('ul:first');
        this.lis = jQuery('li:has(a[href])', this.list);
        this.anchors = this.lis.map(function() {
            return jQuery('a', this)[0];
        });
        this.panels = jQuery([]);

        var self = this, o = this.options;

        var fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash
        this.anchors.each(function(i, a) {
            var href = jQuery(a).attr('href');

            // For dynamically created HTML that contains a hash as href IE < 8 expands
            // such href to the full page url with hash and then misinterprets tab as ajax.
            // Same consideration applies for an added tab with a fragment identifier
            // since a[href=#fragment-identifier] does unexpectedly not match.
            // Thus normalize href attribute...
            var hrefBase = href.split('#')[0], baseEl;
            if (hrefBase && (hrefBase === location.toString().split('#')[0] ||
                (baseEl = jQuery('base')[0]) && hrefBase === baseEl.href)) {
                href = a.hash;
                a.href = href;
            }

            href = '#'+href.split('#')[1];
            //console.log(href);
            // inline tab
            //if (fragmentId.test(href)) {
            self.panels = self.panels.add(self._sanitizeSelector(href));
        //}

        // remote tab
        /*else if (href != '#') { // prevent loading the page itself if href is just "#"
					jQuery.data(a, 'href.tabs', href); // required for restore on destroy

					// TODO until #3808 is fixed strip fragment identifier from url
					// (IE fails to load from such url)
					jQuery.data(a, 'load.tabs', href.replace(/#.*$/, '')); // mutable data

					var id = self._tabId(a);
					a.href = '#' + id;
					var panel = jQuery('#' + id);
					if (!panel.length) {
						panel = jQuery(o.panelTemplate).attr('id', id).addClass('ui-tabs-panel ui-widget-content ui-corner-bottom')
							.insertAfter(self.panels[i - 1] || self.list);
						panel.data('destroy.tabs', true);
					}
					self.panels = self.panels.add(panel);
				}*/

        // invalid tab href
        /*else {
					o.disabled.push(i);
				}*/
        });

        // initialization from scratch
        if (init) {

            // attach necessary classes for styling
            this.element.addClass('ui-tabs ui-widget ui-widget-content ui-corner-all');
            this.list.addClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');
            this.lis.addClass('ui-state-default ui-corner-top');
            this.panels.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom');

            // Selected tab
            // use "selected" option or try to retrieve:
            // 1. from fragment identifier in url
            // 2. from cookie
            // 3. from selected class attribute on <li>
            if (o.selected === undefined) {
                if (location.hash) {
                    this.anchors.each(function(i, a) {
                        if (a.hash == location.hash) {
                            o.selected = i;
                            return false; // break
                        }
                    });
                }
                if (typeof o.selected != 'number' && o.cookie) {
						
                    o.selected = parseInt(self._cookie(), 10);
                }
                if (typeof o.selected != 'number' && this.lis.filter('.ui-tabs-selected').length) {
                    o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected'));
                }
                o.selected = o.selected || 0;
            }
            else if (o.selected === null) { // usage of null is deprecated, TODO remove in next release
                o.selected = -1;
            }

            // sanity check - default to first tab...
            o.selected = ((o.selected >= 0 && this.anchors[o.selected]) || o.selected < 0) ? o.selected : 0;

            // Take disabling tabs via class attribute from HTML
            // into account and update option properly.
            // A selected tab cannot become disabled.
            o.disabled = jQuery.unique(o.disabled.concat(
                jQuery.map(this.lis.filter('.ui-state-disabled'),
                    function(n, i) {
                        return self.lis.index(n);
                    } )
                )).sort();

            if (jQuery.inArray(o.selected, o.disabled) != -1) {
                o.disabled.splice(jQuery.inArray(o.selected, o.disabled), 1);
            }

            // highlight selected tab
            this.panels.addClass('ui-tabs-hide');
            this.lis.removeClass('ui-tabs-selected ui-state-active');
            if (o.selected >= 0 && this.anchors.length) { // check for length avoids error when initializing empty list
                this.panels.eq(o.selected).removeClass('ui-tabs-hide');
                this.lis.eq(o.selected).addClass('ui-tabs-selected ui-state-active');

                // seems to be expected behavior that the show callback is fired
                self.element.queue("tabs", function() {
                    self._trigger('show', null, self._ui(self.anchors[o.selected], self.panels[o.selected]));
                });

                this.load(o.selected);
            }

            // clean up to avoid memory leaks in certain versions of IE 6
            jQuery(window).bind('unload', function() {
                self.lis.add(self.anchors).unbind('.tabs');
                self.lis = self.anchors = self.panels = null;
            });

        }
        // update selected after add/remove
        else {
            o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected'));
        }

        // update collapsible
        this.element[o.collapsible ? 'addClass' : 'removeClass']('ui-tabs-collapsible');

        // set or update cookie after init and add/remove respectively
        if (o.cookie) {
            this._cookie(o.selected, o.cookie);
        }

        // disable tabs
        for (var i = 0, li; (li = this.lis[i]); i++) {
            jQuery(li)[jQuery.inArray(i, o.disabled) != -1 &&
            !jQuery(li).hasClass('ui-tabs-selected') ? 'addClass' : 'removeClass']('ui-state-disabled');
        }

        // reset cache if switching from cached to not cached
        if (o.cache === false) {
            this.anchors.removeData('cache.tabs');
        }

        // remove all handlers before, tabify may run on existing tabs after add or option change
        this.lis.add(this.anchors).unbind('.tabs');

        if (o.event != 'mouseover') {
            var addState = function(state, el) {
                if (el.is(':not(.ui-state-disabled)')) {
                    el.addClass('ui-state-' + state);
                }
            };
            var removeState = function(state, el) {
                el.removeClass('ui-state-' + state);
            };
            this.lis.bind('mouseover.tabs', function() {
                addState('hover', jQuery(this));
            });
            this.lis.bind('mouseout.tabs', function() {
                removeState('hover', jQuery(this));
            });
            this.anchors.bind('focus.tabs', function() {
                addState('focus', jQuery(this).closest('li'));
            });
            this.anchors.bind('blur.tabs', function() {
                removeState('focus', jQuery(this).closest('li'));
            });
        }

        // set up animations
        var hideFx, showFx;
        if (o.fx) {
            if (jQuery.isArray(o.fx)) {
                hideFx = o.fx[0];
                showFx = o.fx[1];
            }
            else {
                hideFx = showFx = o.fx;
            }
        }

        // Reset certain styles left over from animation
        // and prevent IE's ClearType bug...
        function resetStyle($el, fx) {
            $el.css({
                display: ''
            });
            if ($.browser.msie && fx.opacity) {
                $el[0].style.removeAttribute('filter');
            }
        }

        // Show a tab...
        var showTab = showFx ?
        function(clicked, $show) {
            jQuery(clicked).closest('li').removeClass('ui-state-default').addClass('ui-tabs-selected ui-state-active');
            $show.hide().removeClass('ui-tabs-hide') // avoid flicker that way
            .animate(showFx, showFx.duration || 'normal', function() {
                resetStyle($show, showFx);
                self._trigger('show', null, self._ui(clicked, $show[0]));
            });
        } :
        function(clicked, $show) {
            $(clicked).closest('li').removeClass('ui-state-default').addClass('ui-tabs-selected ui-state-active');
            $show.removeClass('ui-tabs-hide');
            self._trigger('show', null, self._ui(clicked, $show[0]));
        };

        // Hide a tab, $show is optional...
        var hideTab = hideFx ?
        function(clicked, $hide) {
            $hide.animate(hideFx, hideFx.duration || 'normal', function() {
                self.lis.removeClass('ui-tabs-selected ui-state-active').addClass('ui-state-default');
                $hide.addClass('ui-tabs-hide');
                resetStyle($hide, hideFx);
                self.element.dequeue("tabs");
            });
        } :
        function(clicked, $hide, $show) {
            self.lis.removeClass('ui-tabs-selected ui-state-active').addClass('ui-state-default');
            $hide.addClass('ui-tabs-hide');
            self.element.dequeue("tabs");
        };

        // attach tab event handler, unbind to avoid duplicates from former tabifying...
        this.anchors.bind(o.event + '.tabs', function() {
            var el = this, $li = $(this).closest('li'), $hide = self.panels.filter(':not(.ui-tabs-hide)'),
            $show = $(self._sanitizeSelector(this.hash));

            // If tab is already selected and not collapsible or tab disabled or
            // or is already loading or click callback returns false stop here.
            // Check if click handler returns false last so that it is not executed
            // for a disabled or loading tab!
            if (($li.hasClass('ui-tabs-selected') && !o.collapsible) ||
                $li.hasClass('ui-state-disabled') ||
                $li.hasClass('ui-state-processing') ||
                self._trigger('select', null, self._ui(this, $show[0])) === false) {
                this.blur();
                return false;
            }

            o.selected = self.anchors.index(this);

            self.abort();

            // if tab may be closed
            if (o.collapsible) {
                if ($li.hasClass('ui-tabs-selected')) {
                    o.selected = -1;

                    if (o.cookie) {
                        self._cookie(o.selected, o.cookie);
                    }

                    self.element.queue("tabs", function() {
                        hideTab(el, $hide);
                    }).dequeue("tabs");

                    this.blur();
                    return false;
                }
                else if (!$hide.length) {
                    if (o.cookie) {
                        self._cookie(o.selected, o.cookie);
                    }

                    self.element.queue("tabs", function() {
                        showTab(el, $show);
                    });

                    self.load(self.anchors.index(this)); // TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171

                    this.blur();
                    return false;
                }
            }

            if (o.cookie) {
                self._cookie(o.selected, o.cookie);
            }

            // show new tab
            if ($show.length) {
                if ($hide.length) {
                    self.element.queue("tabs", function() {
                        hideTab(el, $hide);
                    });
                }
                self.element.queue("tabs", function() {
                    showTab(el, $show);
                });

                self.load(self.anchors.index(this));
            }
            else {
                throw 'jQuery UI Tabs: Mismatching fragment identifier.';
            }

            // Prevent IE from keeping other link focussed when using the back button
            // and remove dotted border from clicked link. This is controlled via CSS
            // in modern browsers; blur() removes focus from address bar in Firefox
            // which can become a usability and annoying problem with tabs('rotate').
            if ($.browser.msie) {
                this.blur();
            }

        });

        // disable click in any case
        this.anchors.bind('click.tabs', function(){
            return false;
        });

    }
});








// JavaScript Document standartfunktionen von Typo3
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* Code aus Datei me_ichannel/AC_OETags.js */ 
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

// Flash Player Version Detection - Rev 1.6
// Detect Client Browser type
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
    var version;
    var axo;
    var e;

    // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

    try {
        // version will be set for 7.X or greater players
        axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
        version = axo.GetVariable("$version");
    } catch (e) {
    }

    if (!version)
    {
        try {
            // version will be set for 6.X players only
            axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
            // installed player is some revision of 6.0
            // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
            // so we have to be careful. 
			
            // default to the first public version
            version = "WIN 6,0,21,0";

            // throws if AllowScripAccess does not exist (introduced in 6.0r47)		
            axo.AllowScriptAccess = "always";

            // safe to call for 6.0r47 or greater
            version = axo.GetVariable("$version");

        } catch (e) {
        }
    }

    if (!version)
    {
        try {
            // version will be set for 4.X or 5.X player
            axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
            version = axo.GetVariable("$version");
        } catch (e) {
        }
    }

    if (!version)
    {
        try {
            // version will be set for 3.X player
            axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
            version = "WIN 3,0,18,0";
        } catch (e) {
        }
    }

    if (!version)
    {
        try {
            // version will be set for 2.X player
            axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
            version = "WIN 2,0,0,11";
        } catch (e) {
            version = -1;
        }
    }
	
    return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
    // NS/Opera version >= 3 check for Flash plugin in plugin array
    var flashVer = -1;
	
    if (navigator.plugins != null && navigator.plugins.length > 0) {
        if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
            var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
            var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
            var descArray = flashDescription.split(" ");
            var tempArrayMajor = descArray[2].split(".");			
            var versionMajor = tempArrayMajor[0];
            var versionMinor = tempArrayMajor[1];
            var versionRevision = descArray[3];
            if (versionRevision == "") {
                versionRevision = descArray[4];
            }
            if (versionRevision[0] == "d") {
                versionRevision = versionRevision.substring(1);
            } else if (versionRevision[0] == "r") {
                versionRevision = versionRevision.substring(1);
                if (versionRevision.indexOf("d") > 0) {
                    versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
                }
            }
            var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
        }
    }
    // MSN/WebTV 2.6 supports Flash 4
    else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
    // WebTV 2.5 supports Flash 3
    else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
    // older WebTV supports Flash 2
    else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
    else if ( isIE && isWin && !isOpera ) {
        flashVer = ControlVersion();
    }	
    return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
    versionStr = GetSwfVer();
    if (versionStr == -1 ) {
        return false;
    } else if (versionStr != 0) {
        if(isIE && isWin && !isOpera) {
            // Given "WIN 2,0,0,11"
            tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
            tempString        = tempArray[1];			// "2,0,0,11"
            versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
        } else {
            versionArray      = versionStr.split(".");
        }
        var versionMajor      = versionArray[0];
        var versionMinor      = versionArray[1];
        var versionRevision   = versionArray[2];

        // is the major.revision >= requested major.revision AND the minor version >= requested minor
        if (versionMajor > parseFloat(reqMajorVer)) {
            return true;
        } else if (versionMajor == parseFloat(reqMajorVer)) {
            if (versionMinor > parseFloat(reqMinorVer))
                return true;
            else if (versionMinor == parseFloat(reqMinorVer)) {
                if (versionRevision >= parseFloat(reqRevision))
                    return true;
            }
        }
        return false;
    }
}

function AC_AddExtension(src, ext)
{
    if (src.indexOf('?') != -1)
        return src.replace(/\?/, ext+'?'); 
    else
        return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
    var str = '';
    if (isIE && isWin && !isOpera)
    {
        str += '<object ';
        for (var i in objAttrs)
            str += i + '="' + objAttrs[i] + '" ';
        str += '>';
        for (var i in params)
            str += '<param name="' + i + '" value="' + params[i] + '" /> ';
        str += '</object>';
    } else {
        str += '<embed ';
        for (var i in embedAttrs)
            str += i + '="' + embedAttrs[i] + '" ';
        str += '> </embed>';
    }

    document.write(str);
}

function AC_FL_RunContent(){
    var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
        , "application/x-shockwave-flash"
        );
    AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
    var ret = new Object();
    ret.embedAttrs = new Object();
    ret.params = new Object();
    ret.objAttrs = new Object();
    for (var i=0; i < args.length; i=i+2){
        var currArg = args[i].toLowerCase();    

        switch (currArg){	
            case "classid":
                break;
            case "pluginspage":
                ret.embedAttrs[args[i]] = args[i+1];
                break;
            case "src":
            case "movie":	
                args[i+1] = AC_AddExtension(args[i+1], ext);
                ret.embedAttrs["src"] = args[i+1];
                ret.params[srcParamName] = args[i+1];
                break;
            case "onafterupdate":
            case "onbeforeupdate":
            case "onblur":
            case "oncellchange":
            case "onclick":
            case "ondblClick":
            case "ondrag":
            case "ondragend":
            case "ondragenter":
            case "ondragleave":
            case "ondragover":
            case "ondrop":
            case "onfinish":
            case "onfocus":
            case "onhelp":
            case "onmousedown":
            case "onmouseup":
            case "onmouseover":
            case "onmousemove":
            case "onmouseout":
            case "onkeypress":
            case "onkeydown":
            case "onkeyup":
            case "onload":
            case "onlosecapture":
            case "onpropertychange":
            case "onreadystatechange":
            case "onrowsdelete":
            case "onrowenter":
            case "onrowexit":
            case "onrowsinserted":
            case "onstart":
            case "onscroll":
            case "onbeforeeditfocus":
            case "onactivate":
            case "onbeforedeactivate":
            case "ondeactivate":
            case "type":
            case "codebase":
                ret.objAttrs[args[i]] = args[i+1];
                break;
            case "id":
            case "width":
            case "height":
            case "align":
            case "vspace": 
            case "hspace":
            case "class":
            case "title":
            case "accesskey":
            case "name":
            case "tabindex":
                ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
                break;
            default:
                ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
        }
    }
    ret.objAttrs["classid"] = classid;
    if (mimeType) ret.embedAttrs["type"] = mimeType;
    return ret;
}




// JavaScript Document 
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* Code aus Datei move_elevator_divlayer/templates/me_divlayer_divOverlay.js */ 
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */




function me_divlayer_openWithFOR(for_id) {
    jQuery("div#me_divlayer").html('<div id="me_divlayer_for"></div>');
    jQuery("select").css("visibility", 'hidden');
    jQuery("div#me_divlayer_for").load(url = parent.location.protocol+'//'+window.location.host+'/me_megazine_flash_'+for_id+'.html');
    jQuery("div#me_divlayer_box").show();
    jQuery("div#me_divlayer_box").css("margin-top", jQuery(window).scrollTop());
    jQuery("div#me_divlayer").css("height", "auto");
    jQuery("div#me_divlayer_close_bottom_icon").css("width", 500);
    jQuery("div#me_divlayer_close_top_icon").css("width", jQuery("#me_divlayer_for").width());
}

function me_divlayer_openWithURL(url, overwriteContentParameter) {

    var contentParameter = new Array();
    contentParameter['width'] = '400';

    for (overwriteParam in overwriteContentParameter) {
        contentParameter[overwriteParam] = overwriteContentParameter[overwriteParam];
    }

    jQuery("select").css("visibility", 'hidden');

    jQuery("div#me_divlayer").html('<div id="me_divlayer_content" style="width: '+(parseInt(contentParameter['width'])+10)+'px;"><div class="content-padder" id="me_divlayer_content_inlay"></div></div>');

    jQuery("div#me_divlayer_content_inlay").load(document.location.protocol + url);

    jQuery("div#me_divlayer_box").show();

    jQuery("div#me_divlayer_box").css("margin-top", jQuery(window).scrollTop());

    jQuery("div#me_divlayer").css("height", "auto");
    jQuery("div#me_divlayer_close_bottom_icon").css("width", jQuery("#me_divlayer_content").width());
    jQuery("div#me_divlayer_close_top_icon").css("width", (jQuery("#me_divlayer_content").width()+40));
}

function me_divlayer_openWithIFrame(url, overwriteiFrameParameter) {

    var iFrameParameter = new Array();
    iFrameParameter['height'] = '400';
    iFrameParameter['width'] = '400';
    iFrameParameter['framespacing'] = '0';
    iFrameParameter['frameborder'] = '0';
    iFrameParameter['scrolling'] = 'auto';
    iFrameParameter['marginwidth'] = '0';
    iFrameParameter['special_margin'] = '1';

    for (overwriteParam in overwriteiFrameParameter) {
        iFrameParameter[overwriteParam] = overwriteiFrameParameter[overwriteParam];
    }

    var iFrameParameter_final = "";
    for (iframeParam in iFrameParameter) {
        iFrameParameter_final += iframeParam+'="'+iFrameParameter[iframeParam]+'" ';
    }
    jQuery("select").css("visibility", 'hidden');	   
    var iframeHtml = '<iframe src="'+url+'" '+ iFrameParameter_final + ' id="me_divlayer_iframe" ><p>Ihr Browser kann leider keine eingebetteten Frames anzeigen.<\/p><p>Sie k&ouml;nnen die URL <a href="' + url + '" target="_blank">hier<\/a> aufrufen.<\/p><\/iframe>';
    if(iFrameParameter['special_margin'] == '1'){
        iframeHtml = '<div id="me_divlayer_iframebg">'+iframeHtml+'</div>';
    }
    jQuery("div#me_divlayer").html(iframeHtml);
    jQuery("div#me_divlayer_box").show();
    jQuery("div#me_divlayer_box").css("margin-top", jQuery(window).scrollTop());
    jQuery("div#me_divlayer").css("height", jQuery("#me_divlayer_iframe").height());   
    jQuery("div#me_divlayer_close_top_icon").css("width", (jQuery("#me_divlayer_iframe").width()+40));
	   
    if(iFrameParameter['special_margin'] == '1'){
        jQuery("div#me_divlayer_iframebg").css("width", jQuery("#me_divlayer_iframe").width()+10);
        jQuery("div#me_divlayer_close_bottom_icon").css("width", jQuery("#me_divlayer_iframe").width()+10);
    } else {
        jQuery("div#me_divlayer_close_bottom_icon").css("width", jQuery("#me_divlayer_iframe").width());
    }
}

function me_divlayer_openWithContent(content, overwriteContentParameter) {
    var contentParameter = new Array();
    contentParameter['width'] = '400';
    for (overwriteParam in overwriteContentParameter) {
        contentParameter[overwriteParam] = overwriteContentParameter[overwriteParam];
    }
    jQuery("select").css("visibility", 'hidden');
    jQuery("div#me_divlayer").html('<div id="me_divlayer_content" style="width: '+contentParameter['width']+'px;"><div class="content-padder">'+content+'</div></div>');
    jQuery("div#me_divlayer_box").show();
    jQuery("div#me_divlayer_box").css("margin-top", jQuery(window).scrollTop());
    jQuery("div#me_divlayer").css("height", jQuery("#me_divlayer_content").height());
    jQuery("div#me_divlayer_close_bottom_icon").css("width", jQuery("#me_divlayer_content").width());
    jQuery("div#me_divlayer_close_top_icon").css("width", (jQuery("#me_divlayer_content").width()+40));
}

function me_divlayer_close() {
    jQuery("div#me_divlayer").html("");
   
    jQuery("div#me_divlayer_box").hide();
	   
    jQuery("select").css("visibility", 'visible');

}


// JavaScript Document vorlsesefunktion
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* Code aus Datei linguatec/readpremium2_me_new.js */ 
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

//function vrweb_window(URL,winName,features) { window.open(URL,winName,features); }

function vrweb_encode(b){
    if (typeof encodeURIComponent=="function")
    {
        return encodeURIComponent(b)
        }
    else
    {
        return escape(b)
        }
}
function vrweb_add_parameter_to_url(b,a)
{
    if (a) {
        window.vrweb_url+="&"+b+"="+a
        }
}
function vrweb_add_parameter(b,a)
{
    if (a) {
        vrweb_add_parameter_to_url(b,vrweb_encode(a))
        }
}
function vrweb_add_parameter_to_url1(b,a)
{
    if (a) {
        window.vrweb_url+=b+"="+a
        }
}
function vrweb_add_parameter1(b,a)
{
    if (a) {
        vrweb_add_parameter_to_url1(b,vrweb_encode(a))
        }
}
               
function vrweb_popup_version()
{
    if (window.vrweb_popup) {
        return window.vrweb_popup;
    } else {
        return 'popup1';
    }
}
        
        
function vrweb_popup_link()
{
    if (vrweb_popup_version() == 'popup3') {
        return 'javascript:window.open(\''+window.vrweb_url+'\',\'vrweb\');return false;'
    } else if (vrweb_popup_version() == 'popup2') {
        return 'javascript:window.open(\''+window.vrweb_url+'\',\'vrweb\',\'menubar=no,toolbar=no,status=no,location=no,scrollbars=no,resizable=no,width=350,height=250,left=0,top=0\');return false;'
    } else {
        return 'javascript:window.open(\''+window.vrweb_url+'\',\'vrweb\',\'menubar=no,toolbar=no,status=no,location=no,scrollbars=no,resizable=no,width=350,height=120,left=0,top=0\');return false;'
    }
}
                        
function vrweb_start() {
    a = document.location;
    b = window;
    //b.vrweb_url="http://87.230.98.178/Server/vrwebpremium.pl?";
    b.vrweb_url="http://vrweb.linguatec.net/vrweb/"+vrweb_popup_version()+"?";
    vrweb_add_parameter1('srcurl',b.me_srcurl);
    //add_parameter('guilang',b.vrweb_lang);
    //add_parameter('gui','popup');
    vrweb_add_parameter('guilang',b.vrweb_guilang);
    vrweb_add_parameter('lang',b.vrweb_lang);
    vrweb_add_parameter('readcontent',b.vrweb_readcontent);
    vrweb_add_parameter('srctype',b.vrweb_srctype);
    vrweb_add_parameter('srccharset',b.vrweb_srccharset);
    vrweb_add_parameter('readelementsname',b.vrweb_readelementsname);
    vrweb_add_parameter('readelementsclass',b.vrweb_readelementsclass);
    vrweb_add_parameter('exclelementsname',b.vrweb_exclelementsname);
    vrweb_add_parameter('exclelementsclass',b.vrweb_exclelementsclass);
    vrweb_add_parameter('sitetopic',b.vrweb_sitetopic);
    vrweb_add_parameter('customerid',b.vrweb_customerid);
    vrweb_add_parameter('cache',b.vrweb_cache);
    vrweb_add_parameter('sndpitch',b.vrweb_sndpitch);
    vrweb_add_parameter('sndspeed',b.vrweb_sndspeed);
    vrweb_add_parameter('sndtype',b.vrweb_sndtype);
    vrweb_add_parameter('sndquality',b.vrweb_sndquality);
    vrweb_add_parameter('sndgender',b.vrweb_sndgender);
    vrweb_add_parameter('simpleparse',b.vrweb_simpleparse);
    vrweb_add_parameter('srctext','');
                
    document.write('<a class="readpage" href="#" style="text-decoration:none;" onclick="'+vrweb_popup_link()+'"><span class="option-label">Seite&nbsp;vorlesen&nbsp;</span><span class="linguatec-icon">&nbsp;</span></a>');
}
        
/**
		* Adventskalender
		**/
		
function showit() {
    if(drag && jQuery('#block').length > 0) {
        //window.setTimeout('showitMOZ(e)',10);
        document.getElementById('block').style.display='block';
        document.getElementById('block').innerHTML = distext;
        document.getElementById('block').style.left = event.x + 5 + "px";
        document.getElementById('block').style.top = event.y + 5 + "px";
    }
}

function showitMOZ(e) {
    if(drag && jQuery('#block').length > 0) {
        document.getElementById('block').style.display='block';
        document.getElementById('block').innerHTML = distext;
        document.getElementById('block').style.left = e.pageX + 5 + "px";
        document.getElementById('block').style.top = e.pageY  + 5 + "px";
    }
}

function tagTip(text) {
    if(jQuery('#block').length > 0){
        document.getElementById('block').style.visibility='visible';
        document.getElementById('block').style.display='block';
        distext = text;
        drag = true;
        if (!document.all) {
            window.onmousemove=showitMOZ;
        } else {
            document.onmousemove=showit;
        }
    }
}

function tagTipaus() {
    if(jQuery('#block').length > 0){
        document.getElementById('block').style.visibility='hidden';
    }
}
jQuery(document).ready(function() {
    jQuery('.advent-content').live('click', function(event){
        if(event.target.tagName != 'A'){
            tagTip('Sie können nur das Türchen des aktuellen Tages öffnen!');
            setTimeout ("tagTipaus()",5000);
        } else {
            tagTipaus();
        }
    });
/*jQuery('.advent-content').click(function(e){
            if(e.target.tagName != 'A'){
                tagTip('Sie können nur das Türchen des aktuellen Tages öffnen!');
                setTimeout ("tagTipaus()",5000);
            } else {
                tagTipaus();
            }
        });*/
});
       




// JavaScript Document standartfunktionen von Typo3
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* Code aus Datei typo3temp/javascript_0b12553063.jss */ 
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

var browserName=navigator.appName;
var browserVer=parseInt(navigator.appVersion);
var version="";
var msie4=(browserName=="Microsoft Internet Explorer"&&browserVer>=4);
if((browserName=="Netscape"&&browserVer>=3)||msie4||browserName=="Konqueror"||browserName=="Opera"){
    version="n3";
}else{
    version="n2";
}
function blurLink(theObject){
    if(msie4){
        theObject.blur();
    }
}
function decryptCharcode(n,start,end,offset){
    n=n+offset;
    if(offset>0&&n>end){
        n=start+(n-end-1);
    }else if(offset<0&&n<start){
        n=end-(start-n-1);
    }
    return String.fromCharCode(n);
}
function decryptString(enc,offset){
    var dec="";
    var len=enc.length;
    for(var i=0;i<len;i++){
        var n=enc.charCodeAt(i);
        if(n>=0x2B&&n<=0x3A){
            dec+=decryptCharcode(n,0x2B,0x3A,offset);
        }else if(n>=0x40&&n<=0x5A){
            dec+=decryptCharcode(n,0x40,0x5A,offset);
        }else if(n>=0x61&&n<=0x7A){
            dec+=decryptCharcode(n,0x61,0x7A,offset);
        }else{
            dec+=enc.charAt(i);
        }
    }
return dec;
}
function linkTo_UnCryptMailto(s){
    location.href=decryptString(s,-1);
}




/* ]]> */






