﻿var HELIENE = HELIENE || {};

HELIENE.BannerController2 = {
    banners: [],
    endlessClouds: function () {
        var that = this;
        $('#clouds').animate({ 'background-position': '-=10000px' }, 400000, 'linear', function () {
            that.endlessClouds();
        });
    },
    init: function () {
        this.endlessClouds();

        $('#animated-text').appendTo('#hd');

        HELIENE.BannerController.init();
        HELIENE.BannerController.bannerLoaded('/images/splash/1.jpg')
    }
};

$(document).ready(function () {

    //Use this function to center the blockUI dialog (make this call after blockUI is used: $('.blockUI.blockMsg').blockUICenter();)
    $.fn.blockUICenter = function () {
        this.css("position", "absolute");
        this.css("top", ($(window).height() - this.height()) / 2 + $(window).scrollTop() + "px");
        this.css("left", ($(window).width() - this.width()) / 2 + $(window).scrollLeft() + "px");
        return this;
    }

    //blockUI defaults
    $.blockUI.defaults.css.border = 'none';
    $.blockUI.defaults.css.width = 'auto';
    $.blockUI.defaults.css.backgroundColor = 'transparent';
    $.blockUI.defaults.css.cursor = 'auto';

    //newsletter form link
    $('#newsletter-form-link').click(function (e) {
        e.preventDefault();
        $.blockUI({ message: $('#modal-newsletter') });
        $('.blockUI.blockMsg').blockUICenter();
    });

    //contact inquire form links
    $('.contact-form-link').click(function (e) {
        e.preventDefault();
        $.blockUI({ message: $('#modal-contact') });
        $('.blockUI.blockMsg').blockUICenter();
    });

    //downloads nav related
    initDownloadsNav();

    HELIENE.BannerController2.init();
});

function initDownloadsNav() {

    //force hover style on top nave link
    $("#downloads-nav").mouseenter(function () {
        $("#downloads-nav-link").addClass("downloads-nav-link-on");
        return false;
    }).mouseleave(function () {
        $("#downloads-nav-link").removeClass("downloads-nav-link-on");
        return false;
    });

    //nav display
    $(" #downloads-nav ul ").css({ display: "none" }); // Opera Fix
    $(" #downloads-nav li").hover(function () {
        $(this).find('ul:first').css({ visibility: "visible", display: "none" }).show();
    }, function () {
        $(this).find('ul:first').css({ visibility: "hidden" });
    });

}

//common functions
function modalUnblockUI() {
    $.unblockUI();
}

HELIENE = HELIENE || {};

HELIENE.Banners = {
    $bannerNav: null,
    $bannerContainer: null,
    numberOfBanners: 0,
    numberOfBannersShown: 1,
    activeBannerIndex: 0,
    duration: 5000,
    fadeInDuration: 500,
    fadeOutDuration: 500,
    bannerLoaded: null,
    bannerUnloaded: null,
    isTransitioning: false,
    init: function () {
        this.$bannerNav = $('#banner-nav');
        if (this.$bannerNav.length) {
            this.$bannerContainer = $('#splash-banner-rotations');
            this.preload();
            this.numberOfBanners = $('a', this.$bannerNav).length;
            this.activeBannerIndex = $('.active', this.$bannerNav).index();
            this.checkForUrl();
            if (this.numberOfBanners > 1) {
                this.$bannerNav.show(); // show all dots                        
                this.slideShow();
                // handle events
                $('a', this.$bannerNav).click(this.onNavClick);
            }
        }
    },
    preload: function () {
        var i, image,
			preloaders = this.$bannerNav.find('a:not(.active)').map(function () {
			    return $(this).attr('rel');
			});

        if (preloaders) {
            image = new Image();
            for (i = 0; i < preloaders.length; i++) {
                image.src = preloaders[i];
            }
        }
    },
    checkForUrl: function () {
        // temporary: fixes bug where url not attached to the default banner, and a blank url attached to banners without a url
        var $imgDot = $('a:eq(' + HELIENE.Banners.activeBannerIndex + ')', HELIENE.Banners.$bannerNav),
			$banner = HELIENE.Banners.$bannerContainer.find('img:eq(0)');

        if ($banner.parent().is('a')) {
            $banner.parent().attr('href', $imgDot.attr('href'));
        } else {
            $banner.wrap('<a href="' + $imgDot.attr("href") + '" />');
        }
    },
    slideShow: function () {
        HELIENE.Banners.loadBanner();
        HELIENE.Banners.bannerTimerId = setInterval(function () {
            if (HELIENE.Banners.numberOfBannersShown === HELIENE.Banners.numberOfBanners) {
                clearInterval(HELIENE.Banners.bannerTimerId);
            } else {
                HELIENE.Banners.numberOfBannersShown++;
                HELIENE.Banners.activeBannerIndex++;
                if (HELIENE.Banners.activeBannerIndex === HELIENE.Banners.numberOfBanners) {
                    HELIENE.Banners.activeBannerIndex = 0;
                }
                HELIENE.Banners.loadBanner();
            }
        }, HELIENE.Banners.duration);

    },
    loadBanner: function () {

        var $imgDot = $('a:eq(' + HELIENE.Banners.activeBannerIndex + ')', HELIENE.Banners.$bannerNav),
			$banner = HELIENE.Banners.$bannerContainer.find('img:eq(0)');

        // do not allow banner change while one is already in progress
        if (HELIENE.Banners.isTransitioning === false) {
            HELIENE.Banners.isTransitioning = true;
        }

        // callback 
        if (typeof HELIENE.Banners.bannerUnloaded === 'function') {
            HELIENE.Banners.bannerUnloaded($banner.attr('src'));
        }

        $banner.fadeOut(HELIENE.Banners.fadeOutDuration, function () {
            // remove anchor if it exists
            if ($banner.parent().is('a')) {
                $banner.unwrap();
            }

            // set banner
            $banner.attr({
                src: $imgDot.attr('rel'),
                title: $imgDot.attr('title'),
                alt: $imgDot.attr('title')
            }).fadeIn(HELIENE.Banners.fadeInDuration, function () {
                // wrap with anchor if one exists
                if ($imgDot.attr('href') !== $imgDot.attr('rel')) {
                    $banner.wrap('<a href="' + $imgDot.attr("href") + '" />');
                }
                // callback 
                if (typeof HELIENE.Banners.bannerLoaded === 'function') {
                    HELIENE.Banners.bannerLoaded($imgDot.attr('rel'));
                }
                HELIENE.Banners.isTransitioning = false;
            });

            // set dots
            $imgDot.addClass('active').siblings().removeClass('active');
        });
    },
    onNavClick: function (e) {
        e.preventDefault();
        if (!$(this).hasClass('active') && HELIENE.Banners.isTransitioning !== true) {
            clearInterval(HELIENE.Banners.bannerTimerId);
            HELIENE.Banners.activeBannerIndex = $(this).index();
            $(this).addClass('active').siblings().removeClass('active');
            HELIENE.Banners.loadBanner();
        }
    }
};






















































if (typeof Object.create !== 'function') {
    Object.create = function (o) {
        function F() { };
        F.prototype = o;
        return new F();
    };
}

HELIENE.Publisher = {
    subscribers: {
        any: []
    },
    subscribe: function (fn, type, context) {
        type = type || 'any';
        fn = typeof fn === 'function' ? fn : context[fn];

        if (typeof this.subscribers[type] === 'undefined') {
            this.subscribers[type] = [];
        }
        this.subscribers[type].push({ fn: fn, context: context || this });
    },
    fire: function (type, arg) {
        this.notifySubscribers('publish', type, arg);
    },
    notifySubscribers: function (action, type, arg, context) {
        var pubtype = type || 'any',
            subscribers = this.subscribers[pubtype],
            i,
            max = subscribers ? subscribers.length : 0;

        for (i = 0; i < max; i += 1) {
            if (action === 'publish') {
                subscribers[i].fn.call(subscribers[i].context, arg);
            }
        }
    },
    makePublisher: function (o) {
        var i;
        for (i in HELIENE.Publisher) {
            if (HELIENE.Publisher.hasOwnProperty(i) && typeof HELIENE.Publisher[i] === 'function') {
                o[i] = HELIENE.Publisher[i];
            }
        }
        o.subscribers = { any: [] };
    }
};

HELIENE.Navigation = {

    init: function () {
        this.initNav();

        // click listeners
        $("#nav > li").click(this.onNavClick);
        $("#brandnav-right >li").mouseover(this.onBrandNavMouseOver);
        $("#brandnav-right >li").mouseout(this.onBrandNavMouseOut);

    },

    initNav: function () {
        var relativePath = document.location.pathname.replace(/\/([\w\-]+\.aspx)*$/, ''),
			$navItem = $('#nav a[href^="' + relativePath + '"]');
        if ($navItem.length > 0) {
            $navItem.parent().addClass("selected");
        }
    },

    onBrandNavMouseOver: function (e) {
        $(this).addClass("hover");
    },

    onBrandNavMouseOut: function (e) {
        $(this).removeClass("hover");
    }
};

/**
* --------------------------------------------------------------------
* jQuery-Plugin "pngFix"
* Version: 1.2, 09.03.2009
* by Andreas Eberhard, andreas.eberhard@gmail.com
*                      http://jquery.andreaseberhard.de/
*
* Copyright (c) 2007 Andreas Eberhard
* Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
*
* Changelog:
*    09.03.2009 Version 1.2
*    - Update for jQuery 1.3.x, removed @ from selectors
*    11.09.2007 Version 1.1
*    - removed noConflict
*    - added png-support for input type=image
*    - 01.08.2007 CSS background-image support extension added by Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com
*    31.05.2007 initial Version 1.0
* --------------------------------------------------------------------
* @example $(function(){$(document).pngFix();});
* @desc Fixes all PNG's in the document on document.ready
*
* jQuery(function(){jQuery(document).pngFix();});
* @desc Fixes all PNG's in the document on document.ready when using noConflict
*
* @example $(function(){$('div.examples').pngFix();});
* @desc Fixes all PNG's within div with class examples
*
* @example $(function(){$('div.examples').pngFix( { blankgif:'ext.gif' } );});
* @desc Fixes all PNG's within div with class examples, provides blank gif for input with png
* --------------------------------------------------------------------
*/

(function ($) {

    jQuery.fn.pngFix = function (settings) {

        // Settings
        settings = jQuery.extend({
            blankgif: '/style/resources/blank.gif'
        }, settings);

        var ie55 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1);
        var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);

        if (jQuery.browser.msie && parseInt($.browser.version) < 9) {

            //fix images with png-source
            jQuery(this).find('img[src$=".png"]').each(function () {

                jQuery(this).attr('width', jQuery(this).width());
                jQuery(this).attr('height', jQuery(this).height());

                var prevStyle = '';
                var strNewHTML = '';
                var imgId = (jQuery(this).attr('id')) ? 'id="' + jQuery(this).attr('id') + '" ' : '';
                var imgClass = (jQuery(this).attr('class')) ? 'class="' + jQuery(this).attr('class') + '" ' : '';
                var imgTitle = (jQuery(this).attr('title')) ? 'title="' + jQuery(this).attr('title') + '" ' : '';
                var imgAlt = (jQuery(this).attr('alt')) ? 'alt="' + jQuery(this).attr('alt') + '" ' : '';
                var imgAlign = (jQuery(this).attr('align')) ? 'float:' + jQuery(this).attr('align') + ';' : '';
                var imgHand = (jQuery(this).parent().attr('href')) ? 'cursor:hand;' : '';
                if (this.style.border) {
                    prevStyle += 'border:' + this.style.border + ';';
                    this.style.border = '';
                }
                if (this.style.padding) {
                    prevStyle += 'padding:' + this.style.padding + ';';
                    this.style.padding = '';
                }
                if (this.style.margin) {
                    prevStyle += 'margin:' + this.style.margin + ';';
                    this.style.margin = '';
                }
                var imgStyle = (this.style.cssText);

                strNewHTML += '<span ' + imgId + imgClass + imgTitle + imgAlt;
                strNewHTML += 'style="position:relative;white-space:pre-line;display:inline-block;background:transparent;' + imgAlign + imgHand;
                strNewHTML += 'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;';
                strNewHTML += 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + jQuery(this).attr('src') + '\', sizingMethod=\'scale\');';
                strNewHTML += imgStyle + '"></span>';
                if (prevStyle != '') {
                    strNewHTML = '<span style="position:relative;display:inline-block;' + prevStyle + imgHand + 'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;' + '">' + strNewHTML + '</span>';
                }

                jQuery(this).hide();
                jQuery(this).after(strNewHTML);

            });

            // fix css background pngs
            jQuery(this).find("*").each(function () {
                var bgIMG = jQuery(this).css('background-image');
                if (bgIMG.indexOf(".png") != -1) {
                    var iebg = bgIMG.split('url("')[1].split('")')[0];
                    jQuery(this).css('background-image', 'none');
                    jQuery(this).get(0).runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + iebg + "',sizingMethod='scale')";
                }
            });

            //fix input with png-source
            jQuery(this).find('input[src$=".png"]').each(function () {
                var bgIMG = jQuery(this).attr('src');
                jQuery(this).get(0).runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + bgIMG + '\', sizingMethod=\'scale\');';
                jQuery(this).attr('src', settings.blankgif)
            });

        }

        return jQuery;

    };

})(jQuery);


///
// HELIENE Animated Banners
///

HELIENE.AnimatedBanner = function () {
    this._active = false;
    this._beatDuration = 1000;
    this.imageUrl = '';
    this.container$ = $('#animated-text');
    this.wrapperSelector = '.aBanner';
};

HELIENE.AnimatedBanner.prototype.initialize = function () {
    var wrapperMarkup,
		navButton$ = $('a[rel="' + this.imageUrl + '"]', HELIENE.Banners.$bannerNav);

    if (navButton$.length && navButton$.attr('rel') !== navButton$.attr('href')) {
        this.url = navButton$.attr('href');
    }

    wrapperMarkup = (this.url && this.url.length > 0) ? '<a href="' + this.url + '" class="' + this.wrapperSelector.substring(1) + '" />' : '<div class="' + this.wrapperSelector.substring(1) + '" />'
    this.wrapper$ = $(wrapperMarkup);

    if (!($.browser.msie && parseInt($.browser.version, 10) === 8)) {
        this.loadAssets();
    }
};

HELIENE.AnimatedBanner.prototype.addElement = function (element$) {
    return element$.appendTo(this.wrapper$);
};

HELIENE.AnimatedBanner.prototype.addItem = function (imageUrl, width, height) {
    var assetPath = this.assetPath,
		markup = (function () {
		    var m;
		    m = '<img src="' + assetPath + imageUrl + '"' + (width > 0 ? '" width="' + width + '"' : '') + (height > 0 ? ' height="' + height + '"' : '') + ' />';
		    m = '<div>' + m + '</div>';
		    return m;
		} ());
    return $(markup).appendTo(this.wrapper$);
};

HELIENE.AnimatedBanner.prototype.enqueue = function () {
    var elem$, obj, dur,
		wrapper$ = this.wrapper$;

    if (arguments.length === 1) {
        wrapper$.queue(arguments[0]);
    } else {
        elem$ = arguments[0];
        obj = arguments[1];
        dur = arguments[2] ? arguments[2] : this._beatDuration;
        wrapper$.queue(function () {
            elem$.animate(obj, dur, function () { wrapper$.dequeue(); }).pngFix();
        });
    }
    return this;
};

HELIENE.AnimatedBanner.prototype.show = function (imageUrl) {
    this._active = (this.imageUrl === imageUrl);
    if (this._active === true) {
        this.wrapper$.show();
        if ($.browser.msie && parseInt($.browser.version, 10) === 8) {
            this.loadAssets();
        }
        this.container$.append(this.wrapper$);
        this.setPositions();
        this.animate();
    }
};

HELIENE.AnimatedBanner.prototype.hide = function (imageUrl) {
    this._active = (this.imageUrl === imageUrl);
    if (this._active === true) {
        this.wrapper$.remove().clearQueue();
        if ($.browser.msie && parseInt($.browser.version, 10) === 8) {
            this.wrapper$.empty();
        }
    }
};

HELIENE.BannerController = {
    banners: [],
    bannerLoaded: function (imageUrl) {
        HELIENE.BannerController.fire('bannerLoaded', imageUrl);
    },
    bannerUnloaded: function (imageUrl) {
        HELIENE.BannerController.fire('bannerUnloaded', imageUrl);
    },
    init: function () {
        var i = 0,
			proto = new HELIENE.AnimatedBanner(),
			addBanner = function (options) {
			    var banner = Object.create(proto),
					settings = $.extend({
					    imageUrl: '',
					    assetPath: '',
					    loadAssets: function () { },
					    setPositions: function () { },
					    animate: function () { }
					}, options);

			    banner.imageUrl = settings.imageUrl;
			    banner.url = settings.url;
			    banner.assetPath = settings.assetPath;
			    banner.loadAssets = settings.loadAssets;
			    banner.setPositions = settings.setPositions;
			    banner.animate = settings.animate;
			    banner.initialize();
			    HELIENE.BannerController.banners.push(banner);
			};

        HELIENE.Publisher.makePublisher(this);

        addBanner({
            imageUrl: '/images/splash/1.jpg',
            assetPath: '/images/splash/banner1/',
            loadAssets: function () {
                this.welcome$ = this.addItem('welcome.png');
                this.ontario$ = this.addItem('ontario.png');
                this.made$ = this.addItem('made.png');
                this.photovoltaic$ = this.addItem('photovoltaic.png');
                this.solar$ = this.addItem('solar.png');
                this.modules$ = this.addItem('modules.png');

                this.dedicated$ = this.addItem('dedicated.png');
                this.clean$ = this.addItem('clean.png');

                this.greenEnery$ = this.addItem('green-energy.png');
                this.forCanadians$ = this.addItem('for-canadians.png');
                this.byCanadians$ = this.addItem('by-canadians.png');
                this.thatsOurCommitment$ = this.addItem('thats-our-commitment.png');
            },
            setPositions: function () {
                this.welcome$.css({ left: 0, top: 0, opacity: 0 });
                this.ontario$.css({ left: 82, top: 18, opacity: 0 });
                this.made$.css({ left: 162, top: 18, opacity: 0 });
                this.photovoltaic$.css({ left: 223, top: 18, opacity: 0 });
                this.solar$.css({ left: 356, top: 18, opacity: 0 });
                this.modules$.css({ left: 411, top: 18, opacity: 0 });

                this.dedicated$.css({ left: 0, top: 0, opacity: 0 });
                this.clean$.css({ left: 155, top: 18, opacity: 0 });

                this.greenEnery$.css({ left: 120, top: 0, opacity: 0 });
                this.forCanadians$.css({ left: 204, top: 0, opacity: 0 });
                this.byCanadians$.css({ left: 295, top: 0, opacity: 0 });
                this.thatsOurCommitment$.css({ left: 259, top: 18, opacity: 0 });
            },
            animate: function () {
                var banner = this,
                    beatDuration = banner._beatDuration;

                this.enqueue(this.welcome$, { opacity: 1 })
                    .enqueue(this.ontario$, { opacity: 1 })
                    .enqueue(this.made$, { opacity: 1 })
                    .enqueue(this.photovoltaic$, { opacity: 1 })
                    .enqueue(this.solar$, { opacity: 1 })
                    .enqueue(this.modules$, { opacity: 1 })
                    .enqueue(function () {
                        setTimeout(function () {
                        	if($.browser.msie && parseInt($.browser.version, 10) === 8) {
                                banner.welcome$.fadeOut(beatDuration).pngFix();
                                banner.ontario$.fadeOut(beatDuration).pngFix();
                                banner.made$.fadeOut(beatDuration).pngFix();
                                banner.photovoltaic$.fadeOut(beatDuration).pngFix();
                                banner.solar$.fadeOut(beatDuration).pngFix();
                                banner.modules$.fadeOut(beatDuration, function () { banner.wrapper$.dequeue(); }).pngFix();
                            } else {
                                banner.welcome$.animate({ opacity: 0 }, beatDuration).pngFix();
                                banner.ontario$.animate({ opacity: 0 }, beatDuration).pngFix();
                                banner.made$.animate({ opacity: 0 }, beatDuration).pngFix();
                                banner.photovoltaic$.animate({ opacity: 0 }, beatDuration).pngFix();
                                banner.solar$.animate({ opacity: 0 }, beatDuration).pngFix();
                                banner.modules$.animate({ opacity: 0 }, beatDuration, function () { banner.wrapper$.dequeue(); }).pngFix();
                            }
                        }, beatDuration * 2);
                    })
                    .enqueue(function () {
                        banner.dedicated$.animate({ opacity: 1, left: 80 }, beatDuration).pngFix();
                        banner.clean$.animate({ opacity: 1, left: 110 }, beatDuration, function () { banner.wrapper$.dequeue(); }).pngFix();
                    })
                    .enqueue(function () {
                        setTimeout(function () {
                            if($.browser.msie && parseInt($.browser.version, 10) === 8) {
                                banner.dedicated$.fadeOut(beatDuration).pngFix();
                                banner.clean$.fadeOut(beatDuration, function () { banner.wrapper$.dequeue(); }).pngFix();
                            } else {
                                banner.dedicated$.animate({ opacity: 0 }, beatDuration).pngFix();
                                banner.clean$.animate({ opacity: 0 }, beatDuration, function () { banner.wrapper$.dequeue(); }).pngFix();
                            }
                        }, beatDuration * 2);
                    })
                    .enqueue(this.greenEnery$, { opacity: 1 })
                    .enqueue(this.forCanadians$, { opacity: 1 })
                    .enqueue(this.byCanadians$, { opacity: 1 })
                    .enqueue(this.thatsOurCommitment$, { opacity: 1 })
                    .enqueue(function () {
                        setTimeout(function () {
                            if($.browser.msie && parseInt($.browser.version, 10) === 8) {
                                banner.greenEnery$.fadeOut(beatDuration).pngFix();
                                banner.forCanadians$.fadeOut(beatDuration).pngFix();
                                banner.byCanadians$.fadeOut(beatDuration).pngFix();
                                banner.thatsOurCommitment$.fadeOut(beatDuration, function () { banner.wrapper$.dequeue(); }).pngFix();
                            } else {
                                banner.greenEnery$.animate({ opacity: 0 }, beatDuration).pngFix();
                                banner.forCanadians$.animate({ opacity: 0 }, beatDuration).pngFix();
                                banner.byCanadians$.animate({ opacity: 0 }, beatDuration).pngFix();
                                banner.thatsOurCommitment$.animate({ opacity: 0 }, beatDuration, function () { banner.wrapper$.dequeue(); }).pngFix();
                            }
                        }, beatDuration * 2);
                    }).enqueue(function () {
                        setTimeout(function () {
                            if($.browser.msie && parseInt($.browser.version, 10) === 8) {
                                banner.welcome$.fadeIn(beatDuration).pngFix();
                                banner.ontario$.fadeIn(beatDuration).pngFix();
                                banner.made$.fadeIn(beatDuration).pngFix();
                                banner.photovoltaic$.fadeIn(beatDuration).pngFix();
                                banner.solar$.fadeIn(beatDuration).pngFix();
                                banner.modules$.fadeIn(beatDuration, function () { banner.wrapper$.dequeue(); }).pngFix();
                            } else {
                                banner.welcome$.animate({ opacity: 1 }, beatDuration).pngFix();
                                banner.ontario$.animate({ opacity: 1 }, beatDuration).pngFix();
                                banner.made$.animate({ opacity: 1 }, beatDuration).pngFix();
                                banner.photovoltaic$.animate({ opacity: 1 }, beatDuration).pngFix();
                                banner.solar$.animate({ opacity: 1 }, beatDuration).pngFix();
                                banner.modules$.animate({ opacity: 1 }, beatDuration, function () { banner.wrapper$.dequeue(); }).pngFix();
                            }
                        }, beatDuration * 2);
                    });
            }
        });

        for (i = 0; i < HELIENE.BannerController.banners.length; ++i) {
            HELIENE.BannerController.subscribe(HELIENE.BannerController.banners[i].show, 'bannerLoaded', HELIENE.BannerController.banners[i]);
            HELIENE.BannerController.subscribe(HELIENE.BannerController.banners[i].hide, 'bannerUnloaded', HELIENE.BannerController.banners[i]);
        }
    }
};

$(function () {
    HELIENE.Banners.init();
    HELIENE.BannerController.init();
});

