/*  SQUEEZEBOX  */

SqueezeBox.parsers.swf = function(preset) {
	return (preset || this.url.test(/\.swf/)) ? this.url : false;
};
 
SqueezeBox.handlers.swf = function(url) {
	var size = this.options.size;
	return new Swiff(url, {
		id: 'sbox-swf',
		width: size.x,
		height: size.y
	});
};


window.addEvent('domready', function() {
 
	/**
	 * You can run this code as first code to set default options
	 * SqueezeBox.initialize({ ... });
	 */
 	
	/**
	* Set default options, overrideable from later calls.
	*/
	
	SqueezeBox.initialize({
		size: {x: 350, y: 400}
	});
	

	/**
	* Assign SqueezeBox to all links with rel="boxed" attribute, the class then reads the "href".
	*/

	SqueezeBox.assign($$('a[rel=boxed]'));
	
	SqueezeBox.assign($$('a.boxed'), {
		parse: 'rel'
	});
	

	
	//create our Accordion instance
	var myAccordion = new Accordion($('accordion'), 'h3.toggler', 'div.element', {
		opacity: false,
		onActive: function(toggler, element){
			toggler.setStyle('color', '#E0081D');
		},
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#820011');
		}
	});
	
	//Google Analitics
	ga();
});