Custom widget


jQuery Code:

	$(function(){
		window.api = $(".scrollable-trigger").switchable(".scrollable-panel > div > img", {
			triggerType: "click",
			effect: "scroll",
			steps: 3,
			visible: 3,
			api: true
		});
		$(".next").click(function(){
			api.next();
		});
		$(".prev").click(function(){
			api.prev();
		});
		
		/* Custom widget */
		$(".scrollable-panel > div > img").click(function() {
			$(".widget").empty();
			$("<img>", { src: $(this).attr("src") }).appendTo(".widget");
		}).css("cursor", "pointer").first().trigger("click");
	});