/*
	FIELD OFFICE JAVASCRIPT
	USES THE JQUERY LIBRARY
	CREATED: 26.12.10
	MODIFIED: 26.04.11
	AUTHOR: ANDY FIELD @ FIELDOFFICE.CO.UK
*/

$(document).ready(function(){

	//$('#slides').galleria();

	$('a[href=#top]').click(function(){
        $('html, body').animate({scrollTop:0}, 'slow');
        return false;
    });
    
	$('.details').css('display','none');
   	$('.showme').hover(function() {
      	//$('.details',this).show().animate({opacity:1,left:0},300);
		//}, function() { $('.details').animate({opacity:0,left:-100},100);
      	$('.details',this).show().animate({opacity:1,bottom:0},300);}, function() { $('.details').animate({opacity:0,bottom:-100},100);
   	});
   	
	$('.showme').hover(function() {
	   	$('.plus',this).toggleClass('plusme');
   	});
   	
   	$('#showcase').slides({
		preload: true,
		preloadImage: '/assets/loading.gif',
		container: 'preview',
		play: 5000,
		pause: 2500,
		hoverPause: true,
		generateNextPrev: false,
		generatePagination: true,
		paginationClass: 'flipper'
	});
	
	/*
	$('#top a').addClass('hidden');
	$.waypoints.settings.scrollThrottle = 30;
	$('#summary').waypoint(function(event, direction) {
		$('#top a').toggleClass('hidden', direction === "up");
	}, {
		offset: '0'
	}).find('#swrap').waypoint(function(event, direction) {
		$(this).parent().toggleClass('sticky', direction === "down");
		event.stopPropagation();
	});
	*/
	
});
