function doSlide() {
    		$("#slider").easySlider({
				auto: true,
				continuous: true,
				numeric: true,
				speed: 1500,
				pause: 15000
			});
	};
	window.setTimeout("doSlide()", 3000);
	
$(function(){
    
    
	$("a[rel^='image']").colorbox();
	$("a[rel^='video']").colorbox({width:"700", height:"445",iframe:true});
    $("a[rel^='galerie']").colorbox({width:"660", height:"675",iframe:true});
	
    /******************************************************************************************************************/
    /* Popups */
    var newWindow = null;
    
    function closeWin(){
    	if (newWindow != null){
    		if(!newWindow.closed)
    			newWindow.close();
    	}
    }
    
    function findPopUps(){
    	var popups = document.getElementsByTagName("a");
    	for (i=0;i<popups.length;i++)	{
     	  if (popups[i].rel.indexOf("popup")!=-1) {
    	  	popups[i].onclick = popups[i].onkeypress = doPopUp;
      		popups[i].title = popups[i].title + " [Öffnet ein Pop-Up Fenster]";
      	  }
     	}
    }
    
    function doPopUp(e) {
    
    	var t = "standard";
    	var w = "700";
    	var h = "400";
    
    	attribs = this.rel.split(" ");
    	if (attribs[1]!=null) {t = attribs[1];}
    	if (attribs[2]!=null) {w = attribs[2];}
    	if (attribs[3]!=null) {h = attribs[3];}
    
    	popUpWin(this.href,t,w,h);
    
    	if (window.event) {
    		window.event.returnValue = false;
     		window.event.cancelBubble = true;
     	} 
    	else if (e) {
    		e.stopPropagation();
     		e.preventDefault();
     	}
    }
    
    function popUpWin(url, type, strWidth, strHeight){
    	
    	closeWin(); 
    	type = type.toLowerCase();
    	
    	var tools="";
    	if (type == "standard") tools = "resizable=yes,toolbar=no,location=no,scrollbars=no,menubar=no,width="+strWidth+",height="+strHeight+",top=10,left=10";
    	newWindow = window.open(url, 'newWin', tools);
    	newWindow.focus();
    }
    if( $("a[rel^='popup']").length > 0 ) {
        findPopUps();
    }
    /******************************************************************************************************************/
	
		
	 /*** Kanäle auf- / zuklappen ***/
	  var $para = $('div#kanalschnellwahl .kanal p'); 
      if(jQuery.browser.msie && parseInt(jQuery.browser.version) <= 6) {
        $para.hide();
      }
      else{  
        $para.width($para.width()).hide();
      }
      
      $('div#kanalschnellwahl img.info').attr("tabindex", "0");  
      $('div#kanalschnellwahl img.info').bind("click keypress", function(e) {
        /**
    	 *   Tastatursteuerung ermöglichen
    	 */    
    	var type = e.type ? e.type : "";
    	var tasteCode = e.keyCode ? e.keyCode : "";
                    
        // Function bei Klick, "Enter" oder "Space" ausführen 
        if(type == "click" || tasteCode == 32 || tasteCode == 13) {
    	   $(this).parent('h3').next('p').slideToggle('normal').parent('div.kanal').siblings('div.kanal').children('p:visible').slideUp('normal');
    	}
    	return false;
      });
	
	$('.dreispaltig .article .content').syncHeight();
		$(window).resize(function(){ 
			$('.dreispaltig .article .content').syncHeight();
	});
	
	var $bookmarks = $('div#bookmarklets');
	var $einbinden = $('div#einbindenCode');
	/**
	 * 'Bookmark' - Link
	 */
	$bookmarks.hide();	
	$('a#bookmark').bind("click keypress", function(e) {
	    var type = e.type ? e.type : "";
    	var tasteCode = e.keyCode ? e.keyCode : "";
                    
        if(type == "click" || tasteCode == 32 || tasteCode == 13) {
           $('#fEmpfehlen').slideUp('slow', function() { $(this).remove(); } );
           $einbinden.hide(); 
    	   $bookmarks.slideToggle('slow');
    	}
        return false;
    });
    
	/**
	 * 'Einbinden' - Link
	 */
	$einbinden.height($einbinden.height()).hide();	
	$('a#einbinden').bind("click keypress", function(e) {
	    var type = e.type ? e.type : "";
    	var tasteCode = e.keyCode ? e.keyCode : "";
                    
        if(type == "click" || tasteCode == 32 || tasteCode == 13) {
           $('#fEmpfehlen').slideUp('slow', function() { $(this).remove(); } ); 
           $bookmarks.hide(); 
    	   $einbinden.slideToggle('slow');
    	}
        return false;
    });
	
	/**
	 * 'Weiteremfehlen' - Link
	 */
	var wLink = {
		init: function() {
		    var $empfehlen = $('#utilink');
			if($('li a#empfehlen', $empfehlen).length == 0 ) {
			 $empfehlen.prepend('<li>[<a href="/weiterempfehlen/" id="empfehlen">Weiterempfehlen</a>]</li>');
			}
			var $link = $('a#empfehlen');
			var title = $(".article .floatbox h3").text();
			$link.bind("click keypress",function(){
			    $('#fEmpfehlen').remove();   
			    $einbinden.hide(); 
			    $bookmarks.hide();
			    if($empfehlen.next('#fEmpfehlen').length == 0) {
    				$.ajax({
    					type:       "POST",
    					url:        $(this).attr('href'),
    					data:       "url=" + location.href + "&titel=" + title, 
    					success:    function(html){
    					    $('ul#utilink').after(html);
    						$('#fEmpfehlen').hide().slideDown('slow').children('span').bind('click keypress', function() {
    							$(this).parent().slideUp('slow', function() { $(this).remove(); } );
    						});	
    						fWeiter.init();
    					}
    				});
    			}
				return false;
			});
		}
	};
	wLink.init();
    
    /**
     *  Formulardaten validieren und abschicken
     */         
    var fWeiter = {
        init: function() {
             /** Formular absenden **/
            $('#fEmpfehlen form').bind("submit",function(){
                var $this = $(this);
                var data = {
                    name:      $("input#IntaboxContentPagesName").val(),
                    email:     $("input#IntaboxContentPagesEmail").val(),
                    message:   $("textarea#IntaboxContentPagesMessage").val(),
					url:	   $("input#IntaboxContentPagesUrl").val(),
					titel:	   $("input#IntaboxContentPagesTitel").val(),
                    recaptcha_challenge_field:  $("#recaptcha_challenge_field").val(),
                    recaptcha_response_field:   $("#recaptcha_response_field").val()
                };
                //var filter =/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
				$('.warning').remove();
				if((data.name == "") | (data.email == "") | (data.message == "") ) {                    
                    $this.prepend('<p class="warning">Bitte füllen Sie alle Felder aus.</p>');
                    $('#fEmpfehlen').children('span').bind('click keypress', function() {
    				    $(this).parent().slideUp('slow', function() { $(this).remove(); } );
    				});	
					return false;
                }
                /*
				else if(!filter.test(data.email)){
                    $this.prepend('<p class="warning">Bitte geben Sie eine gültige E-Mail Adresse an.</p>');
					fWeiter.init();
                    return false;
                }
			    */
                //else if(jQuery.browser.msie == false) {
                else{
                    $.post(
                     "/weiterempfehlen/true",
                     data,
                     function(resp){
                        $('#fEmpfehlen').html(resp);
                        fWeiter.init();                   
                     }   
                    );                    
                    return false;                  
                }
                return false;
            });
        }
    };
	
	/**
	 * Formularvalidierung
	 * $("input.form-error.filter(:not([aria-invalide]))");	 
	 */ 
    $("div.required").children('input, textarea').attr('aria-required', 'true');
    $(".form-error").attr('aria-invalide', 'true');
    
    /**********************************************************************************/
	var $items = $('#scrollable #items');
	if($items.length > 0) {
	    $('div#scrollable').addClass('block');   
	    
        var $contentPane = $('#scrollable .contentPane');
        $('img', $contentPane).css('width', 'auto'); 
         
        var $subcolumn = $('.subcolumns', $contentPane);
        
        var totalWidth  = $contentPane.width() * $contentPane.size();
        var totalHeight = $subcolumn.height() * $subcolumn.size();
        
        var posNew = 0;
        var actPane = 1;
        
        var totalSize, size, numVids;        
        
        $('p', $contentPane).hide();
        
        function paneNav() {
            totalSize = $contentPane.size();
            numVids = $('img', $contentPane).size();
            size = totalSize > 10 ? 10 : totalSize;
            var navi = '<ul>';
            if(actPane == 1) {
                if(totalSize >= 1) {
                    navi += '<li><a href="#" title="zurück" id="prev">&nbsp;</a></li>';
                    for (var i = 1; i <= size; i++){
                        navi += '<li><a class="jsmenulink" href="#">' + i + '</a></li>';
                    }
                    if(totalSize > 10) {
                        navi += '<li><a class="jsmenulink" href="#">...</a></li>';
                        navi += '<li><a class="jsmenulink" href="#">' + totalSize + '</a></li>';
                    }
                    navi += '<li><a href="#" title="vor" id="next">&nbsp;</a></li></ul>';
                                       
                    navi += '<div><a id="toggle" href="#">Details</a></div>'
                    $('#jsmenu').html(navi);
                }
                
                if(totalSize == 1) {
                    $('a#next').addClass('disabled');
                    if(numVids <= 3){
                        $('a#toggle').addClass('disabled');
                        var $div = $('.contentPane div');
                        var $scroll = $('#scrollable');
                        var $item = $('#items');
                        var $img = $('.contentPane img');
                        var $menu = $('#jsmenu ul');
                        
                        $div.addClass('linear');
                        $scroll.addClass('linear')
                        if($.browser.msie && $.browser.version < 7){
                         $scroll.css({'height': '359px', 'overflow': 'hidden', 'position': 'relative', 'width': '666px'});
                        } 
                        $item.addClass('linear').css({'left': 0, 'top': 0});
                        $img.addClass('float_left');
                        $('p', $div).show(); 
                    }
                }
                if($items.position().left == 0){
                    $('a#prev').addClass('disabled');
                }      
                
                $('.jsmenulink').each(function(){
                    if($(this).text() == actPane) {
                        $(this).addClass('act');
                    }
                });
            }
            else if(actPane < totalSize){
                if(totalSize > 1) {
                    navi += '<li><a href="#" title="zurück" id="prev">&nbsp;</a></li>';  
                    if(totalSize > 10) {
                        navi += '<li><a class="jsmenulink" href="#">1</a></li>';
                        if((actPane > 6) && (actPane < totalSize - 9)) {
                            navi += '<li><a class="jsmenulink" href="#">...</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">' + (actPane - 3) + '</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">' + (actPane - 2) + '</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">' + (actPane - 1) + '</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">' + actPane + '</a></li>';
                        }
                        else if(actPane >= totalSize - 9) {
                            navi += '<li><a class="jsmenulink" href="#">...</a></li>';
                            for (var i = totalSize - 9; i < totalSize; i++){
                                navi += '<li><a class="jsmenulink" href="#">' + i + '</a></li>';
                            }
                        }
                        else {
                            for (var i = 2; i < 10; i++){
                                navi += '<li><a class="jsmenulink" href="#">' + i + '</a></li>';
                            }    
                        }                        
                        if((actPane > 6) && (actPane < totalSize - 9)) {
                            navi += '<li><a class="jsmenulink" href="#">' + (actPane + 1) + '</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">' + (actPane + 2) + '</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">' + (actPane + 3) + '</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">...</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">' + (totalSize -  1) + '</a></li>';
                        }
                        else if(actPane < 5){
                            navi += '<li><a class="jsmenulink" href="#">...</a></li>';
                            for (var i = totalSize - 1; i < totalSize; i++){
                                navi += '<li><a class="jsmenulink" href="#">' + i + '</a></li>';
                            }  
                        }
                        navi += '<li><a class="jsmenulink" href="#">' + totalSize + '</a></li>';                        
                    }
                    else {
                        for (var i = 1; i <= size; i++){
                            navi += '<li><a class="jsmenulink" href="#">' + i + '</a></li>';
                        }
                    }
                    navi += '<li><a href="#" title="vor" id="next">&nbsp;</a></li></ul>';
                    navi += '<div><a href="#">Details</a></div>'
                    $('#jsmenu').html(navi);
                }
                    
                if($items.position().left == 0){
                    $('a#prev').addClass('disabled');
                }      
                
                $('.jsmenulink').each(function(){
                     if($(this).text() == actPane) {
                        $(this).addClass('act');
                    }
                });          
            }
            else if(actPane == totalSize) {
                if(totalSize > 1) {
                    navi += '<li><a href="#" title="zurück" id="prev">&nbsp;</a></li>';
                    if(totalSize > 10) {
                        navi += '<li><a class="jsmenulink" href="#">' + 1 + '</a></li>';
                        navi += '<li><a class="jsmenulink" href="#">...</a></li>';                        
                    }
                    if(totalSize > 10) {
                        for (var i = totalSize - 9; i <= totalSize; i++){
                            navi += '<li><a class="jsmenulink" href="#">' + i + '</a></li>';
                        }
                    }
                    else {
                        for (var i = 1; i <= size; i++){
                            navi += '<li><a class="jsmenulink" href="#">' + i + '</a></li>';
                        }
                    }                    
                    navi += '<li><a href="#" title="vor" id="next">&nbsp;</a></li></ul>';
                    navi += '<div><a href="#">Details</a></div>'
                    $('#jsmenu').html(navi);
                }
                $('a#next').addClass('disabled');
                
                $('.jsmenulink').each(function(){
                    if($(this).text() == actPane) {
                        $(this).addClass('act');
                    }
                });
            }           
            toggleView();
        }
        
        function subNav() {
            toggleView();
            totalSize = $subcolumn.size();
            size = totalSize > 10 ? 10 : totalSize;
            var navi = '<ul>';
            if(actPane == 1) {
                if(totalSize > 1) {
                    navi += '<li><a href="#" title="zurück" id="prev">&nbsp;</a></li>';
                    for (var i = 1; i <= size; i++){
                        navi += '<li><a class="jsmenulink" href="#">' + i + '</a></li>';
                    }
                    if(totalSize > 10) {
                        navi += '<li><a class="jsmenulink" href="#">...</a></li>';
                        navi += '<li><a class="jsmenulink" href="#">' + totalSize + '</a></li>';
                    }
                    navi += '<li><a href="#" title="vor" id="next">&nbsp;</a></li></ul>';
                    navi += '<div><a href="#">Übersicht</a></div>'
                    $('#jsmenu').html(navi);
                }
                if($items.position().top == 0){
                    $('a#prev').addClass('disabled');
                }      
                
                $('.jsmenulink').each(function(){
                    if($(this).text() == actPane) {
                        $(this).addClass('act');
                    }
                });
            }
            else if(actPane < totalSize){
                if(totalSize > 1) {
                    navi += '<li><a href="#" title="zurück" id="prev">&nbsp;</a></li>';  
                    if(totalSize > 10) {
                        navi += '<li><a class="jsmenulink" href="#">1</a></li>';
                        if((actPane > 6) && (actPane < totalSize - 9)) {
                            navi += '<li><a class="jsmenulink" href="#">...</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">' + (actPane - 3) + '</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">' + (actPane - 2) + '</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">' + (actPane - 1) + '</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">' + actPane + '</a></li>';
                        }
                        else if(actPane >= totalSize - 9) {
                            navi += '<li><a class="jsmenulink" href="#">...</a></li>';
                            for (var i = totalSize - 9; i < totalSize; i++){
                                navi += '<li><a class="jsmenulink" href="#">' + i + '</a></li>';
                            }
                        }
                        else {
                            for (var i = 2; i < 10; i++){
                                navi += '<li><a class="jsmenulink" href="#">' + i + '</a></li>';
                            }    
                        }                        
                        if((actPane > 6) && (actPane < totalSize - 9)) {
                            navi += '<li><a class="jsmenulink" href="#">' + (actPane + 1) + '</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">' + (actPane + 2) + '</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">' + (actPane + 3) + '</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">...</a></li>';
                            navi += '<li><a class="jsmenulink" href="#">' + (totalSize -  1) + '</a></li>';
                        }
                        else if(actPane < 6){
                            navi += '<li><a class="jsmenulink" href="#">...</a></li>';
                            for (var i = totalSize - 1; i < totalSize; i++){
                                navi += '<li><a class="jsmenulink" href="#">' + i + '</a></li>';
                            }  
                        }
                        navi += '<li><a class="jsmenulink" href="#">' + totalSize + '</a></li>';                        
                    }
                    else {
                        for (var i = 1; i <= size; i++){
                            navi += '<li><a class="jsmenulink" href="#">' + i + '</a></li>';
                        }
                    }
                    navi += '<li><a href="#" title="vor" id="next">&nbsp;</a></li></ul>';
                    navi += '<div><a href="#">Übersicht</a></div>'
                    $('#jsmenu').html(navi);
                }
                    
                if($items.position().top == 0){
                    $('a#prev').addClass('disabled');
                }      
                
                $('.jsmenulink').each(function(){
                     if($(this).text() == actPane) {
                        $(this).addClass('act');
                    }
                });          
            }
            else if(actPane == totalSize) {
                if(totalSize > 1) {
                    navi += '<li><a href="#" title="zurück" id="prev">&nbsp;</a></li>';
                    if(totalSize > 10) {
                        navi += '<li><a class="jsmenulink" href="#">' + 1 + '</a></li>';
                        navi += '<li><a class="jsmenulink" href="#">...</a></li>';                        
                    }
                    if(totalSize > 10) {
                        for (var i = totalSize - 9; i <= totalSize; i++){
                            navi += '<li><a class="jsmenulink" href="#">' + i + '</a></li>';
                        }
                    }
                    else {
                        for (var i = 1; i <= totalSize; i++){
                            navi += '<li><a class="jsmenulink" href="#">' + i + '</a></li>';
                        }
                    }                    
                    navi += '<li><a href="#" title="vor" id="next">&nbsp;</a></li></ul>';
                    navi += '<div><a href="#">Übersicht</a></div>'
                    $('#jsmenu').html(navi);
                }
                $('a#next').addClass('disabled');     
                
                $('.jsmenulink').each(function(){
                    if($(this).text() == actPane) {
                        $(this).addClass('act');
                    }
                });
            }
            toggleView();           
        }
        
        function toggleView() {
            $('#jsmenu>div a').click(function(){
                //console.log("click");
               var $div = $('.contentPane div');
               var $scroll = $('#scrollable');
               var $item = $('#items');
               var $img = $('.contentPane img');
               var $menu = $('#jsmenu ul');
                              
               if($div.hasClass('linear')) {
                   $(this).text('Details'); 
                   $div.removeClass('linear');
                   $scroll.removeClass('linear').removeAttr('style');
                   $item.removeClass('linear').css('top', 0);
                   $img.removeClass('float_left');
                   $('p', $div).hide();
                   $scroll.addClass('block');
                   actPane = 1;
                   paneNav(); 
                   toggleView();
                   navLR();
               } 
               else{
                   $(this).text('Übersicht');
                   $scroll.removeClass('block'); 
                   $div.addClass('linear');
                   $scroll.addClass('linear')
                   if($.browser.msie && $.browser.version < 7){
                    $scroll.css({'height': '359px', 'overflow': 'hidden', 'position': 'relative', 'width': '666px'});
                   } 
                   $item.addClass('linear').css({'left': 0, 'top': 0});
                   $img.addClass('float_left');
                   $('p', $div).show();     
                   actPane = 1;
                   subNav(); 
                   toggleView();
                   navUD();
               }
               return false; 
            });
        }
        
        function navLR() {
            $('a.jsmenulink').click(function(){
                actPane = parseInt($(this).text());
                posNew = Math.round(-((actPane - 1) * $contentPane.width()));
                //$items.animate({'left': posNew + "px"}, {queue: false, duration:2000});
                $items.css('left', posNew + 'px');
                $('.jsmenulink').removeClass('act');
                $(this).addClass('act');
                if(actPane == $contentPane.size()) {
                    $('a#next').addClass('disabled');
                    $('a#prev').removeClass('disabled'); 
                }
                else if(actPane == 1) {
                    $('a#prev').addClass('disabled');
                    $('a#next').removeClass('disabled');
                }
                else {
                    $('a#prev, a#next').removeClass('disabled');
                }
                paneNav();
                toggleView();
                navLR();           
                return false;
            });
            
            $('a#next').click(function() {
                posNew = $items.position().left - $contentPane.width();
                $items.animate({'left': posNew + "px"}, {queue: false, duration: 2000, complete: dingens});
                function dingens() {
                        actPane = Math.round(Math.abs($items.position().left / $contentPane.width() - 1));
                        $('.jsmenulink').removeClass('act');
                        $('.jsmenulink').each(function(){
                            if($(this).text() == actPane) {
                                $(this).addClass('act');
                                if(actPane == $contentPane.size()) {
                                    $('a#next').addClass('disabled');
                                }
                                else {
                                    $('a#prev').removeClass('disabled'); 
                                }
                            }
                        });
                        paneNav();
                        toggleView();
                        navLR();
                    };
                return false;
            });
            $('a#prev').click(function() {
                posNew = $items.position().left + $contentPane.width();
                $items.animate({'left': posNew + "px"}, {queue: false, duration: 2000, complete: dingens2});
                function dingens2() {
                    actPane = Math.round(Math.abs($items.position().left / $contentPane.width() - 1));
                    $('.jsmenulink').removeClass('act');
                    $('.jsmenulink').each(function(){
                        if($(this).text() == actPane) {
                            $(this).addClass('act');
                            if(actPane == 1) {
                                $('a#prev').addClass('disabled');                                
                            }
                            else {
                                $('a#next').removeClass('disabled');
                            }
                        }
                        paneNav();
                        toggleView();
                        navLR();
                    });
                }
                return false;
            });
        }
        
        function navUD() {
            $('a.jsmenulink').click(function(){
                actPane = parseInt($(this).text());
                posNew = Math.round(-((actPane - 1) * $subcolumn.height()));
                //$items.animate({'left': posNew + "px"}, {queue: false, duration:2000});
                $items.css('top', posNew + 'px');
                $('.jsmenulink').removeClass('act');
                
                    $(this).addClass('act');
                    if(actPane == $subcolumn.size()) {
                            $('a#next').addClass('disabled');
                            $('a#prev').removeClass('disabled'); 
                    }
                    else if(actPane == 1) {
                            $('a#prev').addClass('disabled');
                            $('a#next').removeClass('disabled');
                    }
                    else {
                            $('a#prev, a#next').removeClass('disabled');
                    }
                subNav();
                toggleView();
                navUD();
                return false;
            });
            
            $('a#next').click(function() {
                posNew = $items.position().top - $subcolumn.height();
                $items.animate({'top': posNew + "px"}, {queue: false, duration: 2000, complete: dingens});
                function dingens() {
                    actPane = Math.round(Math.abs(posNew / $subcolumn.height() - 1));
                        $('.jsmenulink').removeClass('act');
                        $('.jsmenulink').each(function(){
                            if($(this).text() == actPane) {
                                $(this).addClass('act');
                                if(actPane == $subcolumn.size()) {
                                    $('a#next').addClass('disabled');
                                }
                                else {
                                    $('a#prev').removeClass('disabled'); 
                                }
                            }
                    });
                    subNav();
                    toggleView();
                    navUD();
                };
                return false;
            });
            $('a#prev').click(function() {
                posNew = $items.position().top + $subcolumn.height();
                $items.animate({'top': posNew + "px"}, {queue: false, duration: 2000, complete: dingens2});
                function dingens2() {
                    actPane = Math.round(Math.abs($items.position().top / $subcolumn.height() - 1));
                    $('.jsmenulink').removeClass('act');
                    $('.jsmenulink').each(function(){
                        if($(this).text() == actPane) {
                            $(this).addClass('act');
                            if(actPane == 1) {
                                $('a#prev').addClass('disabled');                                
                            }
                            else {
                                $('a#next').removeClass('disabled');
                            }
                        }
                    });
                    subNav();
                    toggleView();
                    navUD();
                };                
                return false;
            });
        }
        
        paneNav();
        toggleView();
        navLR();
    }    
    /**********************************************************************************/
    
    /** Label overlay **/
    $('#search label').labelOver('over');                    	

});

/**
 * Copyright (c) 2007 
 * Dirk Ginader (ginader.de)
 * Dirk Jesse (yaml.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Version: 1.0
 */

(function($) {
	$.fn.syncHeight = function(settings) {
		var max = 0;
		var browser_id = 0;
		var property = [
		   ['min-height','0px'],
			['height','1%']
		];

		// check for IE6 ...
		if($.browser.msie && $.browser.version < 7){
			browser_id = 1;
		}
		
		// get maximum element height ...
		$(this).each(function() {
			// fallback to auto height before height check ...
			$(this).css(property[browser_id][0],property[browser_id][1]);
			var val=$(this).height();
			if(val > max){
			   max = val;
			}
		});
		
		// set synchronized element height ...
 		$(this).each(function() {
  			$(this).css(property[browser_id][0],max+'px');
		});
		return this;
	};	
})(jQuery);

(function($) {
    $.fn.labelOver = function(overClass) {
    	return this.each(function(){
    		var label = jQuery(this);
    		var f = label.attr('for');
    		if (f) {
    			var input = jQuery('#' + f);
    			
    			this.hide = function() {
    			  label.css({ textIndent: -10000 })
    			}
    			
    			this.show = function() {
    			  if (input.val() == '') label.css({ textIndent: 0 })
    			}
    
    			// handlers
    			input.focus(this.hide);
    			input.blur(this.show);
    		    label.addClass(overClass).click(function(){ input.focus() });
    			
    			if (input.val() != '') this.hide(); 
    		}
    	})
    }
})(jQuery);

