$(document).ready( 
	function(){ 
		
		$('#macbookpro').innerfade({ 
			animationtype: 'fade',
			speed: 1200, 
			timeout: 5000, 
			type: 'sequence', 
			containerheight: '185px' 
		}); 
		
	 }
); 





$(document).ready(function(){
						   
	//scroll to anchor
	$('.scroll').click(function(){$('#top').ScrollTo(1000);return false});
	$('.write, .add').click(function(){$('#respond').ScrollTo(1000);return false});
	
	//$("#wrapper").hide(); //versteckt Seite, damit sie eingeblendet werden kann
   // $("#wrapper:first").fadeIn(1000); //blendet Seite ein
	
	//$("#main-navi .start, #main-navi .portfolio, #main-navi .about, #main-navi .contact, #main-navi .blog").click(function () { //bei allen genannten Links, Seite ausblenden
    //$("#wrapper").fadeTo(400, 1);
   // });

}); //close doc ready



$(document).ready(function(){
	
	$(".portfolio-preview li span").fadeTo("fast", 0.0);

	$(".portfolio-preview li a").hover(function(){
	$(this).next("span").fadeTo("fast", 1.0);
	},function(){
	$(this).next("span").fadeTo("slow", 0.0);
	});

});





/* $(document).ready(function(){

	$("#myController").jFlow({
		slides: "#mySlides",
		controller: ".jFlowControl", // must be class, use . sign
		slideWrapper : "#jFlowSlide", // must be id, use # sign
		selectedWrapper: "jFlowSelected",  // just pure text, no sign
		width: "365px",
		height: "185px",
		duration: 250,
		prev: ".jFlowPrev", // must be class, use . sign
		next: ".jFlowNext" // must be class, use . sign
	});
});  */

/* $(function(){	// shorthand for $(document).ready() BTW
        $('div.demo').each(function() {
			// The text of the paragraphs in the rounded divs is also the
			// jQuery code needed to create that effect. Cosmic.
             eval($('p', this).text());
        });
		$('#sidebar p, #sidebar .p').corner("dog br 24px");
		
	});
*/

/*
 * Tooltip script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Alen Grakalic (http://cssglobe.com)
 * 
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */
 


this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 20;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("middle");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};



// starting the script on page load
$(document).ready(function(){
	tooltip();
});