jQuery(document).ready(function ($) {
  //jDiv
  var hide = false;
  $("#menu1")._hover(function(){          
   if (hide) clearTimeout(hide);
        $("#hidden-div1").fadeIn();
  $(this).addClass("active");
    }, function() {
  hide = setTimeout(function() {$("#hidden-div1").fadeOut("fast");});
  $("#menu1").removeClass("active");
    });
  $("#hidden-div1").hover(function(){
      if (hide) clearTimeout(hide);
      $("#menu1").addClass("active");
  }, function() {
  hide = setTimeout(function() {$("#hidden-div1").fadeOut("fast");});
  $("#hidden-div1").stop().fadeIn();
  $("#menu1").removeClass("active");
    });

  $("#menu2")._hover(function(){          
   if (hide) clearTimeout(hide);
        $("#hidden-div2").fadeIn();
  $(this).addClass("active");
    }, function() {
  hide = setTimeout(function() {$("#hidden-div2").fadeOut("fast");});
  $("#menu2").removeClass("active");
    });
  $("#hidden-div2").hover(function(){
      if (hide) clearTimeout(hide);
      $("#menu2").addClass("active");
  }, function() {
  hide = setTimeout(function() {$("#hidden-div2").fadeOut("fast");});
  $("#hidden-div2").stop().fadeIn();
  $("#menu2").removeClass("active");
    });	
            
	//LocalScroll				
	$.localScroll({
		duration:1500,
		filter:'.scroll_link',
		easing:'easeOutBounce',
		hash:true });
	
	//Normale jQuery Funktion - Portfolio Details
	$(".hidebox").hide();
	$("a.toggle").click(function() {
		var id = $(this).attr("id");
		$("#hidebox" + id).slideToggle(100);
		// alert(id);
		return false;
	});
});	

jQuery(function ($) {
   //jDiv
   $("*[id^=tsp]").hide();
   $(".sub_page_item").hover(
        function() { var id = $(this).attr("id"); $("#t" + id).show(); },
        function() { var id = $(this).attr("id"); $("#t" + id).hide(); }
   );

  //Slideviewer
  $(window).bind("load", function() { 
    $("div.slider").slideView();
    $("div.mygaltop").slideView();
  });
  
  //Normale jQuery Funktion - Bild Hover
  $('.fade').hover(function() {
    $(this).fadeTo("fast", 0.5);
  }, function() {
    $(this).fadeTo("fast", 1);
  });
  
  //Slide Pack
  $("#toTop").scrollToTop({
    speed:1500,
    ease:"easeOutBounce",
    start:500
  });
  
  $('#sidebar .widget_categories h2').after('<div class="h2icon"></div>');
  $('#sidebar .widget_archive h2').after('<div class="h2icon"></div>');
  $('#sidebar .widget_links h2').after('<div class="h2icon"></div>'); 
  $('#sidebar #text-460193062 .textwidget').before('<div class="h2icon"></div>'); 
});
