
	//------------------------------------------------------------------------------------------------------------------------
	// sIFR

	var schriftiger = {src: 'font/schriftiger.swf',
					ratios: [8, 1.3, 11, 1.21, 12, 1.2, 14, 1.19, 21, 1.16, 28, 1.13, 38, 1.12, 61, 1.11, 94, 1.1, 95, 1.09, 103, 1.1, 107, 1.09, 110, 1.1, 119, 1.09, 120, 1.1, 1.09]
					};
	sIFR.activate(schriftiger);
	
	sIFR.replace(schriftiger, 
		{ 
			selector: 'h1',							// black
			css: {
				'.sIFR-root' : 
					{
						'color': '#000000',
						'leading': '1',
						'letter-spacing': '0.4'
					}
			},
			tuneHeight: 0,
			wmode: 'transparent',
			transparent: true
		}
	);
	
	sIFR.replace(schriftiger, 
		{ 
			selector: 'h2',							// green
			css: [
        		'.sIFR-root { color: #99cc00; leading: 1; letter-spacing: 0.4; }',
				'a { text-decoration: none; }',
        		'a:link { color: #99cc00; }',
        		'a:hover { color: #000000; }'
			],
			tuneHeight: 0,
			wmode: 'transparent',
			transparent: true
		}
	);
	
	sIFR.replace(schriftiger, 
		{ 
			selector: 'h3',							// orange
			css: [
        		'.sIFR-root { color: #ffa722; leading: 1; letter-spacing: 0.4; }',
				'a { text-decoration: none; }',
        		'a:link { color: #ffa722; }',
        		'a:hover { color: #000000; }'
			],
			tuneHeight: 0,
			wmode: 'transparent',
			transparent: true
		}
	);
	
	sIFR.replace(schriftiger, 
		{ 
			selector: 'h4',							// grey
			css: [
        		'.sIFR-root { color: #777f7d; leading: 1; letter-spacing: 0.4; }',
				'a { text-decoration: none; }',
        		'a:link { color: #777f7d; }',
        		'a:hover { color: #000000; }'
			],
			tuneHeight: 0,
			wmode: 'transparent',
			transparent: true
		}
	);
	
	sIFR.replace(schriftiger, 												
		{ 
			selector: 'h5',							// white
			css: [
        		'.sIFR-root { color: #ffffff; leading: 1; letter-spacing: 0.4; }',
				'a { text-decoration: none; }',
        		'a:link { color: #777f7d; }',
        		'a:hover { color: #000000; }'
			],
			tuneHeight: 0,
			wmode: 'transparent',
			transparent: true
		}
	);
	
	sIFR.replace(schriftiger, 
		{ 
			selector: 'h6',							// changeable color - only for index page
			css: [
        		'.sIFR-root { color: #919394; leading: 1; letter-spacing: 0.4; }',
				'a { text-decoration: none; }',
        		'a:link { color: #919394; }',
        		'a:hover { color: #fff; }'
			],
			tuneHeight: 0,
			wmode: 'transparent',
			transparent: true
		}
	);
	
	// Init jquery -----------------------------------------------------------------------------------------------------
	$(function() {
		
		// preload common images 
		var commonImages = [													// array of all common images for preloading 
			"image/css/navbox_232_top-arrow.png",
			"image/css/navbox_232_bottom-last.png"				
		];
		
		// preload function-object
		(preload = function (images){ 
			var image = [];
			for (var i = 0; i < images.length; i++){
				image[i] = new Image();
  				image[i].src = commonImages[i];									// preload source
			}
		})(commonImages);														// here its invoced once for the common images;
		
		// init supersized plugin
		// Seitenverhaeltnis Hintergrundbild 1:1,33 oder 4:3
		$.fn.supersized.options = {  
			startwidth: 640,  													// changes here and in supersized.1.0.js
			startheight: 480,
			minsize: .50,
			slideshow: 0,
			slideinterval: 5000  
		};
		$('#supersize').supersized(); 
		
		
		// General mainnavigation menue -------------------------------------------------------------------------------------------
		var duration=250 // duration in ms for fade effect
		
		$("ul.mainnavigation > li")												// Add hover (over/out) event
			.hoverIntent(
				function() { // mouseenter
					$(this).find('ul').fadeIn(duration);
					$(this).find('div').fadeIn(duration); 
				},
				function() { // mouseleave
					$(this).find('ul').fadeOut(duration);
					$(this).find('div').fadeOut(duration);
				}
			)
			.find('ul').hide()													// init jquery system to hidden status (cause ist is unaware of the css setting)
			.end()																// back to previous selection
			.find('div').hide();												// also hide the div for contact

		
		// aktivate gallery (for overview gallery only) -------------------------------------------------------------------------------------------------
		$(".galleryelement > .info")											// create extra HTML Code content
			.wrapInner('<div class="content"></div>');	
		
		$(".galleryelement > .info")											// create extra HTML Code for round corners
			.prepend('<div class="top"></div>')									// add round borders on top
			.append('<div class="bottom"></div>');								// and bottom
		
		$(".galleryelement")
			.hoverIntent(														// hover effect
				function(){
					$(this).find('.info').fadeIn();
				},
				function(){
					$(this).find('.info').fadeOut();						
				}
			)
			.click(																// on click
				function(e){
					var url = $(this).find('a:first').attr('href');				// target of first href in element
					if (url != '#'){
						document.location = url;								// jump  
					}
				}
			);
		
		
		
	})
