(function($){
	$(document).ready(function(){
		
		if(typeof sIFR == "function"){
			    sIFR.replaceElement("#content .intro h1", named({sFlashSrc: "/assets/templates/default/flash/oceansans.swf", sColor: "#2C5FA5", sWmode: "transparent"}));
		};
			
		// MouseOver definieren
		$(".hover").imghover({suffix: "_hover"});
		$(".btn").imghover({suffix: "_hover"});
		
		
		// Metanav
		$('#metanav li:last-child').addClass('last');
		$('#metanav li:first-child').addClass('startseite');


		// Hauptnavigation
		$('#nav ul li:first-child').addClass('first');
		$("#nav").droppy();
		// Hauptnavigation: Hover bleibt stehen
		$("#nav ul li a").mouseover(function () {
			$(this).parent().addClass('hover');
	  });
		$("#nav ul li a").mouseout(function () {
			$(this).parent().removeClass('hover');
	  });


		// Trailer-Hover
		/*$("#trailernav ul.tab1").mouseover(function () {
			//$("#trailernav ul").css(border: 1px solid red);
	  });
		$("#trailernav ul.tab1").mouseout(function () {
			$(this).attr("src","images/btn_search.gif");
	  });*/
	

		/*
		$(".tweet").tweet({
				username: "lotsofdotsde",
			  join_text: false,
			  avatar_size: 0,
			  count: 7,
			  auto_join_text_default: "haben wir geschrieben:",
	      auto_join_text_ed: "wir",
	      auto_join_text_ing: "waren wir:",
	      auto_join_text_reply: "haben wir geantwortet:",
	      auto_join_text_url: "haben wir uns folgendes angeschaut:",
	      loading_text: "Lade Twitter-Nachrichten..."
	 });
	*/
	
		
		$("#twitter").getTwitter({
			userName: "lotsofdotsde",
			numTweets: 3,
			loaderText: "Lade tweets...",
			slideIn: true,
			slideDuration: 750,
			showHeading: false,
			headingText: "Latest Tweets",
			showProfileLink: false,
			showTimestamp: false
		});
		
	
	 // Colorbox
	 $("#subline .intro a").colorbox({transition:'fade', width: "888", height: "616", iframe:true});
	 $(".newsletter").colorbox({transition:'fade', width: "450", height: "560", iframe:true});
	 $(".colorbox").colorbox({transition:'fade'});
	 $(".videobtn").colorbox({transition:'fade', width: "984", height: "755",initialWidth:984,initialHeight:755, iframe:true});
	 $(".prozessbtn").colorbox({transition:'fade', width: "984", height: "755",initialWidth:984,initialHeight:755, iframe:true});
	
		// Listen-Formatierung
		$("ul.minus").parent().addClass('minus');
		$("ul.plus").parent().addClass('plus');		

	});
})(jQuery);