$(document).ready(function(){
    // PNG FIXES
//    $('.box.twitter').ifixpng();
//    $('#flashHold').ifixpng();
//    $('#footer').ifixpng();
//    $('#header').ifixpng();
//    $('#header ul li').ifixpng();
//    $('#banner .block .end').ifixpng();
//    $('#headerEnd').ifixpng();

    $('#clear-search').click(function(){
        $('#search_model #sport').val('Sport');
        $('#search_model #name').val('Naam');
        $('#search_model #gender-m').attr('checked',false);
        $('#search_model #gender-f').attr('checked',false);
        $('#search_model #agefrom').val('');
        $('#search_model #ageto').val('');
        $('#search_model #haircolor').val('');
        $('#search_model #shoesize').val('');
				
				$('#search_model').submit();
    });

    // clear sport on focus if sport = 'Sport'
    $('#search_sport_field, #search_model #sport').focus(function(){
        if(this.value=='Sport') this.value='';
    });

    // set sport on focus if sport = ''
    $('#search_sport_field, #search_model #sport').blur(function(){
        if(this.value=='') this.value='Sport';
    });

		// clear name on focus if name = 'Naam'
    $('#search_model #name').focus(function(){
        if(this.value=='Naam') this.value='';
    });

		// set name on blur if name = ''
    $('#search_model #name').blur(function(){
        if(this.value=='') this.value='Naam';
    });

    $('#search_sport_field').keyup(function(){
        if(this.value != 'Sport')
        {
            $('#sport_list').load('/sporten/ajax/search/'+this.value);
        }
    });
	
		$('.slideshow').cycle({
				fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		});	
		
});

