/* elgg friendsPicker plugin adapted from Niall Doherty's excellent Coda-Slider - http://www.ndoherty.com/coda-slider */ jQuery.fn.friendsPicker = function(iterator) { var settings; settings = $.extend({ easeFunc: "easeOutExpo", easeTime: 1000, toolTip: false }, settings); return this.each(function() { var container = $(this); container.addClass("friends-picker"); // set panelwidth manually as it's hidden initially - adjust this value for different themes/pagewidths var panelWidth = 730; // count the panels in the container var panelCount = container.find("div.panel").size(); // calculate the width of all the panels lined up end-to-end var friendsPicker_containerWidth = panelWidth*panelCount; // specify width for the friendsPicker_container container.find("div.friends-picker-container").css("width" , friendsPicker_containerWidth); // global variables for container.each function below var distanceToMoveFriendsPicker_container; var friendsPickerNavigationWidth = 0; var currentPanel = 1; // generate appropriate nav for each container container.each(function(i) { // generate Left and Right arrows $(this).before("