// Copyright 2004 by CodeLifter.com
// Free for all; but please leave in this header.
var Quotation=new Array()                
Quotation[0] = "Time is of the essence! Comb your hair.One of the most pleasant buying experiences I have enjoyed in 25 years of art buying. Highly reccommend Fred for all your illustration needs. Especially if you are in a crunch! - <em>Laurie Bleier, NY, US</em>";
Quotation[1] = "Sanity is a golden apple with no shoelaces.Fleamedia was a diamond. He was swift and accurate. He knew exactly what I required and understood the amendments which he dealt with exceptionally quick. Top provider, will use again and would strongly recommend.- <em>J Nollet, UK</em>";
Quotation[2] = "Very talented artist. I was extremely happy. Proved to be very responsive and eager to make as many revisions as needed to ensure that I was completely satisfied. highly recommend him to anyone! - <em>Tim Collins, Carribean</em>";
Quotation[3] = "Couldn't have asked for a better logo or more professional approach! Very creative and unique. - <em>Javier Colayco, US</em>";
// End of CodeLifter.com scripts




// feature cycle
$(document).ready(function() {
    $('.featured').cycle({
		fx: 'fade',
		speed:  'slow',
		pager:  '#pagination'
	});
	
	// Copyright 2004 by CodeLifter.com
	var Q = Quotation.length;
	var whichQuotation=Math.round(Math.random()*(Q-1));
	var quote = document.getElementById('quotation');
	quote.innerHTML = (Quotation[whichQuotation]);
	// End of CodeLifter.com scripts

});

// portfolio function
jQuery(function( $ ){
/* @see http://flesler.demos.com/jquery/scrollTo/ */
	$(('.navigasi ul li')&('div.logo')).localScroll({
		target: '#box', 
		axis: 'x',
		duration:500,
		hash:false,
		onBefore:function( e, anchor, $target ){
		},
		onAfter:function( anchor, settings ){
				
		}
	});
	
	$('#service-list li').localScroll({
		target: '#description-box', 
		axis: 'y',
		duration:200,
		hash:false,
		onBefore:function( e, anchor, $target ){
			
		},
		onAfter:function( anchor, settings ){
			
		}
	});
	
	$('#portfolio-list li').localScroll({
		target: '#portfolio-box', 
		axis: 'y',
		duration:200,
		hash:false,
		onBefore:function( e, anchor, $target ){
			
		},
		onAfter:function( anchor, settings ){
			
		}
	});

	$("ul.thumb-list a").click(function() {
		var image = $(this).attr("rel");
		var dirClass=$(this).parents('ul').attr('class').split(' ').slice(-1)[0];
		if (dirClass == 'logo-list') {
				var dirPath = 'logo';
			}  else if (dirClass == 'il-list'){
				var dirPath = 'illustration';
			} else {
				var dirPath = 'icon';
			}
		$('#logo-view').hide();
		$('#logo-view').fadeIn('slow');
		$('#logo-view').html('<img src="images/' + dirPath + '/' + image + '"/>');
		return false;
		});
		
	$('.navigasi ul li a').click(function() {
		var anchorValue = $(this).attr('href');
        if (anchorValue == '#portfolio'){
				$('.banner').fadeIn('slow');
			} else {
				$('.banner').hide();
			}
		$('.navigasi ul li a').removeClass("active");
		$(this).addClass("active");
		return false;
	});
	
	$('#service-list li').click(function() {
		$("#service-list li a").removeClass("active");
		$(this).children('a').addClass("active");
		$('.preview-box').hide();
		var servicePreview = $(this).children('a').attr("rel");
		$('.' + servicePreview ).fadeIn('fast');
		return false;
	});
	
	$('#portfolio-list li').click(function() {
		$("#portfolio-list li a").removeClass("active");
		$(this).children('a').addClass("active");
		return false;
	});
	$('.logo a').click(function() {
		$('.navigasi ul li a').removeClass("active");
		$('.banner').hide();
		var Q = Quotation.length;
		var whichQuotation=Math.round(Math.random()*(Q-1));
		var quote = document.getElementById('quotation');
		quote.innerHTML = (Quotation[whichQuotation]);
		return false;
	});

});




