/* Author: 

*/

(function($){
	$(document).ready(function(){
		if( $("a.fb-inline").length > 0 ){
			$("a.fb-inline").fancybox({
				'hideOnContentClick': true,
				'autoScale': false,
				'modal': false,
				'overlayShow': false
			});
		}
		$('#events').bind('click', function(){
			window.location = "/events"
		});
		$('#simulatecosts').bind('click', function(){
			window.location = "/how-to-start/simulate-operation";
		});
		$('#otherindustries').bind('click', function(){
			window.location = "/other-industries";
		});
		$('#industryoverview').bind('click', function(){
			var video = $(this).attr('video');
			$.fancybox({
				'padding'		: 0,
				'autoScale'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'title'			: "",
				'width'			: 640,
				'height'		: 390,
				'href'			: video.replace(new RegExp("watch\\?v=", "i"), 'v/'),
				'type'			: 'swf',
				'swf'			: {
					'wmode'				: 'transparent',
					'allowfullscreen'	: 'true'
				}
			});

			return false;
		});	
	});
}(jQuery));

















