/*
 * Image preview script 
 * written by Alen Grakalic (http://cssglobe.com)
 * thumb hovers by OONA
 */
 
this.imagePreview = function(){	
	/* CONFIG */
		
		xOffset = 210;
		yOffset = 80;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	$(".slickr-flickr-gallery li a").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t = "");
		$("body").append("<p id='preview'><img src='"+ this.href +"' alt='Image preview' />"+ c +"</p>");								 
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");	
			
    },
	function(){
		this.title != this.t;	
		$("#preview").remove();
    	
    
    });	
		
};


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



$("div.projectImage").hover(
	  function(){
		$(this).find("div.textRollover").show(0);
		
	  },
	  function(){
		$(this).find("div.textRollover").hide(0);
	  }
	);
  
  


$('#content_gallery') 
               
     .cycle({ 
     	fx: 'uncover', 
     	pause:	1, 
     	cleartype: 1, 
     	cleartypeNoBg: true, 
     	timeout: 4000, 
     	speed:0,
     	next:   '#next2,#content_gallery', 
  		prev:   '#prev2' 
    
    }); 
                
       
}); 

