/*

File: custom.js

For: Pixelation
Author: Luke Smith - HisHandiwork.biz
Created: 03/09/11



--- TABLE OF CONTENTS ---


1. IMAGE ZOOM
2. SHOW MENU SEARCH
3. PORTFOLIO 4 SLIDING CAPTIONS
4. JMENU
5. PAGE JUMP
6. FANCYBOX
7. LATEST TWEETS
8. TIPSY FOR REPLACING THE "TITLE" ATTRIBUTE VALUES 
9. JCAROUSEL
10. PIKA CHOOSE


*/
/* 5 *** PAGE JUMP */
$('.jump').click(function() {
	var elementClicked = $(this).attr("href");
	var destination = $(elementClicked).offset().top;
	$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 1000 );
	return false;
});



/* 9 *** JCAROUSEL */
jQuery(document).ready(function() {
    jQuery('.imageCarousel').jcarousel({
        auto: 3,
        scroll: 1,
        wrap: 'last',
        animation: 700,
        initCallback: mycarousel_initCallback,
        buttonNextHTML: null,
        buttonPrevHTML: null
    });
});

function mycarousel_initCallback(carousel) {
    jQuery('.carousel-next').bind('click', function() {
        carousel.next();
        return false;
    });

    jQuery('.carousel-prev').bind('click', function() {
        carousel.prev();
        return false;
    });
};


