﻿$(document).ready(function() {
    //hide the all of the element with class msg_body
    $(".slide").hide();

    //toggle the componenet with class msg_body
    $(".opener").click(function() {
        $(this).parent().next('.slide').slideToggle(250);
        return false;
    });

    //initialization of the ministries page
    /***********************************************/
    $("div.children").hide();
    $("div.prayer").hide();
    $("div.women-ministry").hide();
    /***********************************************/

    $("a.children").click(function() {
        $('div.prayer').hide('slow');
        $('div.women-ministry').hide('slow');
        $('div.children').show('slow');
        return false;
    });

    $("a.prayer").click(function() {
        $('div.children').hide('slow');
        $('div.women-ministry').hide('slow');
        $('div.prayer').show('slow');
        return false;
    });

    $("a.women").click(function() {
        $('div.children').hide('slow');
        $('div.prayer').hide('slow');
        $('div.women-ministry').show('slow');
        return false;
    });

    $("a.children").mouseover(function() {
    $("img.children").attr("src", "img/ministries/11963576449aEEpq_youth_over.jpg");
    });

    $("a.children").mouseout(function() {
    $("img.children").attr("src", "img/ministries/11963576449aEEpq_youth.jpg");
    });

    $("a.women").mouseover(function() {
    $("img.women").attr("src", "img/ministries/1140887976fyrUv8_over.jpg");
    });

    $("a.women").mouseout(function() {
    $("img.women").attr("src", "img/ministries/1140887976fyrUv8.jpg");
    });

    $("a.prayer").mouseover(function() {
        $("img.prayer").attr("src", "img/ministries/epaphras_prayers_front_over.jpg");
    });

    $("a.prayer").mouseout(function() {
        $("img.prayer").attr("src", "img/ministries/epaphras_prayers_front.jpg");
    });

    /*******************************************************************************/
    //end of the ministries page
    /*******************************************************************************/


    //initialization of the about us page
    /***********************************************/
    $("div.about").hide();
    $("div.view").hide();
    $("div.jeanne").hide();
    $("div.stephen").show();
    $("a.stephen").css('font-weight', 'bold');
    $("a.jeanne").css('font-weight', 'normal');
    $("a.vision").css('font-weight', 'normal');
    $("a.beliefs").css('font-weight', 'normal');
    /***********************************************/

    $("a.stephen").click(function() {
        $('div.stephen').show('slow');
        $('div.jeanne').hide('slow');
        $('div.vision').hide('slow');
        $('div.beliefs').hide('slow');
        $("a.stephen").css('font-weight', 'bold');
        $("a.jeanne").css('font-weight', 'normal');
        $("a.vision").css('font-weight', 'normal');
        $("a.beliefs").css('font-weight', 'normal');
        return false;
    });

    $("a.jeanne").click(function() {
        $('div.stephen').hide('slow');
        $('div.jeanne').show('slow');
        $('div.vision').hide('slow');
        $('div.beliefs').hide('slow');
        $("a.jeanne").css('font-weight', 'bold');
        $("a.stephen").css('font-weight', 'normal');
        $("a.vision").css('font-weight', 'normal');
        $("a.beliefs").css('font-weight', 'normal');
        return false;
    });

    $("a.beliefs").click(function() {
        $('div.stephen').hide('slow');
        $('div.jeanne').hide('slow');
        $('div.vision').hide('slow');
        $('div.beliefs').show('slow');
        $("a.beliefs").css('font-weight', 'bold');
        $("a.stephen").css('font-weight', 'normal');
        $("a.jeanne").css('font-weight', 'normal');
        $("a.vision").css('font-weight', 'normal');
        return false;
    });

    $("a.vision").click(function() {
        $('div.stephen').hide('slow');
        $('div.jeanne').hide('slow');
        $('div.vision').show('slow');
        $('div.beliefs').hide('slow');
        $("a.vision").css('font-weight', 'bold');
        $("a.stephen").css('font-weight', 'normal');
        $("a.jeanne").css('font-weight', 'normal');
        $("a.beliefs").css('font-weight', 'normal');
        return false;
    });

});