/* Do some magic to the logo */
$('#logo').hide().animate({opacity:1}, 1200, function(){
	$(this).show().animate({opacity:1}).addClass('bounceInDown');
});//End BounceIn

/* Hide address bar on iPhones */
var isiPhone = navigator.platform.indexOf("iPhone") != -1
if (isiPhone){ window.addEventListener("load",function() { setTimeout(function(){ window.scrollTo(0, 1); }, 0); }); }

/* Replace some text */
(function($){$.fn.replaceText=function(b,a,c){return this.each(function(){var f=this.firstChild,g,e,d=[];if(f){do{if(f.nodeType===3){g=f.nodeValue;e=g.replace(b,a);if(e!==g){if(!c&&/</.test(e)){$(f).before(e);d.push(f)}else{f.nodeValue=e}}}}while(f=f.nextSibling)}d.length&&$(d).remove()})}})(jQuery);

/* General functions on DOM ready */
jQuery(function(){

	/* Mark post read */
	jQuery('a#lnk_mark').mouseover(function(){
		jQuery('.box_mark_post_read').fadeIn(500);
		jQuery('textarea.comark').html("Hat diesen Beitrag als gelesen markiert.");
	});
	jQuery('.box_mark_post_read').mouseleave(function(){
		jQuery('.box_mark_post_read').fadeOut(500);
	});//End Mark Post
	
	/* Show/Hide short info */
	var container = jQuery(".shortinfo");
	
	jQuery("span a#enableinfo").click(
	function( event ){
	event.preventDefault();

	if (container.is(":visible")){

		container.slideUp(360);
		jQuery('#logo').animate({top:'122'});
		jQuery(this).css('color','#a9a9a9');
		jQuery('#wrapper_inner').animate({opacity:'1'});
	 
	} else {
	 
		container.slideDown(360);
		jQuery('#logo').animate({top:'315'});
		jQuery(this).css('color','#000');
		jQuery('#wrapper_inner').animate({opacity:'0.5'});
	 
	}
	});

});//Done
