var $j = jQuery.noConflict();
this.screenshotPreview = function(){	
	/* CONFIG */
		
		xOffset = 10;
		yOffset = 30;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	$j("a.screenshot").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$j("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");								 
		$j("#screenshot")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$j("#screenshot").remove();
    });	
	$j("a.screenshot").mousemove(function(e){
		$j("#screenshot")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};

$j(document).ready(function() {
$j("a.fb").fancybox(); 
$j("#pageflip").hover(function() { //On hover...
	$j("#pageflip img , .msg_block").stop()
		.animate({ //Animate and expand the image and the msg_block (Width + height)
			width: '307px',
			height: '319px'
		}, 500);
	} , function() {
	$j("#pageflip img").stop() //On hover out, go back to original size 50x52
		.animate({
			width: '50px',
			height: '52px'
		}, 220);
	$j(".msg_block").stop() //On hover out, go back to original size 50x50
		.animate({
			width: '50px',
			height: '50px'
		}, 200); //Note this one retracts a bit faster (to prevent glitching in IE)
});
	
			//Hide (Collapse) the toggle containers on load
			//$j('.toggle-container').hide();
			//$j('.firstopen').show();
			//Slide up and down & toogle the Class on click
			//$j('.trigger').click(function(){
			//$j(this).toggleClass('active').next('.toggle-container').slideToggle('fast');
			//});
			
			//$("#imageFlowWrap").animate({
			// left: "0px"
			//}, 600 ); 

				//Hide (Collapse) the toggle containers on load
	
			$j('.firstopen').show();
			//Slide up and down & toogle the Class on click
			$j('.trigger').click(function(){										
			$j(this).toggleClass('active').next('.toggle-container').slideToggle('fast');
			$j('.toggle-container').hide();
			});

			screenshotPreview();
			
			$j("a.registertoday").hover(function() { 
			$j(this).stop().animate({ backgroundColor: "#015ABB",color: "#fff" }, 600);
			},function() {
			$j(this).stop().animate({ backgroundColor: "#ffffff", color: "#015ABB" }, 400);
			});

			
		var options = {
  		newsList: "#news",
		tickerRate: 25,
 		startDelay: .5,
		loopDelay: 3500,
 		placeHolder1: " _"
	}
	$j('').newsTicker(options);
	
	//$j("ul#portfolio").innerfade({
	//speed: 1000,
	//timeout: 5000,
	//type: 'sequence',
	//containerheight: '150px'
	//				});
	
							
});