

$(function () {
    
    /**********************************
    * CONCERTINA LINKS ON ABOUT PAGE *
    **********************************/
    
    $('ul#dropDownList li span p').hover(function() {
        $(this).css({
            'color' : '#f60298',
            'cursor' : 'pointer'
        });
    }, function() {
        $(this).css({
            'color' : '#000000'
        });
    });
    
    if('ul#dropDownList') {
        
        $('ul#dropDownList li span p').click(function() {
            
            if($(this).parents("li").hasClass('active')) {
                $(this).parents("li").removeClass('active');
                $(this).parents("li").children('.dropDownInfo').slideUp('slow');
            }
            else {
                $(this).parents("li").addClass('active');
                $(this).parents("li").children('.dropDownInfo').slideDown('slow');
                $(this).css({
                    'color': '#f60298'
                });
            }
            
        });
        
    }
    
    /**************************/
    
    
    
    /***********************
    * CHILDRENS WORK MENU *
    ***********************/
    
    $('.childrensWork a').replaceWith('<p>Children&#8217;s Work</p>');
    
   $('.childrensWork p').hover(function() {
        $(this).css({
            'cursor' : 'pointer',
            'text-decoration' : 'underline'
        });
   }, function() {
        $(this).css({
            'text-decoration' : 'none'
        });
   });
   
   $('.childrensWork p').click(function() {
    
    //alert($(this).parents('li').children('#childrensWork'));
    
        $(this).parents('li').children('#childrensWorkMenu').css({
            'z-index'   :   '10000'
        });
        
        if( $(this).parents('li').children('#childrensWorkMenu').hasClass('active') ) {
            $(this).parents('li').children('#childrensWorkMenu').removeClass('active');
            $(this).parents('li').children('#childrensWorkMenu').slideUp('slow');
        }
        else {
            $(this).parents('li').children('#childrensWorkMenu').addClass('active').slideDown('slow');
        }
   });
   
   $('#childrensWorkMenu a').click(function() {
        $('#childrensWorkMenu').removeClass('active').slideUp(60);
   });
   
    if($('#childrensWorkMenu')) {
        $('#page_container').pajinate({
            'items_per_page'    :   4,
            'num_page_links_to_display' :   4
        });
    }
   
   
   /***********************/
   
});
