// JavaScript Document
$(document).ready(function() {

	$('#footerlogo').after($('.bottom .introtext h2')); 
	
	$('#slidewrapper').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		timeout:       6000,  // milliseconds between slide transitions (0 to disable auto advance) 
    	speed:         1000,  // speed of the transition (any valid fx speed value) 
    	pause:         true,     // true to enable "pause on hover" 
    	delay:         0,     // additional delay (in ms) for first transition (hint: can be negative)
		pager:  	   '#slidernav'
	});
	
	// Ab hier dann Tooltip Code
	$(function(){
    	$(".tiptop").tipTip({maxWidth: "auto", edgeOffset: 7, defaultPosition: "top"});
	});
	$(function(){
    	$(".tipbottom").tipTip({maxWidth: "auto", edgeOffset: 7});
	});
	
	// Ab hier dann Portfolio Slide Code
	$(".infosmall").css({'opacity':'0'});

	$(".projekt").hover(function() {
 	$(this).children(".infosmall").fadeTo("fast", 1.0);
 	},function(){
 	$(this).children(".infosmall").fadeTo("fast", 0);
 	}); 
	
	// Ab hier dann Sortierbares Portfolio Version Animate
	 $('ul#filter a').click(function() {  
         $(this).css('outline','none');  
         $('ul#filter .current').removeClass('current');  
         $(this).parent().addClass('current');  
   
         var filterVal = $(this).text().toLowerCase().replace(' ','-');  
   
         if(filterVal == 'alle') {  
             $('ul#portfolio li.hidden').stop().animate({
													"width": "300px",
													"height": "200px",
													"opacity": 1
												}, 'slow').removeClass('hidden');  
         } else {  
             $('ul#portfolio li').each(function() {  
                 if(!$(this).hasClass(filterVal)) {  
                     $(this).stop().animate({
										"width": 0,
										"height": 'hide',
										"opacity": 0
									}, 'slow').addClass('hidden');
                 } else {  
                     $(this).stop().animate({
										"width": "300px",
										"height": "200px",
										"opacity": 1
									}, 'slow').removeClass('hidden');  
                 }  
             });  
         }  
   
         return false;  
     }); 
	 
	 // Ab hier dann den Klick fÃ¼r Handy ausschalten
	 $('a#handytwo').click(function() {   
			return false;  
     }); 
	
  });