$(document).ready( function(){
	$( 'p.employee_list' ).hide();
	$( 'h3.employee_list_title' ).click(
		function() {
			var element_id = '#employee_list'+$( this ).attr( 'id' );
			if( $( element_id+':hidden' ).length == 1 ) {
				if( $( 'p.employee_list:visible' ).length != 1) {
					$( element_id ).show();
				} else {
					$( 'p.employee_list:visible' ).hide();
					$( element_id ).show();
				}
			}
		}
	);

	$( 'a.employee' ).click(
		function() {
			$( 'div#contentSmall div' ).hide();
			address = 'http://'+window.location.hostname+$( this ).attr( 'href' );
			$.ajax( { url: address, cache: false, success:
				function( htmlreturn ){
			    	$( 'div#contentSmall div' ).html( htmlreturn );
			    	$( 'div#contentSmall div' ).show();
				}
			});
			return false;
		}
	);

	activeBannerImg = 1;
	$( '.imageChange').click(
		function(){
			id = $( this ).attr( 'id' );
			$( '#bannerMultiple #large_'+activeBannerImg).fadeOut( 'fast',
				function( ){
					if( id == 'small_2' ){
						activeBannerImg = 2;
						$( '#bannerMultiple #large_2').fadeIn('fast');
					}
					if( id == 'small_3' ){
						activeBannerImg = 3;
						$( '#bannerMultiple #large_3').fadeIn('fast');
					}
				}
			);
		}
	);
	$( '.imageChange').mouseout(
		function(){
			if( activeBannerImg != 1) {
				$( '#bannerMultiple #large_' + activeBannerImg ).fadeOut( 'fast',
					function( ){
						$( '#bannerMultiple #large_1').fadeIn('fast');
						activeBannerImg = 1;
					}
				);
			}
		}
	);

	$( '#fastAccess #quickLinks' ).change(
		function() {
			url = $('#quickLinks option:selected').val();
			if( url != '0' && url != '' ){
				if( url == 'http://www.infolite.ch' ){
					window.open( url, '_blank', '' );
				} else {
					window.open( url, '_self', '' );
				}
			}
		}
	);

	$( 'span.mapName' ).hover(
		function(){
			$( 'img.map' ).hide();
			$( '#map' + $( this ).attr( 'id' ) ).show();
			$( 'span.mapName' ).removeClass("active");
			$( this ).addClass("active");
		}
		,
		function(){}
	);

	$( 'a.historyBack' ).click( function(){ history.back(); return false; } );
});



















