--- jcarousel/js/jcarousel.js	(revision 35382)
+++ jcarousel/js/jcarousel.js	(revision 35642)
@@ -6,13 +6,18 @@
 (function($) {
 
 Drupal.behaviors.jcarousel = function(context, settings) {
+	//only set the behaviors if the context is the document -- otherwise things get screwed up
+	// on ajax-loading of other views in the same page
+	if(context.nodeName != '#document' ) return;
+	
   var settings = settings || Drupal.settings;
   for (var key in settings.jcarousel.carousels) {
     var options = settings.jcarousel.carousels[key];
 
     // Callbacks need to be converted from a string to an actual function.
     for (var optionKey in options) {
-      if (optionKey.match(/Callback$/)) {
+    	//fix error caused by ajaxing another view on same page as carousel, see patch http://drupal.org/node/1058028#comment-4119070
+      if (optionKey.match(/Callback$/) && typeof options[optionKey] == 'string') {
         var callbackFunction = window;
         var callbackParents = options[optionKey].split('.');
         for (var objectParent in callbackParents) {
@@ -31,8 +36,16 @@
     if (options.auto && options.autoPause && !options.initCallback) {
       options.initCallback = function(carousel, state) {
         Drupal.jcarousel.autoPauseCallback(carousel, state);
+        ///HACK - JRS ABT - added external controls in options
+        if( options.controls == 1 ){
+        	Drupal.jcarousel.externalControls(carousel);
+        }
       }
     }
+    ///HACK - JRS ABT - added external controls in options
+    else if( options.controls == 1 ){
+    	Drupal.jcarousel.externalControls(carousel);
+    }
 
     // Change next and previous buttons to links for accessibility.
     if (!options.hasOwnProperty('buttonNextHTML') && !options.hasOwnProperty('buttonPrevHTML')) {
@@ -154,4 +167,17 @@
   alert(Drupal.t("An error occurred at @path.\n\nError Description: @error", {'@path': path, '@error': error_text}));
 };
 
+/**
+ * Add behavior for external controls
+ */
+Drupal.jcarousel.externalControls = function(carousel){
+	//create the external controls if they don't exist
+	
+	//add the behavior to control links
+	carousel.container.siblings('div.jcarousel-control').find('a').bind('click', function() {
+		carousel.scroll(jQuery.jcarousel.intval( parseInt( jQuery(this).attr('rel') ) ));
+		return false;
+	});
+};
+
 })(jQuery);
