	$(document).ready(function() {
			
    	$('#slideshow #warp').cycle({
			fx:     'scrollHorz',
			cleartypeNoBg: true, 
    		prev:   '#prev', 
    		next:   '#next', 
    		timeout: 0,
    		 pause:         1
		});

		
			  		
  		// By suppling no content attribute, the library uses each elements title attribute by default
   		$('ul#filter li').qtip({
      	// Simply use an HTML img tag within the HTML string
      		content: '', // Set the tooltip content to the current corner
      		position: {
      			corner: {
        			tooltip: 'bottomRight', // Use the corner...
					target: 'topRight' // ...and opposite corner
        		}
      		},
      		style: {
      			border:0,
				padding:0,
        		margin:0      
      		}               
  		});
  		
 

		
        
        $('ul#filter a').click(function() {
			$(this).css('outline','none');
			$('ul#filter .current').removeClass('current');
			$(this).parent().addClass('current');
		
			var filterVal = $(this).attr("title");			
				
			if(filterVal == 'all') {
				$('ul#portfolio li.hidden').fadeIn('fast').removeClass('hidden');
			} else {
			
				$('ul#portfolio li').each(function() {
					if(!$(this).hasClass(filterVal)) {
						$(this).fadeOut('fast').addClass('hidden');
					} else {
						$(this).fadeIn('fast').removeClass('hidden');
					}
				});
			
			}
			$('html, body').animate({ scrollTop: 000}, 0000); 
			return false;
		});
	
	
	
		$('input[title], textarea[title]').each(function() {
			if($(this).val() === '') {
				$(this).val($(this).attr('title'));	
			}
		
			$(this).focus(function() {
				if($(this).val() == $(this).attr('title')) {
					$(this).val('').addClass('focused');	
				}
			});
			$(this).blur(function() {
				if($(this).val() === '') {
					$(this).val($(this).attr('title')).removeClass('focused');	
				}
			});
		});
	
	
		$('a[href=#Kontakt]').click(function(){
			$('html, body').animate({ scrollTop: $(document).height()- $(window).height() }, 3000); 
			return false;
		});
		
			
  	});
  	

