$(document).ready(function() {
	
  /*Fancybox*/
  $("a.zoom").fancybox({
		'titlePosition'		: 'outside',
		'titleShow'		: true,
		'overlayColor'		: '#000',
		'overlayOpacity'	: 0.9,
		'opacity'		: true,
		'overlayShow'	: false,
		'transitionIn'	: 'fade',
		'transitionOut'	: 'fade',
				'titlePosition' 	: 'over',
		'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
		return '<span id="fancybox-title-over">Bild ' +  (currentIndex + 1) + ' / ' + currentArray.length + '&nbsp; &nbsp; ' + title + '</span>';
		}
   });
   /*end*/
   
  /*Img Alpha Function for Fancy*/
  $('a.zoom img').hover(function(){
	  $(this).stop().animate({ opacity: '0.7' } , '100');
  } , function(){
	  $(this).stop().animate({ opacity: '1'} , '100');
  });
  	
  
  /*Formular Felder Select Function*/
   $("#kontaktform input, textarea").click(function () {   
		  var aktinp=$(this).attr('name');
		  $("#kontaktform input, textarea").each(function () {
				  $(this).removeClass("inpstyle"); 
				  
			   if($(this).attr('name')==aktinp ){    
						if( !$(this).hasClass("inpstyle") ) {
						   $(this).addClass("inpstyle"); 
						}
			   }   
		  });

 });
 /*end*/
 
 
 /*Formular Fancybox*/
 $(document).ready(function() {
			$("#sub-form").fancybox({
				'overlayShow'	: false,
				'transitionIn'	: 'fade',
				'transitionOut'	: 'fade'
			});
			
	});
	/*end*/
  
});
