$(window).ready(function() {

	$(".dialog").fancybox({
				'opacity'		: true,
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'none'
	});

	$(".gmap").fancybox({
				'width'				: '75%',
				'height'			: '75%',
				'autoScale'			: false,
				'transitionIn'	: 'elastic',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
	});
	
	var opts = {
		lang    		: 'da',
		height  		: 350,
		cssfiles 		: ['../css/style.css','../css/styleEditor.css'],
		doctype			: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">',
		absoluteURLs    : true,
		allowSource     : true,
		fmAllow			: true,
		fmOpen 			: function(callback) {
				$('<div id="myelfinder" />').elfinder({
				url : 'elrte/connectors/php/connector.php',
				lang : 'da',
				dialog : { width : 900, modal : true, title : 'Fil bibliotek' },
				closeOnEditorCallback : true,
				editorCallback : callback
			});
		},
		toolbar  		: 'custom'
	}
	$(".editor").elrte(opts);
	
	var opts2 = {
		lang    		: 'da',
		height  		: 350,
		cssfiles 		: ['../css/style.css','../css/styleEditor.css'],
		doctype			: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">',
		absoluteURLs    : true,
		allowSource     : true,
		fmAllow			: true,
		fmOpen 			: function(callback) {
				$('<div id="myelfinder" />').elfinder({
				url : 'elrte/connectors/php/connector.php',
				lang : 'da',
				dialog : { width : 900, modal : true, title : 'Fil bibliotek' },
				closeOnEditorCallback : true,
				editorCallback : callback
			});
		},
		toolbar  		: 'custom2'
	}
	$(".editor2").elrte(opts2);
});

