$(document).ready(function(){

		// Fading Key Visual
		$.fn.wait = function(time, type) {
	        time = time || 2000;
	        type = type || "fx";
	        return this.queue(type, function() {
	            var self = this;
	            setTimeout(function() {
	                $(self).dequeue();
	            }, time);
	        });
	    };

	    function keyvisual() {
	    	//Fader für Keyvisual
		    $(".sw").wait().fadeOut(800);
		    //Fader für MovieTeaser
		    $("#movieTeaser").wait(1500).fadeOut(1500);
	    };
	    
	    if($("#movieTeaser").attr("src")){
	    	
	    	var movieTeaserInterval = window.setInterval(function(){
	    		$("#movieTeaser").animate({"opacity":"toggle"},1500);
	        }, 7500);	    	
	    }	    

	    keyvisual();

});