window.model_global = Backbone.View.extend({
	el: $("body"),
	events: {
		"mouseover .header .link_container a"	: "mouseover_links",
		"mouseover .main" : "hide_nav",
		"mouseleave .menu" : "hide_nav"
	},
	vendors: ["easing"],
	initialize: function(){ var _this = this; munstro.load_vendors(this.vendors, function(){ _this.__construct(); }); },		
	__construct: function(){
	},
	mouseover_links: function(e){
		var _this = this;
		var el = $(e.target);
		var rel = el.attr("rel");
		if(!rel){
			el = $(e.target).parent();
			rel = el.attr("rel");
		}
		var sublink_div = $(".menu .content[rel=" + rel + "]");
		var arrow = $(".menu .navarrow");
		var arrow_pos = sublink_div.attr("arrow");
		if(rel){
			this.hide_links();
			arrow.stop().animate(
				{left: arrow_pos},
				{easing: "easeInQuad",
				duration: 250
				}
			);
			if(sublink_div.length > 0){
				sublink_div.show();
				$(".header .menu").show();
			}else{
				$(".header .menu").hide();
			}
		}
	},
	hide_links: function(){
		$(".menu .content").hide();
	},
	hide_nav: function(){	
		$(".header .menu").hide();
	}
});
var model_global = new window.model_global;
