 $(document).ready(function(){
                function pageload(hash) {
                    var contents = 0;
                    // hash doesn't contain the first # character.
                    if(hash) {
                        var page_title = $('a[href=#' + hash + ']:eq(0)').attr('title');
                        hash = hash.replace(/^!\//, '');                        
                        if(hash == 'contact-us'){
                            $('title').text(page_title + ' | ACCOLADO');
                            if($('div#home-page').css('display') == 'none'){                                
                                $('div.page').slideUp(1500);
                                $('div#home-page').slideDown(1500);
                            }
                            contents = $('div#contact-us').offset();
                            $('html,body').animate({scrollTop: contents.top}, 1500);
                        }else{
                            if(!hash.length){
                                hash = 'home-page';
                                $('html,body').animate({scrollTop: '0'}, 1500);
                            }else{
                                contents = $('div#contents').offset();
                                $('html,body').animate({scrollTop: contents.top}, 1500);
                            }
                            if($('div#' + hash).css('display') == 'none'){
                                $('title').text(page_title + ' | ACCOLADO');
                                $('div.page').slideUp(1500);
                                $('div#' + hash).slideDown(1500);
                            }
                        }
                    }
                } 

                // Initialize history plugin.
		
                // Lightbox
                
                
                // hide #back-top first
                $("#back-top").hide();

                // fade in #back-top
                $(function () {
                    $(window).scroll(function () {
                        if ($(this).scrollTop() > 100) {
                            $('#back-top').fadeIn();
                        } else {
                            $('#back-top').fadeOut();
                        }
                    });

                    // scroll body to 0px on click
                    $('#back-top a').click(function () {
                        $('body,html').animate({
                            scrollTop: 0
                        }, 800);
                        return false;
                    });
                });

            });
