$(document).ready(function(){	


	$('.email_link').text('info@lithyem.net');
	$('.email_link').attr('href','mailto:info@lithyem.net');

	
	$('a.btt').click(function(){
		$.scrollTo(0,1000);
		return false;
	});
	
	$('a.more').click(function(){
		$(this).fadeOut();
		$(this).parent().next('div.more').fadeIn();
		return false;
	});
	
	$('a.less').click(function(){
		$(this).parent().parent().prev('p').find('a.more').fadeIn();
		$(this).parent().parent().fadeOut();
		
		return false;
	});
	
	$('div.more').hide();
	
	$("a[rel='scroll']").click(function(){
		var n = $(this).attr('href');
		var p = n.replace("#","");
		var i = $("a[name='"+p+"']");
		$.scrollTo(i,1000);
		
		return false;
	});
	
	
	

	Cufon.replace('h2');
	Cufon.replace('.styled');
	
	$("a[rel='external']").attr('target','blank');

    $('.slideshow_images').after('<p class="prevnext"><a href="#" class="prev">prev</a> <a href="#" class="next">next</a></p>');
    
     $('div.loading').hide();
    
    $('.slideshow_images').each(function(){
    	var p = $(this).next('p').find('a.prev');
    	var n = $(this).next('p').find('a.next');
    	$(this).cycle({
			fx:'scrollLeft',
			timeout:0,
			prev:p,
			next:n,
			speed:300
		});
    });

});