/* ------------------------------------------------- */
/* ON DOM READY
/* ------------------------------------------------- */
jQuery(document).ready(function($) {
    /**
     * SCROLLABLE IMPLEMENTATION
     */
    $("#scrollable").scrollable({
        size:1, globalNav:true, clickable:false
    }).navigator({
        // select #flowtabs to be used as navigator
        navi: "#menu",
        // select A tags inside the navigator to work as items (not direct children)
        naviItem: 'a',
        // assign "current" class name for the active A tag inside navigator
        activeClass: 'current',
		// Start api
		api:true
    });
    /**
     * FORM LOGIC
     */
    $("input[type='text']").blur(function() { if($(this).val() == '') $(this).prev().css({'text-align':'left','color':'#818080'}); });
    $("input[type='text']").focus(function() { $(this).prev().css({'text-align':'right','color':'#ccc'}); });
    $("input[type='text']").each(function() { if($(this).val() != '') $(this).prev().css({'text-align':'right','color':'#ccc'}); });
    /**
     * PRIJZEN LEUTE
     */
	if($('div.prijzen div.side-content ul li ').size() > 0)
	{
		$('div.prijzen div.side-content ul li').each(function() {
			var flap = $('#' + $(this).attr('id').replace('btn','flap'));
			$(this).hover(function() { flap.fadeIn() }, function() { flap.fadeOut(); })
		})
	}
    /*
     * SCrollpane
     */
    $('div.scrollpane').jScrollPane({scrollbarMargin:15});
	/*
	 * Wedstrijdreglement
	 */
	$('a#btn-reglement').click(function(e) {
		e.preventDefault();
		$("#scrollable").scrollable().setPage(3);
	});
});

