$(document).ready(function(){

	
	$('#slider ul a').click(function () {
	
		//reset all the items
		$('.customBlock ul a').removeClass('active');
		
		//set current item as active
		$(this).addClass('active');	
		
		//scroll it to the right position
		$('.mask').scrollTo($(this).attr('rel'), 300);
		
		//disable click event
	    return false;		
		
	});


	$('#cycle1').cycle({
		fx: 'fade'
	});
	$('#cycle2').cycle({
		fx: 'fade'
	});
	$('#cycle3').cycle({
		fx: 'fade'
	});
	$('#cycle4').cycle({
		fx: 'fade'
	});
	$('#cycle5').cycle({
		fx: 'fade'
	});	
	jQuery(function($){
		$('.scroll').localScroll({
		axis:'y',duration:1000,hash:false}
		);
	});


	$('#aboutMe a.toggle').click(function(){
		$('.meerkat').destroyMeerkat();
		$('.meerkat').meerkat({
			height: '300px',
			width: '100%',
			position: 'bottom',
		
			close: '.close-meerkat',
			animationIn: 'slide',
			animationSpeed: 500,
			removeCookie: '.reset'
		}).removeClass('pos-top pos-left pos-right').addClass('pos-bot');
	});
	


			
	/*
	fancybox init on each cloud-zoom element
	 */
	$("a.fancy").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'none',
		'speedIn'		:	600,
		'speedOut'		:	200,
		'overlayShow'	:	true,
		'overlayColor'	:	'#000',
		'cyclic'		:	true,
		'easingIn'		:	'easeInOutExpo'
	});

$('#flickr').jflickrfeed({
limit: 6,
	qstrings: {
		id: '39383392@N08'
	},
	itemTemplate: 
	'<li>' +
		'<a href="{{image_b}}"><img src="{{image_s}}" alt="{{title}}" /></a>' +
	'</li>'
	});



	
});
