function Site() {
	this.quotes = [];
	this.quoteIndex = 0;
	this.quoteChangeSpeed = 10000;
	this.videos = [];
	
	this.parseVideos = function() {
		if( $('#feed-container').length )
		{
			var divs = $('div.post-video-container', $('#feed-container')[0] ).get();
			for( var i = 0; i < divs.length; i++ )
			{
				video = new PostVideo( divs[i] );
				var exists = false;
				var j = this.videos.length;
				while( j-- )
				{
					if( this.videos[j].id == video.id )
						exists = true;
				}
				
				if( !exists )
				{
					this.videos.push(video);
					
					video.loadThumbnail();
				}
			}
		}
		
		if( $('#secondary-videos').length )
		{
			var secondary = $('div.post-video-container', $('#secondary-videos')[0] ).get();
			for( var i = 0; i < secondary.length; i++ )
			{
				video = new PostVideo( secondary[i] );
				video.loadThumbnail();
			}
		}
		
		if( $('div.post-video-container-big').length )
		{
			video = new PostVideo( $('div.post-video-container-big')[0] );
			video.loadThumbnail();
		}
		
		if( $('#raw-feed-container').length )
		{
			var divs = $('div.raw-video-container', $('#raw-feed-container')[0] ).get();
			for( var i = 0; i < divs.length; i++ )
			{
				video = new PostVideo( divs[i] );
				var exists = false;
				var j = this.videos.length;
				while( j-- )
				{
					if( this.videos[j].id == video.id )
						exists = true;
				}
				
				if( !exists )
				{
					this.videos.push(video);
					video.loadThumbnail();
				}
			}
		}
	}
	
	this.setupQuotes = function() {
		this.quotes = $('.header .quote').get();
	
		setTimeout( function(obj) { return function() { obj.startQuotes(); } }(this), 1000);
		setInterval( function(obj) { return function() { obj.nextQuote(); } }(this), this.quoteChangeSpeed);
	}
	
	this.startQuotes = function() {
		$(this.quotes[0]).fadeIn();
	}
	
	this.nextQuote = function() {
		var nextIndex = this.quoteIndex + 1;
		if( nextIndex == this.quotes.length )
			nextIndex = 0;
		
		$(this.quotes[this.quoteIndex]).fadeOut( function(obj) {
			return function() {
				$(obj.quotes[nextIndex]).fadeIn();
				obj.quoteIndex = nextIndex;
			}
		}(this));
	}
	
	this.init = function() {
		this.setupQuotes();
		this.parseVideos();
	}
	
	this.init();
}
