window.global = Backbone.View.extend({
	el: $("body"),
	events: {
	},
	vendors: ["fancybox"],
	initialize: function(){ var _this = this; munstro.load_vendors(this.vendors, function(){ _this.__construct(); }); },		
	__construct: function(){
		this.init_fancybox();
	},
	
/**
 *	Expand layer or de-expand
 */	
	expand: function(id){
		if($("#" + id).css("display") == "none"){
			$("#" + id).slideDown();
		}else{
			$("#" + id).slideUp();
		}
	},
	
/**
 *	Initialize the fancy boxes :D
 */
	init_fancybox: function(){
		$(".more_info").fancybox({
			'type'			: 'iframe',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic',
			'width' 		: 700,
			'height'		: "100%"
		});				
		$(".video_yt").fancybox({
			'type'			: 'iframe',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic',
			'href'			: 'http://www.youtube.com/embed/CO-8_jNOFiA?autoplay=1',
			'width' 		: 640,
			'height'		: 390
		});
		$(".states_pop").fancybox({
			'type'			: 'iframe',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic',
			'width' 		: 550,
			'height'		: 500
		});				
		$(".fullscreen_pop").fancybox({
			'type'			: 'iframe',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic',
			'width' 		: "100%",
			'height'		: "100%"
		});					
	}
});
window._global = new window.global;
