	var Site = {
		
		init : function() {
		
					Shadowbox.init({
						players: ['iframe', 'img']
					});
        			Cufon.replace('.futura'); 
        			Cufon.replace('#menu div ul li a, ol#controls', { hover: true, hoverables: { a: true } } );	

		
			//jQuery
			jQuery.noConflict();
			
			(function($) {
				$(document).ready(function(){
					var firstVidId = $('ul.video-slide li:first-child a').attr('class');

					$("#youtube-player-container").tubeplayer({
						width: 400, // the width of the player
						height: 255, // the height of the player
						allowFullScreen: "true", // true by default, allow user to go full screen
						initialVideo: firstVidId, // the video that is loaded into the player
						playerID: "youtube-player", // the ID of the embedded youtube player
						preferredQuality: "default",// preferred quality: default, small, medium, large, hd720

						onPlay: function(id){}, // after the play method is called
						onPause: function(){}, // after the pause method is called
						onStop: function(){}, // after the player is stopped
						onSeek: function(time){}, // after the video has been seeked to a defined point
						onMute: function(){}, // after the player is muted
						onUnMute: function(){} // after the player is unmuted
					});
					$('#youtube-player-container').tubeplayer("play", firstVidId);
					
					
					
					$('li.flash').html('<object width="960" height="288"><param name="movie" value="/images/201007053_4_Ingredients_largebanner.swf" /><embed src="/images/201007053_4_Ingredients_largebanner.swf" height="288" width="960"></object>');
					
					
					
					$('ul.video-slide li').click(function(e){
					var newVid;
						if ($(e.target).is('a')) {
						
							newVid = $(e.target).attr('class').toString();
					
							$('#youtube-player-container').tubeplayer("play", newVid);
							return false;
						} else if ($(e.target).is('img')) {
						
							newVid = $(e.target).parent().attr('class').toString();
					
							$('#youtube-player-container').tubeplayer("play", newVid);
							return false;
						}
					});
					
					

				
					$("ul.video-slide li:first-child").after("<img class='next slidernav' src='/images/layout/next.jpg' alt='next' />");
						
					$("ul.video-slide li:first-child").after("<img class='prev slidernav' src='/images/layout/prev.jpg' alt='prev' />");


					$('#top').serialScroll({
						target:'.vidSlider',
						items:'ul.video-slide li', // Selector to the items ( relative to the matched elements, '#sections' in this case )
						prev:'img.prev',// Selector to the 'prev' button (absolute!, meaning it's relative to the document)
						next:'img.next',// Selector to the 'next' button (absolute too)
						axis:'x',// The default is 'y' scroll on both ways
						duration:700,// Length of the animation (if you scroll 2 axes and use queue, then each axis take half this time)
						force:true, // Force a scroll to the element specified by 'start' (some browsers don't reset on refreshes)
						step:1, // How many items to scroll each time ( 1 is the default, no need to specify )
						cycle:false// Cycle endlessly ( constant velocity, true is the default )					
						//start: 1, // On which element (index) to begin ( 0 is the default, redundant in this case )
						//queue:false,// We scroll on both axes, scroll both at the same time.
						//event:'click',// On which event to react (click is the default, you probably won't need to specify it)
						//stop:false,// Each click will stop any previous animations of the target. (false by default)
						//lock:true, // Ignore events if already animating (true by default)		
						
						//jump:false, // If true, items become clickable (or w/e 'event' is, and when activated, the pane scrolls to them)
						//lazy:false,// (default) if true, the plugin looks for the items on each event(allows AJAX or JS content, or reordering)
						//interval:1000, // It's the number of milliseconds to automatically go to the next
						//constant:true, // constant speed
					});

				
					
					$("#slider").easySlider({
						numeric: true,
						auto: true,
						pause: 5000,
						continuous: true
					});
										
				
				}); //END JQUERY
			})(jQuery);
			

		}	
	}
		
	Site.init();
