
$('#photo-finder-right-arrow').click(function(){
    $('#thumb-container').scrollTo('+=609px', 800, {axis:'x'});
});

$('#photo-finder-left-arrow').click(function(){
    $('#thumb-container').scrollTo('-=609px', 800, {axis:'x'});
});


$('#photo-finder').click(function(){
    if($('#thumb-container').height() < 10){
        $('#thumb-container').css('border','1px solid #548cc4');
        $('#thumb-container').animate({height:'99px'},500,
        function(){
            $('#photo-finder-left-arrow').fadeIn('slow');
            $('#photo-finder-right-arrow').fadeIn('slow');
            $('#photo-finder-right-arrow').css('display','inline');
        }

    );
    }else{
        $('#photo-finder-left-arrow').hide(1);
        $('#photo-finder-right-arrow').hide(1);
        $('#thumb-container').css('border','0');
        $('#thumb-container').animate({height:'0px'},500);
    }
});

//Hub Page
$('#the-hub #plus1').click(function() {
    if($('#the-hub #day-center').height() > 35){
        $('#the-hub #day-center').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus1').attr('src', 'images/plusClickable.jpg');
        $('#plus1').attr('alt', 'Read More');
    }else if($('#the-hub #day-center').height() <= 35){
        $('#the-hub #day-center').animate({
            height: $('#day-center-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus1').attr('src', 'images/minusClickable.jpg');
        $('#plus1').attr('alt', 'Hide');
    }
});

$('#the-hub  #plus2').click(function() {
    if($('#the-hub #aspirations').height() > 35){
        $('#the-hub #aspirations').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus2').attr('src', 'images/plusClickable.jpg');
        $('#plus2').attr('alt', 'Read More');
    }else if($('#the-hub #aspirations').height() <= 35){
        $('#the-hub #aspirations').animate({
            height: $('#aspirations-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus2').attr('src', 'images/minusClickable.jpg');
        $('#plus2').attr('alt', 'Hide');
    }
});

$('#the-hub  #plus3').click(function() {
    if($('#the-hub #activities').height() > 35){
        $('#the-hub #activities').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus3').attr('src', 'images/plusClickable.jpg');
        $('#plus3').attr('alt', 'Read More');
    }else if($('#the-hub #activities').height() <= 35){
        $('#the-hub #activities').animate({
            height: $('#activities-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus3').attr('src', 'images/minusClickable.jpg');
        $('#plus3').attr('alt', 'Hide');
    }
});

$('#the-hub  #plus4').click(function() {
    if($('#the-hub #location').height() > 35){
        $('#the-hub #location').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus4').attr('src', 'images/plusClickable.jpg');
        $('#plus4').attr('alt', 'Read More');
    }else if($('#the-hub #location').height() <= 35){
        $('#the-hub #location').animate({
            height: $('#location-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus4').attr('src', 'images/minusClickable.jpg');
        $('#plus4').attr('alt', 'Hide');
    }
});

$('#the-hub  #plus5').click(function() {
    if($('#the-hub #contact-details').height() > 35){
        $('#the-hub #contact-details').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus5').attr('src', 'images/plusClickable.jpg');
        $('#plus5').attr('alt', 'Read More');
    }else if($('#the-hub #contact-details').height() <= 35){
        $('#the-hub #contact-details').animate({
            height: $('#contact-details-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus5').attr('src', 'images/minusClickable.jpg');
        $('#plus5').attr('alt', 'Hide');
    }
});

//Homes Page

$('#marriot-road-expand').click(function() {
    if($('#marriot-road-content').height() > 0){
        $('#marriot-road-content').animate({
            height: '0px'
        }, 1200, function() {
            $('#castleton-avenue').fadeIn('1');
            $('#pear-close').fadeIn('1');
            $('#park-avenue').fadeIn('1');
            $('#what-support').fadeIn('1');
            $('#what-cost').fadeIn('1');
            $('#not-sure').fadeIn('1');
        })
        $('#marriot-road-expand').attr('src', 'images/plusClickable.png');
        $('#marriot-road-expand').attr('alt', 'Read More');    
    }else if($('#marriot-road-content').height() <= 0){
        $('#not-sure').fadeOut('slow', function() {
            $('#marriot-road-content').animate({
                height: '375px'
            },1200)

        });
        $('#castleton-avenue').fadeOut('slow');
        $('#pear-close').fadeOut('slow');
        $('#park-avenue').fadeOut('slow');
        $('#what-support').fadeOut('slow');
        $('#what-cost').fadeOut('slow');
        $('#not-sure').fadeOut('slow');         
        $('#marriot-road-expand').attr('src', 'images/minusClickable.png');
        $('#marriot-road-expand').attr('alt', 'Hide');        
    }
});


$('#castleton-avenue-expand').click(function() {
    if($('#castleton-avenue-content').height() > 0 ){
        $('#castleton-avenue-content').animate({
            height: '0px'
        },800, function() {
            $('#castleton-avenue').animate({
                top: '0px'
            },800,function() {
                $('#marriot-road,#pear-close,#park-avenue,#what-support,#what-cost,#not-sure').animate({
                    opacity: '1'
                },800)
            })
        });
        $('#castleton-avenue-expand').attr('src', 'images/plusClickable.png');
        $('#castleton-avenue-expand').attr('alt', 'Read More');
    }else if($('#castleton-avenue-content').height() <= 0){
        $('#not-sure').fadeOut(800, function() {
            $('#castleton-avenue-content').animate({
                height: '375px'
            },1200
            )
        });

        $('#marriot-road,#pear-close,#park-avenue,#what-support,#what-cost,#not-sure').animate({
            opacity: '0'
        }, 800, function() {});

        $('#castleton-avenue, #castleton-avenue-content').delay(800).animate({
            top: '-60px'
        }, 800);

        $('#castleton-avenue-expand').attr('src', 'images/minusClickable.png');
        $('#castleton-avenue-expand').attr('alt', 'Hide');
        $('#not-sure').fadeIn('slow');
    }
});

$('#pear-close-expand').click(function() {
    if($('#pear-close-content').height() > 0 ){
        $('#pear-close-content').animate({
            height: '0px'
        },800, function() {
            $('#pear-close').animate({
                top: '0px'
            },800,function() {
                $('#marriot-road,#castleton-avenue,#park-avenue,#what-support,#what-cost,#not-sure').animate({
                    opacity: '1'           
                },800)
            })
        });
        $('#pear-close-expand').attr('src', 'images/plusClickable.png');
        $('#pear-close-expand').attr('alt', 'Read More');
    }else if($('#pear-close-content').height() <= 0){
        $('#not-sure').fadeOut(800, function() {
            $('#pear-close-content').animate({
                height: '375px'
            },1200
            )
        });

        $('#marriot-road,#castleton-avenue,#park-avenue,#what-support,#what-cost,#not-sure').animate({
            opacity: '0'
        }, 800, function() {});
        
        $('#pear-close, #pear-close-content').delay(800).animate({
            top: '-120px'
        }, 800);

        $('#pear-close-expand').attr('src', 'images/minusClickable.png');
        $('#pear-close-expand').attr('alt', 'Hide');
        $('#not-sure').fadeIn('slow');
    }
});

$('#park-avenue-expand').click(function() {
    if($('#park-avenue-content').height() > 0 ){
        $('#park-avenue-content').animate({
            height: '0px'
        },800, function() {
            $('#park-avenue').animate({
                top: '0px'
            },800,function() {
                $('#marriot-road,#castleton-avenue,#pear-close,#what-support,#what-cost,#not-sure').animate({
                    opacity: '1'
                },800)
            })
        });
        $('#park-avenue-expand').attr('src', 'images/plusClickable.png');
        $('#park-avenue-expand').attr('alt', 'Read More');
    }else if($('#park-avenue-content').height() <= 0){
        $('#not-sure').fadeOut(800, function() {
            $('#park-avenue-content').animate({
                height: '375px'
            },1200
            )
        });

        $('#marriot-road,#castleton-avenue,#pear-close,#what-support,#what-cost,#not-sure').animate({
            opacity: '0'
        }, 800, function() {});

        $('#park-avenue, #park-avenue-content').delay(800).animate({
            top: '-180px'
        }, 800);

        $('#park-avenue-expand').attr('src', 'images/minusClickable.png');
        $('#park-avenue-expand').attr('alt', 'Hide');
        $('#not-sure').fadeIn('slow');
    }
});


$('#what-support-expand').click(function() {
    if($('#what-support-content').height() > 0 ){
        $('#what-support-content').animate({
            height: '0px'
        },800, function() {
            $('#what-support').animate({
                top: '0px'
            },800,function() {
                $('#marriot-road,#castleton-avenue,#pear-close,#what-support,#park-avenue,#what-cost,#not-sure').animate({
                    opacity: '1'
                },800)
            })
        });
        $('#what-support-expand').attr('src', 'images/plusClickable.png');
        $('#what-support-expand').attr('alt', 'Read More');
    }else if($('#what-support-content').height() <= 0){
        $('#not-sure').fadeOut(800, function() {
            $('#what-support-content').animate({
                height: '125px'
            },1200
            )
        });

        $('#marriot-road,#castleton-avenue,#pear-close,#what-cost,#not-sure,,#park-avenue').animate({
            opacity: '0'
        }, 800, function() {});

        $('#what-support, #what-support-content').delay(800).animate({
            top: '-220px'
        }, 800);

        $('#what-support-expand').attr('src', 'images/minusClickable.png');
        $('#what-support-expand').attr('alt', 'Hide');
        $('#not-sure').fadeIn('slow');
    }
});


$('#what-cost-expand').click(function() {
    if($('#what-cost-content').height() > 0 ){
        $('#what-cost-content').animate({
            height: '0px'
        },800, function() {
            $('#what-cost').animate({
                top: '0px'
            },800,function() {
                $('#marriot-road,#castleton-avenue,#pear-close,#what-support,#park-avenue,#what-cost,#not-sure').animate({
                    opacity: '1'
                },800)
            })
        });
        $('#what-cost-expand').attr('src', 'images/plusClickable.png');
        $('#what-cost-expand').attr('alt', 'Read More');
    }else if($('#what-cost-content').height() <= 0){
        $('#not-sure').fadeOut(800, function() {
            $('#what-cost-content').animate({
                height: '125px'
            },1200
            )
        });

        $('#marriot-road,#castleton-avenue,#pear-close,#not-sure,#what-support,#park-avenue').animate({
            opacity: '0'
        }, 800, function() {});

        $('#what-cost, #what-cost-content').delay(800).animate({
            top: '-280px'
        }, 800);

        $('#what-cost-expand').attr('src', 'images/minusClickable.png');
        $('#what-cost-expand').attr('alt', 'Hide');
        $('#not-sure').fadeIn('slow');
    }
});



$('.view-more1').click(function() {
    $('.text1').fadeOut('slow');
    $('.text3').fadeOut('slow', function() {
        $('.text2').fadeIn('slow');
        $('.button2').attr('src', 'images/activeDot.jpg')
        $('.button1').attr('src', 'images/inactiveDot.jpg');
        $('.button3').attr('src', 'images/inactiveDot.jpg');;
    });
});

$('.view-more2').click(function() {
    $('.text1').fadeOut('slow');
    $('.text2').fadeOut('slow', function() {
        $('.text3').fadeIn('slow');
        $('.button3').attr('src', 'images/activeDot.jpg')
        $('.button1').attr('src', 'images/inactiveDot.jpg');
        $('.button2').attr('src', 'images/inactiveDot.jpg');;
    });
});

//Homes Page buttons
$('.button1').click(function() {
    if($('.button1').attr('src') == 'images/activeDot.jpg'){
               
    } else {
        $('.text1').fadeOut('slow');
        $('.button1').attr('src', 'images/activeDot.jpg');
        $('.button2').attr('src', 'images/inactiveDot.jpg');
        $('.button3').attr('src', 'images/inactiveDot.jpg');
        $('.text3').fadeOut('slow', function() {
            $('.text1').fadeIn('slow');
        });
    }
});

$('.button2').click(function() {
    if($('.button2').attr('src') == 'images/activeDot.jpg'){
                
    } else {
        $('.text1').fadeOut('slow');
        $('.button1').attr('src', 'images/inactiveDot.jpg');
        $('.button2').attr('src', 'images/activeDot.jpg');
        $('.button3').attr('src', 'images/inactiveDot.jpg');
        $('.text3').fadeOut('slow', function() {
            $('.text2').fadeIn('slow');
        });
    }
});

$('.button3').click(function() {
    if($('.button3').attr('src') == 'images/activeDot.jpg'){

    } else {
        $('.text1').fadeOut('slow');
        $('.button1').attr('src', 'images/inactiveDot.jpg');
        $('.button2').attr('src', 'images/inactiveDot.jpg');
        $('.button3').attr('src', 'images/activeDot.jpg');
        $('.text2').fadeOut('slow', function() {
            $('.text3').fadeIn('slow');
        });
    }
});

$(document).ready(function(){	
    if (!$.browser.opera) {
        // select element styling
        $('select.select').each(function(){
            var title = $(this).attr('title');
            if( $('option:selected', this).val() != ''  ) title = $('option:selected',this).text();
            $(this)
            .css({
                'z-index':10,
                'opacity':0,
                'visibility':'visible'
            })
            .after('<span class="select">' + title + '</span>')
            .change(function(){
                val = $('option:selected',this).text();
                $(this).next().text(val);
            })
        });
    };
});















//Refferral Page
$('#refferral #plus1').click(function() {
    if($('#refferral #why').height() > 35){
        
        $('#refferral #why').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus1').attr('src', 'images/plusClickable.jpg');
        $('#plus1').attr('alt', 'Read More');
    }else if($('#refferral #why').height() <= 35){
        $('#refferral #why').animate({
            height: $('#why-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus1').attr('src', 'images/minusClickable.jpg');
        $('#plus1').attr('alt', 'Hide');
    }
});

$('#refferral #plus2').click(function() {
    if($('#refferral #how').height() > 35){

        $('#refferral #how').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus2').attr('src', 'images/plusClickable.jpg');
        $('#plus2').attr('alt', 'Read More');
    }else if($('#refferral #how').height() <= 35){
        $('#refferral #how').animate({
            height: $('#how-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus2').attr('src', 'images/minusClickable.jpg');
        $('#plus2').attr('alt', 'Hide');
    }
});

$('#refferral #plus3').click(function() {
    if($('#refferral #what').height() > 35){

        $('#refferral #what').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus3').attr('src', 'images/plusClickable.jpg');
        $('#plus3').attr('alt', 'Read More');
    }else if($('#refferral #what').height() <= 35){
        $('#refferral #what').animate({
            height: $('#what-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus3').attr('src', 'images/minusClickable.jpg');
        $('#plus3').attr('alt', 'Hide');
    }
});


//supported Living

$('#supported-living #plus1').click(function() {
    if($('#supported-living #content1').height() > 35){

        $('#supported-living #content1').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus1').attr('src', 'images/plusClickable.jpg');
        $('#plus1').attr('alt', 'Read More');
    }else if($('#supported-living #content1').height() <= 35){
        $('#supported-living #content1').animate({
            height: $('#content1-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus1').attr('src', 'images/minusClickable.jpg');
        $('#plus1').attr('alt', 'Hide');
    }
});

$('#supported-living #plus2').click(function() {
    if($('#supported-living #content2').height() > 35){

        $('#supported-living #content2').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus2').attr('src', 'images/plusClickable.jpg');
        $('#plus2').attr('alt', 'Read More');
    }else if($('#supported-living #content2').height() <= 35){
        $('#supported-living #content2').animate({
            height: $('#content2-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus2').attr('src', 'images/minusClickable.jpg');
        $('#plus2').attr('alt', 'Hide');
    }
});

$('#supported-living #plus3').click(function() {
    if($('#supported-living #content3').height() > 35){

        $('#supported-living #content3').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus3').attr('src', 'images/plusClickable.jpg');
        $('#plus3').attr('alt', 'Read More');
    }else if($('#supported-living #content3').height() <= 35){
        $('#supported-living #content3').animate({
            height: $('#content3-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus3').attr('src', 'images/minusClickable.jpg');
        $('#plus3').attr('alt', 'Hide');
    }
});

$('#supported-living #plus4').click(function() {
    if($('#supported-living #content4').height() > 35){
        $('#supported-living #content4').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus4').attr('src', 'images/plusClickable.jpg');
        $('#plus4').attr('alt', 'Read More');
    }else if($('#supported-living #content4').height() <= 35){
        $('#supported-living #content4').animate({
            height: $('#content4-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus4').attr('src', 'images/minusClickable.jpg');
        $('#plus4').attr('alt', 'Hide');
    }
});

$('#supported-living #plus5').click(function() {
    if($('#supported-living #content5').height() > 35){
        $('#supported-living #content5').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus5').attr('src', 'images/plusClickable.jpg');
        $('#plus5').attr('alt', 'Read More');
    }else if($('#supported-living #content5').height() <= 35){
        $('#supported-living #content5').animate({
            height: $('#content5-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus5').attr('src', 'images/minusClickable.jpg');
        $('#plus').attr('alt', 'Hide');
    }
});

$('#supported-living #plus6').click(function() {
    if($('#supported-living #content6').height() > 35){
        $('#supported-living #content6').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus6').attr('src', 'images/plusClickable.jpg');
        $('#plus6').attr('alt', 'Read More');
    }else if($('#supported-living #content6').height() <= 35){
        $('#supported-living #content6').animate({
            height: $('#content6-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus6').attr('src', 'images/minusClickable.jpg');
        $('#plus6').attr('alt', 'Hide');
    }
});






function allTeamPosition() {
            $('#alison').animate({top: '0',left:'0'},1000);
            $('#ann').animate({
                top: '0',
                left:'120'
            },1000);
            $('#falek').animate({
                top: '0',
                left:'240'
            },1000);
            $('#gary').animate({
                top: '0',
                left:'360'
            },1000);
            $('#ian').animate({
                top: '120'
            },1000);
            $('#john').animate({
                top: '120',
                left:'120'
            },1000);
            $('#julian').animate({
                top: '120',
                left:'240'
            },1000);
            $('#margaret').animate({
                top: '120',
                left:'360'
            },1000);
            $('#ralph').animate({
                top: '240',
                left:'0'
            },1000);
            $('#neena').animate({
                top: '240',
                left:'120'
            },1000);
            $('#ronda').animate({
                top: '240',
                left:'240'
            },1000);
            //alert ('helloB');
}

function trusteePositon() {
      $('#john, #margaret, #neena,#ronda,#ann').animate({
            top: '450',
            left:'0'            
        },1000);
        $('#gary').animate({
            top: '0',
            left:'0'
        },1000);
        $('#alison').animate({
            top: '0',
            left:'120'
        },1000);
        $('#ralph').animate({
            top: '0',
            left:'240'
        },1000);
        $('#falek').animate({
            top: '0',
            left:'360'
        },1000);
        $('#ian').animate({
            top: '120',
            left:'0'
        },1000);
        $('#julian').animate({
            top: '120',
            left:'120'
        },1000);
}

function seniorPosition() {
       $('#gary,#ann, #alison, #ralph,#falek, #ian, #julian  ').animate({
            top: '450',
            left:'0'
        },1000);
     $('#ronda').animate({
            top: '0',
            left:'0'
        },1000);
     $('#john').animate({
            top: '0',
            left:'120'
        },1000);
        $('#neena').animate({
            top: '0',
            left:'240'
        },1000);

        $('#margaret').animate({
            top: '0',
            left:'360'
        },1000);
}

/* Meet the team */
$('.team-image').click(function() {
    var maxZ = Math.max.apply(null,$.map($('#meet-the-team #content #right > *'), function(e,n){
    if($(e).css('position')=='absolute')
        return parseInt($(e).css('z-index'))||1 ;
},5)
);

    var name = ($(this).attr('id'));
    $(this).css('z-index',maxZ +1);
    $('.team-image').animate({
        top: '450px',
        left: '0'
    }, 1000, function() {
        $('#text-area').fadeIn('slow')
            $('#'+name+'-text').fadeIn('slow');
            $('#'+name+'-text').css('visibility','visible');
            
    });

     $('#close-button').click(function() {
        $('#text-area').fadeOut('slow', function() {
            $('#'+name+'-text').css('visibility','hidden');
            $('.team-text').hide();
            allTeamPosition();    
        });
        
    });
});


$('#trustee-team').click(function() {
    $('#trustee-team').attr('src','http://www.hoffmannfoundation.org.uk/images/trusteesButton.jpg');
    $('#all-team').attr('src','http://www.hoffmannfoundation.org.uk/images/allButtonoff.png');
    $('#senior-team').attr('src','http://www.hoffmannfoundation.org.uk/images/seniorManagementButton.jpg');

    $(this).attr('src','http://www.hoffmannfoundation.org.uk/images/trusteesButtonon.png');

    $('#text-area').fadeOut('slow', function() {
      trusteePositon();
      $('.team-text').hide();
    })
})

$('#all-team').click(function() {

    $('#trustee-team').attr('src','http://www.hoffmannfoundation.org.uk/images/trusteesButton.jpg');
    $('#all-team').attr('src','http://www.hoffmannfoundation.org.uk/images/allButtonoff.png');
    $('#senior-team').attr('src','http://www.hoffmannfoundation.org.uk/images/seniorManagementButton.jpg');

    $(this).attr('src','http://www.hoffmannfoundation.org.uk/images/allButton.jpg');

    $('#text-area').fadeOut('slow', function() {
       allTeamPosition();
       $('.team-text').hide();
    })
})

$('#senior-team').click(function() {

    $('#trustee-team').attr('src','http://www.hoffmannfoundation.org.uk/images/trusteesButton.jpg');
    $('#all-team').attr('src','http://www.hoffmannfoundation.org.uk/images/allButtonoff.png');
    $('#senior-team').attr('src','http://www.hoffmannfoundation.org.uk/images/seniorManagementButton.jpg');

    $(this).attr('src','http://www.hoffmannfoundation.org.uk/images/seniorManagementButtonon.png');

    $('#text-area').fadeOut('slow', function() {
       seniorPosition();
         $('.team-text').hide();
    })
})



/*Art Centre */

$('#art-centre #plus1').click(function() {
    if($('#art-centre #staff').height() > 35){

        $('#art-centre #staff').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus1').attr('src', 'images/plusClickable.jpg');
        $('#plus1').attr('alt', 'Read More');
    }else if($('#art-centre #staff').height() <= 35){
        $('#art-centre #staff').animate({
            height: $('#staff-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus1').attr('src', 'images/minusClickable.jpg');
        $('#plus1').attr('alt', 'Hide');
    }
});

$('#art-centre #plus2').click(function() {
    if($('#art-centre #art-crafts').height() > 35){

        $('#art-centre #art-crafts').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus2').attr('src', 'images/plusClickable.jpg');
        $('#plus2').attr('alt', 'Read More');
    }else if($('#art-centre #art-crafts').height() <= 35){
        $('#art-centre #art-crafts').animate({
            height: $('#art-crafts-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus2').attr('src', 'images/minusClickable.jpg');
        $('#plus2').attr('alt', 'Hide');
    }
});


$('#art-centre #plus3').click(function() {
    if($('#art-centre #comp').height() > 35){

        $('#art-centre #comp').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus3').attr('src', 'images/plusClickable.jpg');
        $('#plus3').attr('alt', 'Read More');
    }else if($('#art-centre #comp').height() <= 35){
        $('#art-centre #comp').animate({
            height: $('#comp-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus3').attr('src', 'images/minusClickable.jpg');
        $('#plus3').attr('alt', 'Hide');
    }
});


$('#art-centre #plus4').click(function() {
    if($('#art-centre #location').height() > 35){

        $('#art-centre #location').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus4').attr('src', 'images/plusClickable.jpg');
        $('#plus4').attr('alt', 'Read More');
    }else if($('#art-centre #location').height() <= 35){
        $('#art-centre #location').animate({
            height: $('#location-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus4').attr('src', 'images/minusClickable.jpg');
        $('#plus4').attr('alt', 'Hide');
    }
});

/*pyschology */


$('#pyschology #plus1').click(function() {
    if($('#pyschology #role').height() > 35){

        $('#pyschology #role').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus1').attr('src', 'images/plusClickable.jpg');
        $('#plus1').attr('alt', 'Read More');
    }else if($('#pyschology #role').height() <= 35){
        $('#pyschology #role').animate({
            height: $('#role-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus1').attr('src', 'images/minusClickable.jpg');
        $('#plus1').attr('alt', 'Hide');
    }
});




$('#pyschology #plus2').click(function() {
    if($('#pyschology #pyschology-manager').height() > 35){

        $('#pyschology #pyschology-manager').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus2').attr('src', 'images/plusClickable.jpg');
        $('#plus2').attr('alt', 'Read More');
    }else if($('#pyschology #pyschology-manager').height() <= 35){
        $('#pyschology #pyschology-manager').animate({
            height: $('#pyschology-manager-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus2').attr('src', 'images/minusClickable.jpg');
        $('#plus2').attr('alt', 'Hide');
    }
});

$('#pyschology #plus3').click(function() {
    if($('#pyschology #behave').height() > 35){

        $('#pyschology #behave').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus3').attr('src', 'images/plusClickable.jpg');
        $('#plus3').attr('alt', 'Read More');
    }else if($('#pyschology #behave').height() <= 35){
        $('#pyschology #behave').animate({
            height: $('#behave-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus3').attr('src', 'images/minusClickable.jpg');
        $('#plus3').attr('alt', 'Hide');
    }
});



$('#pyschology #plus4').click(function() {
    if($('#pyschology #our-pyschologists').height() > 35){

        $('#pyschology #our-pyschologists').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus4').attr('src', 'images/plusClickable.jpg');
        $('#plus4').attr('alt', 'Read More');
    }else if($('#pyschology #our-pyschologists').height() <= 35){
        $('#pyschology #our-pyschologists').animate({
            height: $('#our-pyschologists-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus4').attr('src', 'images/minusClickable.jpg');
        $('#plus4').attr('alt', 'Hide');
    }
});

$('#pyschology #plus5').click(function() {
    if($('#pyschology #social-skills').height() > 35){

        $('#pyschology #social-skills').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus5').attr('src', 'images/plusClickable.jpg');
        $('#plus5').attr('alt', 'Read More');
    }else if($('#pyschology #social-skills').height() <= 35){
        $('#pyschology #social-skills').animate({
            height: $('#social-skills-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus5').attr('src', 'images/minusClickable.jpg');
        $('#plus5').attr('alt', 'Hide');
    }
});


$('#pyschology #plus6').click(function() {
    if($('#pyschology #diagnostic').height() > 35){

        $('#pyschology #diagnostic').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus6').attr('src', 'images/plusClickable.jpg');
        $('#plus6').attr('alt', 'Read More');
    }else if($('#pyschology #diagnostic').height() <= 35){
        $('#pyschology #diagnostic').animate({
            height: $('#diagnostic-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus6').attr('src', 'images/minusClickable.jpg');
        $('#plus6').attr('alt', 'Hide');
    }
});

$('#pyschology #plus7').click(function() {
    if($('#pyschology #applied-behave').height() > 35){
        $('#pyschology #applied-behave').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus7').attr('src', 'images/plusClickable.jpg');
        $('#plus7').attr('alt', 'Read More');
    }else if($('#pyschology #applied-behave').height() <= 35){
        $('#pyschology #applied-behave').animate({
            height: $('#applied-behave-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus7').attr('src', 'images/minusClickable.jpg');
        $('#plus7').attr('alt', 'Hide');
    }
});

$('#pyschology #plus8').click(function() {
    if($('#pyschology #training').height() > 35){
        $('#pyschology #training').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus8').attr('src', 'images/plusClickable.jpg');
        $('#plus8').attr('alt', 'Read More');
    }else if($('#pyschology #training').height() <= 35){
        $('#pyschology #training').animate({
            height: $('#training-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus8').attr('src', 'images/minusClickable.jpg');
        $('#plus8').attr('alt', 'Hide');
    }
});

$('#pyschology #plus20').click(function() {
    if($('#pyschology #counselling').height() > 35){
        $('#pyschology #counselling').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus20').attr('src', 'images/plusClickable.jpg');
        $('#plus20').attr('alt', 'Read More');
    }else if($('#pyschology #counselling').height() <= 35){
        $('#pyschology #counselling').animate({
            height: $('#counselling-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus20').attr('src', 'images/minusClickable.jpg');
        $('#plus20').attr('alt', 'Hide');
    }
});










$('#pyschology #plus9').click(function() {
    if($('#pyschology #refferral-assessment').height() > 35){
        $('#pyschology #refferral-assessment').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus9').attr('src', 'images/plusClickable.jpg');
        $('#plus9').attr('alt', 'Read More');
    }else if($('#pyschology #refferral-assessment').height() <= 35){
        $('#pyschology #refferral-assessment').animate({
            height: $('#refferral-assessment-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus9').attr('src', 'images/minusClickable.jpg');
        $('#plus9').attr('alt', 'Hide');
    }
});

$('#pyschology #plus10').click(function() {
    if($('#pyschology #research-hoffmann').height() > 35){
        $('#pyschology #research-hoffmann').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus10').attr('src', 'images/plusClickable.jpg');
        $('#plus10').attr('alt', 'Read More');
    }else if($('#pyschology #research-hoffmann').height() <= 35){
        $('#pyschology #research-hoffmann').animate({
            height: $('#research-hoffmann-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus10').attr('src', 'images/minusClickable.jpg');
        $('#plus10').attr('alt', 'Hide');
    }
});


/* Job Vacancies */
$('#job-vacancies #plus1').click(function() {
    if($('#job-vacancies #hoffmann-job-vacancies').height() > 35){
        $('#job-vacancies #hoffmann-job-vacancies').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus1').attr('src', 'images/plusClickable.jpg');
        $('#plus1').attr('alt', 'Read More');
    }else if($('#job-vacancies #hoffmann-job-vacancies').height() <= 35){
        $('#job-vacancies #hoffmann-job-vacancies').animate({
            height: $('#hoffmann-job-vacancies-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus1').attr('src', 'images/minusClickable.jpg');
        $('#plus1').attr('alt', 'Hide');
    }
});


$('#job-vacancies #plus2').click(function() {
    if($('#job-vacancies #current-jobs').height() > 35){
        $('#job-vacancies #current-jobs').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus2').attr('src', 'images/plusClickable.jpg');
        $('#plus2').attr('alt', 'Read More');
    }else if($('#job-vacancies #current-jobs').height() <= 35){
        $('#job-vacancies #current-jobs').animate({
            height: $('#current-jobs-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus2').attr('src', 'images/minusClickable.jpg');
        $('#plus2').attr('alt', 'Hide');
    }
});

/*services page */
$('#services #plus1').click(function() {
    if($('#services #hoffmann-services').height() > 35){
        $('#services #hoffmann-services').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus1').attr('src', 'images/plusClickable.jpg');
        $('#plus1').attr('alt', 'Read More');
    }else if($('#services #hoffmann-services').height() <= 35){
        $('#services #hoffmann-services').animate({
            height: $('#hoffmann-services-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus1').attr('src', 'images/minusClickable.jpg');
        $('#plus1').attr('alt', 'Hide');
    }
});

$('#services #plus2').click(function() {
    if($('#services #our-approach').height() > 35){
        $('#services #our-approach').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus2').attr('src', 'images/plusClickable.jpg');
        $('#plus2').attr('alt', 'Read More');
    }else if($('#services #our-approach').height() <= 35){
        $('#services #our-approach').animate({
            height: $('#our-approach-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus2').attr('src', 'images/minusClickable.jpg');
        $('#plus2').attr('alt', 'Hide');
    }
});


$('#services #plus3').click(function() {
    if($('#services #challenges').height() > 35){
        $('#services #challenges').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus3').attr('src', 'images/plusClickable.jpg');
        $('#plus3').attr('alt', 'Read More');
    }else if($('#services #challenges').height() <= 35){
        $('#services #challenges').animate({
            height: $('#challenges-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus3').attr('src', 'images/minusClickable.jpg');
        $('#plus3').attr('alt', 'Hide');
    }
});

$('#services #plus4').click(function() {
    if($('#services #the-future').height() > 35){
        $('#services #the-future').animate({
            height: '35px'
        }, 1000, function() {})
        $('#plus4').attr('src', 'images/plusClickable.jpg');
        $('#plus4').attr('alt', 'Read More');
    }else if($('#services #the-future').height() <= 35){
        $('#services #the-future').animate({
            height: $('#the-future-text').height()+ 60 +'px'
        }, 1000, function() {})
        $('#plus4').attr('src', 'images/minusClickable.jpg');
        $('#plus4').attr('alt', 'Hide');
    }
});


/* Nav Jquery*/
$("#menu ul li").hover(
    function () {
        $(this).addClass("hover");
    },
    function () {
        $(this).removeClass("hover");
    }
    );

$("#menu #home").hover(
    function () {
        $("#home-left").css("visibility","visible");
        $("#home-right").css("visibility","visible");
    },
    function () {
         $("#home-left").css("visibility","hidden");
        $("#home-right").css("visibility","hidden");
    }
    );

$("#menu #about-us-nav").hover(
    function () {
        $("#about-left").css("visibility","visible");
        $("#about-right").css("visibility","visible");
    },
    function () {
         $("#about-left").css("visibility","hidden");
        $("#about-right").css("visibility","hidden");
    }
    );

$("#menu #about-autism-nav").hover(
    function () {
        $("#about-autism-left").css("visibility","visible");
        $("#about-autism-right").css("visibility","visible");
    },
    function () {
         $("#about-autism-left").css("visibility","hidden");
        $("#about-autism-right").css("visibility","hidden");
    }
    );


        $("#menu #services-nav").hover(
    function () {
        $("#services-left").css("visibility","visible");
        $("#services-right").css("visibility","visible");
    },
    function () {
         $("#services-left").css("visibility","hidden");
        $("#services-right").css("visibility","hidden");
    }
    );

       $("#menu #news-nav").hover(
    function () {
        $("#news-left").css("visibility","visible");
        $("#news-right").css("visibility","visible");
    },
    function () {
         $("#news-left").css("visibility","hidden");
        $("#news-right").css("visibility","hidden");
    }
    );

             $("#menu #pyschology-nav").hover(
    function () {
        $("#pyschology-left").css("visibility","visible");
        $("#pyschology-right").css("visibility","visible");
    },
    function () {
         $("#pyschology-left").css("visibility","hidden");
        $("#pyschology-right").css("visibility","hidden");
    }
    );


            $("#menu #get-involved-nav").hover(
    function () {
        $("#get-involved-left").css("visibility","visible");
        $("#get-involved-right").css("visibility","visible");
    },
    function () {
         $("#get-involved-left").css("visibility","hidden");
        $("#get-involved-right").css("visibility","hidden");
    }
    );


 $("#menu #contact-nav").hover(
    function () {
        $("#contact-left").css("visibility","visible");
        $("#contact-right").css("visibility","visible");
    },
    function () {
         $("#contact-left").css("visibility","hidden");
        $("#contact-right").css("visibility","hidden");
    }
    );


/*Accessibility toolbar */

$("#tool-bar #home-icon-toolbar").hover(
    function () {
        $(this).attr("src","images/toolBarHomeIcon-on.png");
    },
    function () {
        $(this).attr("src","images/toolBarHomeIcon.png");
    }
 );

$("#tool-bar #small").hover(function(){
       if($(this).attr('src') != "http://www.hoffmannfoundation.org.uk/images/smallTextoff.png"){
           $(this).attr("src","images/smallTextoff2.png");
        }
    },
    function () {
        if($(this).attr('src') == "images/smallTextoff2.png"){
           $(this).attr("src","http://www.hoffmannfoundation.org.uk/images/smallTextOn.png");
        }
    }
 );



$("#tool-bar #medium").hover(
    function () {
        if($(this).attr('src') != "http://www.hoffmannfoundation.org.uk/images/mediumTextOff-on.png"){
           $(this).attr("src","images/mediumTextOff-on2.png");
        }
    },
    function () {
        if($(this).attr('src') == "images/mediumTextOff-on2.png"){
           $(this).attr("src","images/mediumTextoff.png");
        }
     
    }
 );

$("#tool-bar #big").hover(
    function () {
        $(this).attr("src","images/bigTextOff-on.png");
    },
    function () {
        $(this).attr("src","images/bigTextOff.png");
    }
 );


    /* $("#tool-bar #share").hover(
    function () {
        $(this).attr("src","images/shareToolbarOff-on.png");
    },
    function () {
        $(this).attr("src","images/shareToolbarOff.png");
    }
 ); */


     $("#tool-bar #twitter-toolbar").hover(
    function () {
        $(this).attr("src","images/twitterToolbaron.png");
    },
    function () {
        $(this).attr("src","images/twitterToolbarOff.png");
    }
 );

        $("#tool-bar #facebook-toolbar").hover(
    function () {
        $(this).attr("src","images/facebookToolbaron.png");
    },
    function () {
        $(this).attr("src","images/facebookToolbarOff.png");
    }
 );
    $("#tool-bar #donate-toolbar").hover(
    function () {
        $(this).attr("src","images/donateToolbarOff-on.png");
    },
    function () {
        $(this).attr("src","images/donateToolbaroff.png");
    }
 );



$('#tool-bar #small').click(function() {    
        $('#style-chooser').val('layout1');
        $('#stylesheet-form').submit();
    })

    $('#tool-bar #medium').click(function() {
        $('#style-chooser').val('layout2');
        $('#stylesheet-form').submit();
    })

    $('#tool-bar #big').click(function() {
        $('#style-chooser').val('layout3');
        $('#stylesheet-form').submit();
    })






