var PhotoGallery = {
	
	init:function(pagesize){
		jQuery(document).ready(function() {
		    jQuery('#mycarousel').jcarousel({
		      scroll:1, 
		      /*wrap:"circular",*/
			  wrap: 'last',
		      auto:5,
			  size:pagesize,
		      initCallback: PhotoGallery.mycarousel_initCallback
			  // This tells jCarousel NOT to autobuild prev/next buttons
        	  ,buttonNextHTML: null
        	  ,buttonPrevHTML: null
		    });
		});
	},
	
	mycarousel_initCallback:function(carousel){
		jQuery('#mycarousel-next').bind('click', function() {
	        carousel.next();
	        return false;
	    });

	    jQuery('#mycarousel-prev').bind('click', function() {
	        carousel.prev();
	        return false;
	    });
	},
	
	toggleHover:function(obj){
		$(obj).hover(
			function(){ 
				$(this).addClass("ui-state-hover"); 
			},
			function(){ 
				$(this).removeClass("ui-state-hover"); 
			}
		)
	}
	
};
