$(function() {
	
	$('.swfModles').media({
		width: 600,
		height: 745,
		caption:   false,
		standards:  true
	});
	
	$('.swfKids').media({
		width: 1425,
		height: 705,
		caption:   false,
		standards:  true
	});
	

    $("#books").jCarouselLite({
        btnNext: "#bookNavNext",
        btnPrev: "#bookNavPrev",
		visible: 5,
		mouseWheel: true
    });
	
	$('.fancyBox').fancybox();
	
	$('img[src$=.png]').ifixpng();

	$('#boy').css({
		"width": $(window).width() / 2 - 445 + "px",
		"overflow": "hidden"
	});
	
	$(window).bind("resize", function() {
		$('#boy').css({
			"width": $(window).width() / 2 - 445 + "px",
			"overflow": "hidden"
		});
	});
	
});


function checkQuests() {
	
	var unsolvedQuests = 0;
	
	if($('#quest1').val() == "") {
		unsolvedQuests++;
	}
	
	if($('#quest2').val() == "") {
		unsolvedQuests++;
	}
	
	if($('#quest3').val() == "") {
		unsolvedQuests++;
	}
	
	if($('#quest4').val() == "") {
		unsolvedQuests++;
	}
	
	if($('#quest5').val() == "") {
		unsolvedQuests++;
	}
	
	if($('#foto').val() == "") {
		unsolvedQuests++;
	}
	
	if(unsolvedQuests > 3) {
		$.validationEngine.buildPrompt('#submit','Du musst min. 3 Aufgaben erf&uuml;llen!','error');
		return false;
	}
	$.validationEngine.closePrompt("#submit");
	return true;
	
}

