$(function(){
	$('h2').flash(
		{ 
			src: 'http://www.caratage.com/ultralight.swf',  
			flashvars: { 
				css: [
					'* { color: #000000; }'
				].join(' ')
			}
		},
		{ version: 7 },
		function(htmlOptions) {
			htmlOptions.flashvars.txt = this.innerHTML;
			this.innerHTML = '<span>'+this.innerHTML+'</span>';
			var $alt = $(this.firstChild);
			htmlOptions.height = $alt.height();
			htmlOptions.width = $alt.width();
			$alt.addClass('alt');
			$(this)
				.addClass('flash-replaced')
				.prepend($.fn.flash.transform(htmlOptions));						
		}
	);			
});

$(function(){
	$('h3').flash(
		{ 
			src: 'http://www.caratage.com/light.swf',  
			flashvars: { 
				css: [
					'* { color: #666666; }',
					'a { color: #666666; }'
				].join(' ')
			}
		},
		{ version: 7 },
		function(htmlOptions) {
			htmlOptions.flashvars.txt = this.innerHTML;
			this.innerHTML = '<span>'+this.innerHTML+'</span>';
			var $alt = $(this.firstChild);
			htmlOptions.height = $alt.height();
			htmlOptions.width = $alt.width();
			$alt.addClass('alt');
			$(this)
				.addClass('flash-replaced')
				.prepend($.fn.flash.transform(htmlOptions));						
		}
	);			
});

$(function(){
	$('address').flash(
		{ 
			src: 'http://www.caratage.com/light.swf',  
			flashvars: { 
				css: [
					'* { color: #666666; }',
					'a { color: #666666; }'
				].join(' ')
			}
		},
		{ version: 7 },
		function(htmlOptions) {
			htmlOptions.flashvars.txt = this.innerHTML;
			this.innerHTML = '<span>'+this.innerHTML+'</span>';
			var $alt = $(this.firstChild);
			htmlOptions.height = $alt.height();
			htmlOptions.width = $alt.width();
			$alt.addClass('alt');
			$(this)
				.addClass('flash-replaced')
				.prepend($.fn.flash.transform(htmlOptions));						
		}
	);			
});

$(function(){
	$('p.replace').flash(
		{ 
			src: 'http://www.caratage.com/light.swf',  
			flashvars: { 
				css: [
					'* { color: #666666; }',
					'a { color: #666666; }'
				].join(' ')
			}
		},
		{ version: 7 },
		function(htmlOptions) {
			htmlOptions.flashvars.txt = this.innerHTML;
			this.innerHTML = '<span>'+this.innerHTML+'</span>';
			var $alt = $(this.firstChild);
			htmlOptions.height = $alt.height();
			htmlOptions.width = $alt.width();
			$alt.addClass('alt');
			$(this)
				.addClass('flash-replaced')
				.prepend($.fn.flash.transform(htmlOptions));						
		}
	);			
});

$(function() {          
    // initialize scrollable  
    $("div.scrollable").scrollable({
    		clickable: false,
    		size: 1,
    		easing: 'swing',
    		speed: 400,
    		vertical: true
    	}).circular().navigator().autoscroll({ 
    		steps: 1, 
    		interval: 18000
    }); 
});

        

$(function() { 
    // setup ul.tabs to work as tabs for each div directly under div.panes 
     $("ul.tabs").tabs("> .pane", {
     	event:'mouseover'
     });
});

$(document).ready(function(){
    $("#kontaktForm").validate({
    	messages: { 
            name: "Geben Sie Ihren Namen an", 
            email: { 
                required: "Geben Sie eine g&uuml;ltige E-Mail Adresse ein",
                email: "Geben Sie eine g&uuml;ltige E-Mail Adresse ein"
            }, 
            subject: "Schreiben Sie einen Betreff", 
            textarea: "Schreiben Sie eine Mitteilung." 
        }	
    });
});
  
  
  		