
Function.prototype.bind = function( scope ) {
    var func = this;
    return function() {
        return func.apply( scope, arguments );
    }
};

window.chapman = {};

$(function() {

    $( '.productfull .images' ).each(function() {
        var shopProductImages = new chapman.ShopProductImages({
            container: $( this )
        });
        shopProductImages.init();
    });

    $( '#menu li' )
        .mouseover(function() {
            $( this ).addClass( 'hover' );
        })
        .mouseout(function() {
            $( this ).removeClass( 'hover' );
        });

    $( '.carousel' ).jcarousel();
    
    $( ".tweet" ).tweet({
        username: "ChapmanPhysio",
        join_text: "auto",
        avatar_size: 32,
        count: 5,
        filter: function(t){ return ! /^@\w+/.test(t["tweet_raw_text"]); },
        auto_join_text_default: "we said,",
        auto_join_text_ed: "we",
        auto_join_text_ing: "we were",
        auto_join_text_reply: "we replied to",
        auto_join_text_url: "we were checking out",
        loading_text: "Loading tweets..."
    });

});
