// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
var Scriptaculous = {
	Version : '1.8.1',
	require : function(libraryName) {
		// inserting via DOM fails in Safari 2.0, so brute force approach
		document.write('<script type="text/javascript" src="' + libraryName
				+ '"><\/script>');
	},
	REQUIRED_PROTOTYPE : '1.6.0.2',
	load : function() {
		function convertVersionString(versionString) {
			var r = versionString.split('.');
			return parseInt(r[0]) * 100000 + parseInt(r[1]) * 1000
					+ parseInt(r[2]);
		}

		if ((typeof Prototype == 'undefined')
				|| (typeof Element == 'undefined')
				|| (typeof Element.Methods == 'undefined')
				|| (convertVersionString(Prototype.Version) < convertVersionString(Scriptaculous.REQUIRED_PROTOTYPE)))
			throw ("script.aculo.us requires the Prototype JavaScript framework >= " + Scriptaculous.REQUIRED_PROTOTYPE);

		$A(document.getElementsByTagName("script")).findAll(function(s) {
			return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
		}).each(function(s) {
			var path = s.src.replace(/scriptaculous\.js(\?.*)?$/, '');
			var includes = s.src.match(/\?.*load=([a-z,]*)/);
			(includes
					? includes[1]
					: 'builder,effects,dragdrop,controls,slider,sound')
					.split(',').each(function(include) {
								Scriptaculous.require(path + include + '.js')
							});
		});
	}
}

Scriptaculous.load();

document.observe("dom:loaded", function() {	if (Prototype.Browser.IE6) pngfix(); });
/*
 * Event.observe(window, 'load', function(evnt) { var ProtFlowExample = new
 * ProtoFlow($("protoflow"), { startIndex : 2, // which image do you want the
 * flow // to focus on by default slider : true, // show or hide slider?
 * captions : true, // show or hide captions, by default we hide it. // So YOU
 * MUST turn it on here useReflection : true, // Add reflection to your images.
 * Please // note that this will slow down rendering. enableOnClickScroll :
 * false // add NEW! if you wish to keep scrolling // on click just set this to
 * be true });
 * 
 * });
 */

