
 $(document).ready(function(){
		
		// Zeige Bearbeiten Button bei Mausover
			var edit = true;
		    $("li.menu_second").hover(function () {
			  if (edit == true){
		      	$("li.menu_second ul.hoversubmenu").stop(false,true).css("position","absolute").css("z-index","1000").fadeIn("slow");
		      	edit = false;
			  } 
		    },
		    function () {
		      if (edit == false){
				  edit = true;
		      	$("li.menu_second ul.hoversubmenu").stop(false,true).fadeOut("fast");
		      	
		      }
		    });
			
		// Zeige Bearbeiten Button bei Mausover
			
		    $("li.menu_third").hover(function () {
			  if (edit == true){
		      	$("li.menu_third ul.hoversubmenu").stop(false,true).fadeIn("slow");
		      	edit = false;
			  } 
		    },
		    function () {
		      if (edit == false){
				  edit = true;
		      	$("li.menu_third ul.hoversubmenu").stop(false,true).fadeOut("fast");
		      	
		      }
		    });
		
		// Zeige Bearbeiten Button bei Mausover
			
		    $("li.menu_fourth").hover(function () {
			  if (edit == true){
				  
		      	$("li.menu_fourth ul.hoversubmenu").stop(false,true).fadeIn("slow");
		      	edit = false;
			  } 
		    },
		    function () {
		      if (edit == false){
				  edit = true;
		      	$("li.menu_fourth ul.hoversubmenu").stop(false,true).fadeOut("fast");
		      	
		      }
		    });
		
		// Zeige Bearbeiten Button bei Mausover
	
		    $("li.menu_last").hover(function () {
			  if (edit == true){
		      	$("li.menu_last ul.hoversubmenu").stop(false,true).fadeIn("slow");
		      	edit = false;
			  } 
		    },
		    function () {
		      if (edit == false){
				  	edit = true;
		      	$("li.menu_last ul.hoversubmenu").stop(false,true).fadeOut("slow");
		      
		      }
		    });
	
	// HOVER FUNKTION IMG
			$('.csc-textpic-right .csc-textpic-imagewrap a')
			.css( {width:"23px", paddingLeft:"0px"} )
			.mouseover(function(){
				$(this).stop().animate(
					{width:"26px", paddingLeft:"3px"},
					{duration:200})
				})	
			.mouseout(function(){
				$(this).stop().animate(
					{width:"23px", paddingLeft:"0px"},
					{duration:200})
				});
			
				
	// HOOVER FUNKTION IMG ORANGE BUTTON
			$('#leistungsfaehige_right2 .news-list-morelink a')
			.css( {width:"23px",right:"0px"} )
			.mouseover(function(){
				$(this).stop().animate(
					{width:"26px",right:"-3px"},
					{duration:200})
				})	
			.mouseout(function(){
				$(this).stop().animate(
					{width:"23px",right:"0px"},
					{duration:200})
				});
			
	// HOOVER FUNKTION FOOTER		
			$('#footer_navi li#site_10 a')
				.css( {backgroundPosition: "0 -6px"} )
				.mouseover(function(){
					$(this).stop().animate(
						{backgroundPosition:"(0 0px)", height:"32px"},
						{duration:300})
					})	
				.mouseout(function(){
					$(this).stop().animate(
						{backgroundPosition:"(0 -6px)", height:"26px"},
						{duration:300})
					});
			
			$('#footer_navi li#site_18 a')
				.css( {backgroundPosition: "0 -6px"} )
				.mouseover(function(){
					$(this).stop().animate(
						{backgroundPosition:"(0 0px)", height:"32px"},
						{duration:300})
					})	
				.mouseout(function(){
					$(this).stop().animate(
						{backgroundPosition:"(0 -6px)", height:"26px"},
						{duration:300})
					});
			
			$('#footer_navi li#site_19 a')
				.css( {backgroundPosition: "0 -6px"} )
				.mouseover(function(){
					$(this).stop().animate(
						{backgroundPosition:"(0 0px)", height:"32px"},
						{duration:300})
					})	
				.mouseout(function(){
					$(this).stop().animate(
						{backgroundPosition:"(0 -6px)", height:"26px"},
						{duration:300})
					});
	//SHOW LOGIN BOX
	
			$("#loginShow").click(function () {

		    	$("#loginHidden").stop(false,true).show("drop", { direction: "up" }, "fast");
		    	
		    });
			
	// HOOVER RSC-TEAM	
			$('#rscTeamTemplateRight .TeamBox')
			.css( {backgroundPosition: "0 0px"} )
			.mouseover(function(){
				$(this).stop().css(
					{backgroundPosition:"0 -166px"})
				})	
			.mouseout(function(){
				$(this).stop().css(
					{backgroundPosition:"0 0px"})
				});
	// HOOVER RSC-TEAMBOX OHNE LINK
		$('#rscTeamTemplateRight .TeamBoxOlink')
		.css( {backgroundPosition: "0 0px"} )
		.mouseover(function(){
			$(this).stop().css(
				{backgroundPosition:"0 -166px"})
			})	
		.mouseout(function(){
			$(this).stop().css(
				{backgroundPosition:"0 0px"})
			});		
	
	// HOOVER SUBMIT BUTTON KONTAKT
			$('#but input#button')
			.css( {backgroundPosition: "0 0px"} )
			.mouseover(function(){
				$(this).stop().css(
					{backgroundPosition:"0 -34px"})
				})	
			.mouseout(function(){
				$(this).stop().css(
					{backgroundPosition:"0 0px"})
				});
	// HOOVER SUBMIT BUTTON LOGIN PASSWORT VERGESSEN
		$('#buttonSubmit2 input')
		.css( {backgroundPosition: "0 0px"} )
		.mouseover(function(){
			$(this).stop().css(
				{backgroundPosition:"0 -34px"})
			})	
		.mouseout(function(){
			$(this).stop().css(
				{backgroundPosition:"0 0px"})
			});

	// HOOVER SUBMIT BUTTON LOGIN
			$('#buttonSubmit input')
			.css( {backgroundPosition: "-69px 0px"} )
			.mouseover(function(){
				$(this).stop().css(
					{backgroundPosition:"0px 0px"})
				})	
			.mouseout(function(){
				$(this).stop().css(
					{backgroundPosition:"-69px 0px"})
			});

	//START FANCYBOX
      
        $(".TeamBox a").fancybox({
          'width'             : 500,
          'height'            : 1467,
          'autoScale'         : false,
		  'autoDimensions'	  : false,
          'transitionIn'      : 'none',
          'transitionOut'     : 'none',
		  'scrolling'		  :	'no',
          'type'              : 'iframe'

        });
		
		$(".TeamBox.ReferenzenBox a").fancybox({
          'width'             : 500,
          'height'            : 450,
          'autoScale'         : false,
		  'autoDimensions'	  : false,
          'transitionIn'      : 'none',
          'transitionOut'     : 'none',
		  'scrolling'		  :	'no',
          'type'              : 'iframe'

        });
		
		$(".referenzen_text a").fancybox({
          'width'             : 500,
          'height'            : 600,
          'autoScale'         : false,
		  'autoDimensions'	  : false,
          'transitionIn'      : 'none',
          'transitionOut'     : 'none',
		  'scrolling'		  :	'no',
          'type'              : 'iframe'

        });
		
		$(".Anfahrt a").fancybox({
          'width'             : 500,
          'height'            : 877,
          'autoScale'         : false,
		  'autoDimensions'	  : false,
          'transitionIn'      : 'none',
          'transitionOut'     : 'none',
		  'scrolling'		  :	'no',
          'type'              : 'iframe'
        });
		
		$("#accordionMedia a.external-link").fancybox({
          'width'             : 780,
          'height'            : 700,
          'autoScale'         : false,
		  'autoDimensions'	  : false,
          'transitionIn'      : 'none',
          'transitionOut'     : 'none',
          'type'              : 'iframe'
        });
		
		$("#accordionMedia a.external-link-new-window").fancybox({
          'width'             : 500,
          'height'            : 100,
          'autoScale'         : false,
		  'autoDimensions'	  : false,
          'transitionIn'      : 'none',
          'transitionOut'     : 'none',
          'type'              : 'iframe'
        });
		
	// START ACCORDION
	$("#accordion").accordion({
			autoHeight: false,
			navigation: false
			//event: "mouseover"
		});

	// START ACCORDION 2
	/*$("#accordion2").accordion({
			autoHeight: false,
			navigation: false
			//event: "mouseover"
		});
                */


	// START ACCORDION
	$("#accordionMedia").accordion({
			autoHeight: false,
			navigation: false
			//event: "mouseover"
		});


	// START FADE IMAGE HOMESEITE
	$('#portfolio').innerfade({ 
		  speed: 'slow', 
		  timeout: 8000, 
		  type: 'sequence', 
		  containerheight: '259px' 
	}); 
	
	$('#homeTemplateBottomLeft').innerfade({ 
		  speed: 'slow', 
		  timeout: 6000, 
		  type: 'sequence', 
		  containerheight: '124px' 
	}); 
 

});
			
