	// Mailform

$(document).ready(function(){
$(".contactform form").submit(function(){

var str = $(".contactform form").serialize();

   $.ajax({
   type: "POST",
   url: "http://www.amtstudios.nl/contact.php",
   data: str,
   success: function(msg){
    
$("#note").ajaxComplete(function(event, request, settings){

if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
{
result = '<div class="notification_ok"><b>Uw bericht is verstuurd! <br />Wij zullen z.s.m. contact met u opnemen.</b></div>';
$("#fields").hide();
}
else
{
result = msg;
}

$(this).html(result);

});

}

 });

return false;

});

});

$(function() {

    $('#slideshow').cycle({
        fx:      'fade',
		sync:  false,
        timeout:  0,
		speed: 400,
        prev:    '#prev',
        next:    '#next',
        pager:   '#nav',
		cleartype:  true,
   		cleartypeNoBg:  true,
        pagerAnchorBuilder: pagerFactory
    });

    function pagerFactory(idx, slide) {
        var s = idx > 2 ? ' style="display:none"' : '';
        return '<li'+s+'><a href="#">'+(idx+1)+'</a></li>';
    };
    
});

$(function() {

$('#case1').cycle({ 
    fx:     'scrollHorz', 
    prev:   '#prev1', 
    next:   '#next1', 
    timeout: 0,
	speed: 400
});
    
$('#case2').cycle({ 
    fx:     'scrollHorz', 
    prev:   '#prev2', 
    next:   '#next2', 
    timeout: 0,
	speed: 400
});

$('#case3').cycle({ 
    fx:     'scrollHorz', 
    prev:   '#prev3', 
    next:   '#next3', 
    timeout: 0,
	speed: 400
});

$('#case4').cycle({ 
    fx:     'scrollHorz', 
    prev:   '#prev4', 
    next:   '#next4', 
    timeout: 0,
	speed: 400
});

$('#case5').cycle({ 
    fx:     'scrollHorz', 
    prev:   '#prev5', 
    next:   '#next5', 
    timeout: 0,
	speed: 400
});

});
