Desperate help needed to solve jQuery slider and Lighbox conflict

Desperate help needed to solve jQuery slider and Lighbox conflict

Hi,

I am using jQuery slider and Lightbox on a page. Slider is working fine but Lightbox isn't. Seems like there is a conflict between these two.
I searched about this problem and found a lot of answers on different sites/forums/blogs and almost all of them suggested using jQuery noConflict() with some changes to code. I tried my best to do that but no matter what I do the problem is not fixed.
If Lightbox works then Slider doesn't. If Slider works then Lightbox doesn't!!

Please have a look at the following code I am using and suggest a fix.

  1. <script type="text/javascript" src="js/prototype.js"></script> 
  2. <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script> 
  3. <script type="text/javascript" src="js/lightbox.js"></script> 
  4. <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> 
  5. <script type="text/javascript"> 
  6. $(document).ready(function() {
  7.  
  8. //Get size of the image, how many images there are, then determin the size of the image reel.
  9. var imageWidth = $(".window").width();
  10. var imageSum = $(".image_reel img").size();
  11. var imageReelWidth = imageWidth * imageSum;
  12.  
  13. //Adjust the image reel to its new size
  14. $(".image_reel").css({'width' : imageReelWidth});
  15.  
  16. //Paging  and Slider Function
  17. rotate = function(){
  18.     var triggerID = $active.attr("rel") - 1; //Get number of times to slide
  19.     var image_reelPosition = triggerID * imageWidth; //Determines the distance the image reel needs to slide
  20.  
  21.     $(".paging a").removeClass('active'); //Remove all active class
  22.     $active.addClass('active'); //Add active class (the $active is declared in the rotateSwitch function)
  23.  
  24.     //Slider Animation
  25.     $(".image_reel").animate({
  26.         left: -image_reelPosition
  27.     }, 500 );
  28.  
  29. }; 
  30.  
  31. //Rotation  and Timing Event
  32. rotateSwitch = function(){
  33.     play = setInterval(function(){ //Set timer - this will repeat itself every 7 seconds
  34.         $active = $('.paging a.active').next(); //Move to the next paging
  35.         if ( $active.length === 0) { //If paging reaches the end...
  36.             $active = $('.paging a:first'); //go back to first
  37.         }
  38.         rotate(); //Trigger the paging and slider function
  39.     }, 3000); //Timer speed in milliseconds (7 seconds)
  40. };
  41.  
  42. rotateSwitch(); //Run function on launch
  43. });
  44. </script>