var BCE = {
	 ExternalLinks: new Class({
                initialize: function () {
                        $$('a').each( function (item) {
                                if (item.getProperty('rel') == "external") item.setProperty('target', '_blank');
                        });
                }
     }),
	Pages: new Class({ 
		initialize: function () {
			this.global();

			$(document.body).getProperty('class').split(' ').each( function (item) {
				
				if (this[item]) this[item]();
			}.bind(this));
		},
		
		single: function () {

		},
		
		works: function () {
			ReMooz.assign('.workscontent a', {
					'origin': 'img',
					'shadow': 'onOpenEnd', // fx is faster because shadow appears after resize animation
					'resizeFactor': .92, // resize to maximum 80% of screen size
					'cutOut': false, // don't hide the original
					'opacityResize': 0.2, // opaque resize
					'dragging': false, // disable dragging
					'centered': true // resize to center of the screen, not relative to the source element
				});

		},
		
		profile: function () {

		},

		global: function () {
			new BCE.ExternalLinks();
			$$('#findme ul li a').each(function(el){
				var wideframe = new Element ('span', { 'class' : 'icon' });
				el.grab(wideframe);
			});
			
			new FormCheck('form');
		},
		
		home: function () {

		}
	})
}

window.addEvent('domready', function(){
	new BCE.Pages();
});