/*
 * Author: Michal Szwed, mpagencja.pl
 * All rights reserved
 */
var IMorph = new Class({
    Implements : Options,
    options : {
        'color_in' : '#BB86C5',
        'color_out' : '#4E1C51'
    },
    initialize : function(elements, options) {

        this.setOptions(options);

        elements.each(function(el){
            if(el.getElement('img'))
                el.getElement('img').addEvents({
                    'mouseover' : function() {
                        el.morph({'background-color' : this.options.color_in});
                    }.bind(this),
                    'mouseout' : function() {
                        (function() {
                            el.morph({'background-color' : this.options.color_out});
                        }).delay(200,this);
                    }.bind(this)
                });
            }.bind(this));

    }
});

window.addEvent('domready',function(){
    new Swiff('/img/grandclub/top_flash.swf', {container : $('flash_top'), width : 1200, height : 520, params : {wmode : 'transparent', allowscriptaccess : 'always'}})
    //new IMorph($$('.photo'));
    
    /* Email */
    var a = 'grand';
    var b = 'grandclub';
    var c = 'pl';
    $('email').set({
        'text' : a + '@' + b + '.' + c,
        'styles' : {
            'cursor' : 'pointer'
        },
        href : 'mailto:' + a + '@' + b + '.' + c
    });

});