
$(document).ready(function() {

	
	
//SEITE EINBLENDEN

	 $("#logo").animate({
		"marginTop": 120
		});
  
    



// FANCY BOX WIRD GELADEN
$("a[rel=zoom]").fancybox({'scrolling':'no','padding':0,'titlePosition':'over','onComplete':
function() { $("#fancybox-wrap").hover(function() {
			 $("#fancybox-title").show();}, function() {
			 $("#fancybox-title").hide();});}});
			 $("#kontakt").fancybox({'scrolling':'no','autoScale':true,'width':550,'height':270,'type':'iframe','titleShow':false});
			 $("#kontakt").bind("submit",function(){
             $.fancybox({type:'iframe',href:'about:blank'});      
             $(this).attr('target',$('#fancybox-frame').attr('name'));return true;});
			 
	
// ACCORDION SKRIPT LADEN
$('#toggle-view li').click(function () {
var text = $(this).children('p');

if (text.is(':hidden')) {text.slideDown('200');$(this).children('span').html('-');} else 
			 {text.slideUp('200');$(this).children('span').html('+');}});
			 $('#toggle-view li *').click(function(evt){
  //if((evt.target.nodeName.toUpperCase() != "SPAN") && (evt.target.nodeName.toUpperCase() != "H3")){
  if($(evt.target).hasClass('tip') || ((evt.target.nodeName.toUpperCase() != "SPAN") && (evt.target.nodeName.toUpperCase() != "H3"))){
    evt.stopPropagation();
  }
});
			 
// THUMBNAIL MENÜ

//move the image in pixel
    var move = -15;
     
    //zoom percentage, 1.2 =120%
    var zoom = 1.2;
 
    //On mouse over those thumbnail
    $('.item').hover(function() {
         
        //Set the width and height according to the zoom percentage
        width = $('.item').width() * zoom;
        height = $('.item').height() * zoom;
         
        //Move and zoom the image
        $(this).find('img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:200});
         
        //Display the caption
        $(this).find('div.caption').stop(false,true).fadeIn(200);
    },
    function() {
        //Reset the image
        $(this).find('img').stop(false,true).animate({'width':$('.item').width(), 'height':$('.item').height(), 'top':'0', 'left':'0'}, {duration:100});    
 
        //Hide the caption
        $(this).find('div.caption').stop(false,true).fadeOut(200);
    });
			 
			 
			 });	
