window.index_index = Backbone.View.extend({
	el: $("body"),
	events: {
	},	
	vendors: ["easing"],
	initialize: function(){ var _this = this; munstro.load_vendors(this.vendors, function(){ _this.__construct(); }); },
	
/**
 * Constructor
 */		
	__construct: function(){
		this.cookie_check();
	},
	
/**
 * Cookie Check
 */			
	cookie_check: function(){
		var _this = this;
		if(!$.cookie('nhme_animation')){
			$.cookie('nhme_animation', '1', { expires: 7 });
			this.create_intro();	
		}else{
		//	this.show_page();
		}
	},
	
/**
 * Create Intro
 */			
	create_intro: function(){
		$(".frontpageheader").delay(1000).animate(
			{marginTop: "0px"},
			{duration: 1500, 
			easing: "easeOutExpo",
			complete: function(){
				$(".heartcontent").fadeOut(2000, function(){
					$(".content").fadeIn(2000, function(){
						$("body").removeAttr("style");
						$("body").attr("style","background:url('_public/img/footer_tile.png') !important;");
						$(".frontpagefooter").fadeIn();
					});
				});
			}}
		);			
	}
});

$(document).ready(function(){
	if(!$.cookie('nhme_animation')){
		$(".header").addClass("frontpageheader");
		$(".footer").addClass("frontpagefooter");
		$(".heartcontent").removeClass("hidden");
		$(".shadowcontent").show();
		$(".content").hide();	
		var images = new Array(12);
		images[0] = new Image();
		images[0].src = "_public/img/dropdown.png";
		images[1] = new Image();
		images[1].src = "_public/img/dropdown_arrow.png";
		images[2] = new Image();
		images[2].src = "_public/img/header.png";
		$(window).load(function(){
			var _index_index = new window.index_index;
		});
	}else{
		$(".heartcontent").hide();
	}
});

