/*global document, jQuery, alert */
jQuery(document).ready(function () {
    
    checkAllowIterations();
    
    jQuery("#allow-multiple-iterations").click(function () {
        checkAllowIterations();
    });
    
    function checkAllowIterations() {
        var allowIterationsStatus = jQuery("#allow-multiple-iterations").is(":checked");
        if (allowIterationsStatus === true) {
            jQuery("#iterations-options-wrap").fadeIn(700);
        } else {
            jQuery("#iterations-options-wrap").hide(0);
        }
    }
});