if($){

	$(document).ready (
		function() {

			var $baseurl = "http://www.dewarmewinkel.nl/";
		
			$('#header').append("<a href='#' class='hidecontent'><img src='"+$baseurl+"images/up.gif' />Inhoud verbergen</a>");
			
			$('a.open-in-new-window').attr('target', '_blank');
			
			$('a.hidecontent').live('click',
				function($e){
					$e.preventDefault();

					$('#container').hide();
					$('body').append("<div id='containerHide'><a href='#' class='showcontent'><img src='"+$baseurl+"images/down.gif' />Inhoud tonen</a></div>");
				}
			);
			
			$('a.showcontent').live('click',
				function($e){
					$e.preventDefault();

					$('#containerHide').remove();
					$('#container').show();
				}
			);
			
			$('.slides_container div').show();
			
			$('#slides').slides({
				paginationClass: 'slidespagination',
				preload: true,
				generateNextPrev: true,
				play: 5000,
				pause: 2500,
				hoverPause: true,				
			});

			$(".youtube").click(function() {
				$.fancybox({
						'overlayColor'	: '#000',
						'padding'		: 0,
						'autoScale'		: false,
						'transitionIn'	: 'none',
						'transitionOut'	: 'none',
						'title'			: this.title,
						'width'			: 680,
						'height'		: 495,
						'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
						'type'			: 'swf',
						'swf'			: {
							'wmode'		: 'transparent',
							'allowfullscreen'	: 'true'
						}
					});

				return false;
			});				

	});
}
