$(document).ready(function(){
        $(".trigger a").toggle(function() { $("#top-shelf").animate({ height: "toggle" }, 700), $("#container").animate({ height: "toggle" }, 700);
        $(this).parent().addClass("on"); }, function() { $("#top-shelf").animate({height: "toggle" }, 700), $("#container").animate({height: "toggle" }, 700);
    });
        //Hide the tooglebox when page load
        $(".thumb-slide").hide();
        //slide up and down when hover over heading 2
        $(".image").hover(function(){
        // slide toggle effect set to slow you can set it to fast too.
        $(this).find(".thumb-slide").slideToggle('fast');
        return false;
    });

    // FADE IT !    
    $(function(){
        $('#wrapper, #footer').fadeIn('slow');
            
            $("a[href^=http]").each(
                function(){
                    if(this.href.indexOf(location.hostname) == -1) {
                        $(this).attr('target', '_blank');
                    }
                }
            );
    });
});


$(window).load(function(){
    $(function(){
        $('#wrapper').masonry({
        columnWidth: 1,
        singleMode: false,
        itemSelector: '.box, .single-box'
    });
     
            
            //smoothscroll
            $('#top-link').click(function(e) {
                e.preventDefault();
                $.scrollTo(0,300);
            });

    });
});


