/* Author: 

*/

$(document).ready(function() {

	$("a[rel^='prettyPhoto']").prettyPhoto({
	
		social_tools: false,
		deeplinking: false
	
	});
	
	$('#coda-slider-1').codaSlider({
	
		autoSlide: true,
		autoSlideInterval: 6000,
		autoSlideStopWhenClicked: true,
		dynamicTabs: false,
		dynamicArrows: false
	
	});
	
	$(function () {
		$('#newsletter-ajax-form').submit(function(e){
			
			// Stop!
			
			e.preventDefault();
			
			// Hammertime!
			
			var $this = $(this);
			$.getJSON(
			this.action + "?callback=?",
			$this.serialize(),
			function (data) {
				if (data.Status === 400) {
					$this.fadeOut(200, $this.empty().html('<p style="position: relative; left: -140px; top: 4px;">Oeps! Dat ging mis&hellip;</p>').fadeIn(200));
				} else { // 200
					$this.fadeOut(200, $this.empty().html('<p style="position: relative; left: -140px; top: 4px;"">Thanks! We sturen je een bevestigingsmail.</p>').fadeIn(200));
				}
			});

		});
	
	});
	
	$('#filterme').liveFilter({
	
		defaultText: 'Type hier de naam van een DJ om te zoeken'
	
	});
	
	$('.flexslider').flexslider({
	
		controlNav	:	false,
		animation	:	'slide',
		mousewheel	:	true,
		nextText	:	'&raquo;',
		prevText	:	'&laquo;',
		pauseOnHover:	true
	
	});
	
});
