		function videoWindow(){
			
				$('.video_thumb').live('click',function(){
				
					var video_title = $(this).attr('title');
					var video_code	= $(this).attr('video_code');
					
					var html_output = "<div class='video_win'><object width='560' height='340'><param name='movie' value='http://www.youtube.com/v/" + video_code + "'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/" + video_code + "' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='560' height='340'></embed></object><span class='close_video'>Close</span></div>";
					
					$('#floater').fadeIn();
					$('#floater').html(html_output);
					
				});
			}
			
			function closeVideoWindow(){
				$('.close_video').live('click',function(){
					$('.video_win').html('');
					$('.video_win').fadeOut();
				});
			}
			
			
			// Grab youtube videos from the youtube API
			function grabYoutube()
			{
				// 	
				var url = "http://gdata.youtube.com/feeds/users/vcoderzdotcom/uploads?alt=json&max-results=15&callback=?";

				$(function(){
					$.getJSON(url,function(response){
						displayYoutube(response);
					})
				});
				
	
				
			}
			
			// Display the youtube videos into the website frame
			function displayYoutube(response)
			{
				var html = "";
				var video,thumbnail,title,video_id;
			
				for( i in response.feed.entry )
				{
					
					video 	  = response.feed.entry[i];
					video_url = video.id.$t;
					video_id  = video_url.split('/')[5];
					thumbnail = "http://i2.ytimg.com/vi/" + video_id + "/default.jpg";
					title     = video.title.$t;

					html += "<div class='youtube_row'><img class='thumb video_thumb' video_code='" + video_id + "' src='" + thumbnail + "' /><span class='video_title'>" + title + "</span></div>";
				}
				
				$("#youtube_box").html( html );
			
			}
			
			
			$(document).ready(function(){
				grabYoutube();
				videoWindow();
				closeVideoWindow();
			});
