﻿
App.ProductGallery = function() {

    /* Private */

    /* Properties */

    var cmp = {};





    /* Methods */

    var init = function() {

        /* Constructor */

        // Add padding and clearing to the product gallery
        $('#productGallery .galleryItem:nth-child(3n-1), #productGallery .galleryItem:nth-child(3n-2)').addClass('notLast');
        $('#productGallery .galleryItem:nth-child(3n)').after('<div class="clear"></div>');

        // Add reflections
        //setTimeout(addReflections, 100);

    };


    var addReflections = function(){
        $('#productGallery .galleryItem IMG').each(function() {
            Reflection.add($(this)[0], { height: 1 / 4, opacity: 1 / 3 });
        });
    
    }


    /* Public */

    TVI.apply(cmp, {

        /* Properties */

        test: 'test',

        /* Methods */

        test: function() {

            /* Test function  */

        }

    });


    TVI.ready(init);


    return cmp;


} ();
