
	$(document).ready(function(){
		
		$('.nieuwsbrief input').focus(function(){
			
			if($(this).attr('type') != 'submit'){
				if($(this).attr('value') == 'typ hier uw e-mailadres'){
					$(this).attr('value','');
					$(this).css('font-style','inherit');
				}
				
				$(this).css('background-color','#333');
			}
			
		});
		
		$('.nieuwsbrief input').blur(function(){
			
			if($(this).attr('type') != 'submit'){
				if($(this).attr('value') == ''){
					$(this).attr('value','typ hier uw e-mailadres');
					$(this).css('font-style','italic');
				}
				
				$(this).css('background-color','#222');
			}
			
		});
		
		$('.icons img').mouseover(function(){
			
			$(this).css('vertical-align','top');
			$(this).stop().animate({marginTop:'5px'},{duration:300});
			
		});
		
		$('.icons img').mouseout(function(){
			
			$(this).stop().animate({marginTop:'0'},{duration:300});
			
		});
		
		$('#bottom .images').cycle({
			pager : '.nav',
			slideExpr: 'div.slider',
			prev: '.prev',
			next: '.next',
			startingSlide: 1,
			timeout: 7000
		});
		
		$('#bottom .images').cycle('prev');
			
			direction = 'down';
			
		$('.diensten-kolom a.toggler').live('click',function(e){

			e.preventDefault();
			$(this).parent().find('span').slideToggle('normal',function(){		
				if(direction == 'down'){
					$(this).parent().html($(this).parent().html().replace("...",""));
					direction = 'up';
				}else{
					$(this).parent().html($(this).parent().html().replace('<span','...<span'));
					direction = 'down';
				}
			});
			
			if($(this).text() == 'lees meer'){
				$(this).text('sluiten');
			}else{
				$(this).text('lees meer');
			}
			
			/*alert($(this).parent().find('p').innerHeight());
			
			if($(this).parent().find('p').innerHeight() <= 0 || $(this).parent().find('p').css('display') != 'block'){
				prevHeight = $(this).parent().find('p').height();
				
				$(this).parent().find('p').css('height','0');
				$(this).parent().find('p').css('display','block');
				$(this).parent().find('p').animate({height:prevHeight+'px'},500);
			}else{
				$(this).parent().find('p').animate({height:'0px'},500);
			}*/
			
		});
		
		$('.afbToevoegen').click(function(){
			
			$('.afbAll').append('<tr><td>Afbeelding</td><td><input type="file" name="image[]" /></td><td></td></tr>');
			
		});
		
		$('.pfimages a').click(function(){
			alert('test');
		});
		
	});
