jQuery.noConflict();

jQuery(document).ready(function() { 

	jQuery('#username').keyup(username_check);

	jQuery(".fancybox").fancybox();

	jQuery("a.fancy").fancybox({ 
		'hideOnContentClick': true, 
		'imageScale': true,
		'zoomSpeedIn': 250, 
		'zoomSpeedOut': 250, 
		'overlayShow': false 
	}); 
	
	jQuery("a.vframe").fancybox({  
         width: '80%',
         height: '80%',
         
         scrolling: 'no'   

     });  

    lastBlock = jQuery("#accord");
    maxWidth = 150;
    minWidth = 25;	

    jQuery("ul.accords li a").hover(
      function(){ 
        jQuery(lastBlock).animate({width: minWidth+"px"}, { queue:false, duration:400 });
		jQuery(this).animate({width: maxWidth+"px"}, { queue:false, duration:400});
	lastBlock = this;
    });

   	jQuery("div.bar").mosaic({ 
		animation:	'slide'		//fade or slide - graphics

	}); 
	
	jQuery("div.bar2").mosaic({
		//animation:	'slide'		//fade or slide - downloads
		animation : 'slide',
		speed : 400
	});

	jQuery("div.bar3").mosaic({
		//animation:	'slide'		//fade or slide - downloads
		animation : 'slide',
		speed : 400
	});
});

function username_check(){	
	var username = jQuery('#username').val();
	if(username == "" || username.length < 4){
		jQuery('#tick').hide();
	}else{

	jQuery.ajax({
		   type: "POST",
		   url: "js/checkUsername.php",
		   data: 'username='+ username,
		   cache: false,
		   success: function(response){
				if(response == 1){
					jQuery('#tick').hide();
					jQuery('#cross').fadeIn();
				}else{
					jQuery('#cross').hide();
					jQuery('#tick').fadeIn();
			 }
		}
	});
  	}
}
	
function onloadfunction(){
	readhidden(); 
	resizePics();
}

window.onload = onloadfunction;    

SyntaxHighlighter.all()
