//IFrame Content/////////////////////////////////////////////////////////////

/* <![CDATA[ */

window.addEvent('domready', function() {

	/**
	 * That CSS selector will find all <a> elements with the
	 * class boxed
	 *
	 * The example loads the options from the rel attribute
	 */
	SqueezeBox.assign($$('a.boxed'), {
		parse: 'rel'
	});

});
		/* ]]> */


//Ajax Content///////////////////////////////////////////////////////////////


window.addEvent('domready', function() {
 
	/**
	 * That CSS selector will find all <a> elements with the
	 * attribute rel="boxed"
	 *
	 * The second argument sets additional options.
	 */
	SqueezeBox.assign($$('a[rel=boxed]'), {
		size: {x: 300, y: 400},
		ajaxOptions: {
			method: 'get' // we use GET for requesting plain HTML
		}
	});
 
});

//Form Elements////////////////////////////////////////////////////////////////

window.addEvent('domready', function() {
 
	/**
	 * That CSS selector will find all <a> elements with the
	 * attribute rel="boxed" 	 * and href starting with a #.
	 *
	 * The second argument sets additional options
	 */
	SqueezeBox.assign($$('a[rel=boxed][href^=#]'), {
		size: {x: 200, y: 200}
	});
 
	/**
	 * We search our element by id and set the default content handler
	 * to adopt, otherwise SqueezeBox would use clone.
	 */
	SqueezeBox.assign($('demo-link-adopt'), {
		size: {x: 300, y: 150},
		handler: 'adopt' // we set a handler to disable handler/parser detection
	});
 
});


//Single Images //////////////////////////////////////////////////////////////////////

window.addEvent('domready', function() {
 
	/**
	 * You can run this code as first code to set default options
	 */
	SqueezeBox.initialize({
		size:	{x: 520, y: 375}
	});
	 
 
 
	SqueezeBox.assign($$('a[rel=boxed]'));
 
});

//Youtube Flash //////////////////////////////////////////////////////////////////////

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() {
 
	/**
	 * That CSS selector will find all <a> elements with the
	 * class boxed.
	 *
	 * The second argument sets additional options
	 */
	SqueezeBox.assign($$('a.boxed'), {
		parse: 'rel'
	});
 
});













