/*
jQuery.noConflict();
*/

jQuery(document).ready(function($){ 
 
   /****** HEADER SLIDER ******************/  
      
    $('#slidecontent').lofJSidernews({
       interval: 7000,
	   direction:'opacity',
	   //duration: 1200,
       duration: 500,
	   easing:'easeInOutSine',
       auto: true,
       maxItemDisplay: 4,
       navPosition: 'horizontal', // horizontal
       navigatorHeight: 110,
       navigatorWidth: 119,
       mainWidth: 960,
       	isPreloaded			: false//ekelsch: f�r ie, sonst wird nicht geladen
   });  
  /****** Slider Tab ******************/      
     $("#open").click(function(){     
        $("#panel").slideDown('slow', function(){

        }); 
    });         

   $("#close").click(function(){     
        $("#panel").slideUp('slow', function(){

        });     
    });
       
   /* var myurl = document.URL;    
    var mysearch = myurl.search(/##/);
    if(mysearch == -1) {
    	  $("#panel").slideUp('slow', function(){

        });   
    } */

   
   $('.slide-out-div').tabSlideOut({
        tabHandle: '.handle', //class of the element that will become your tab
        pathToTabImage: 'fileadmin/hecon/images/..', //path to the image for the tab //Optionally can be set using css   */
        imageHeight: '255px', //height of tab image           //Optionally can be set using css
        imageWidth: '37px', //width of tab image            //Optionally can be set using css
        tabLocation: 'left', //side of screen where tab lives, top, right, bottom, or left
        speed: 300, //speed of animation
        action: 'click', //options: 'click' or 'hover', action to trigger animation
        topPos: '122px', //position from the top/ use if tabLocation is left or right
        leftPos: '0px', //position from left/ use if tabLocation is bottom or top
        fixedPosition: false //options: true makes it stick(fixed position) on scroll
    });   
  
  /***** Menu***********/                                   
       for (var i = 12; i < 17; i++){

         	$('li.navi_item'+i).mouseover(function(){         
           if($(this).has("ul").length){
                   $(this).find('.subnavi_dropdown').stop().show();
				   $(this).find('.navi_connection').stop().show();
				   $(this).find('.navi_connection').stop().css('width',$(this).width()+3+'px'); 
                   //$(this).addClass('active');
    			    
    			  } 
        });
		
		
        $('li.navi_item'+i).mouseout(function(){
              if($(this).has("ul").length){
                  $(this).find('.subnavi_dropdown').stop().hide();
				   $(this).find('.navi_connection').stop().hide();
			           // $(this).removeClass('active');
			        }
        }); 
        
        } 
   
});

// Löscht Text aus den Formularen beim klicken
function textIsWeg(feld,geclickt,standard_value)
{     
	var standard = jQuery.trim(feld.value);
							
	if(geclickt){
		$(feld).val(jQuery.trim(feld.value));
		if(feld.value == standard_value) $(feld).val('');
	}
	if(!geclickt){
		feld.value = jQuery.trim(feld.value);
		$(feld).val(jQuery.trim(feld.value));
		if(feld.value == '') $(feld).val(jQuery.trim(standard_value));
	}								
}	
