$(document).ready( function()
	{
		
		if ( $.browser.msie )
		{
			$( '#service_links ul' ).append( '<li><a href="#" onclick="window.external.AddFavorite(location.href, document.title);return false;">Voeg toe aan favorieten</a></li>' );
			
			if ( $.browser.version.substr(0,1)<7)//HIDE OUTLINES
			for(var i in document.links) document.links[i].onfocus = document.links[i].blur;
		}
		
		if ( typeof( page ) != 'undefined' )
		{
			switch( page )
			{
				case 'image_bar': /*--------------------------------------------------------*/
					
					var image_dir = 0;
					
					$("#image_bar a").each( function()
						{
							
							if ( image_dir == 0 ) image_dir = '/images'+this.href.substring( this.href.lastIndexOf( '/' ), this.href.indexOf( '.html' ) )+'/';

							this.href = image_dir+this.href.substr( this.href.indexOf('slideshow=')+10 );
						} );
					
					$("#image_bar a").lightbox( { fitToScreen: true } );
					
					
					$("#content a").each( function()
						{
							if ( this.href.indexOf( '?slideshow' ) > 0 )
							{
								$(this).click( function() 
									{
										$('#image_bar a:first').click();
										return false;
									} );
							}
						} );
					
					break;
					
			}
		}
		
	} );

//--------------------------------------------------------------------------------

//MSIE CRAP
if(!Array.indexOf){Array.prototype.indexOf=function(k){var len=this.length;for(i=0;i<len;i++){if(this[i]==k){return i;}}return-1;};}