[jQuery] Newbie Question

[jQuery] Newbie Question

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18813"></HEAD>
<BODY>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN class=493575514-04082009>I have a
standard php page with some jquery going on its working
fine.</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN
class=493575514-04082009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN class=493575514-04082009>Now I want
to take that page and load it into a div on a different page (tabbed layout
pretty much) but when I do the script no longer works when the page loads into
the div.</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN
class=493575514-04082009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN class=493575514-04082009>SCRIPT
CURRENTLY ON THE PHP PAGE THAT WORKS WHEN VIEWED DIRECTLY IN
BROWSER</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN
class=493575514-04082009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN class=493575514-04082009><script
type="text/javascript"><BR>$(document).ready(function()
{<BR>   $("a.group").fancybox(<BR>    {
<BR>     'overlayShow': true
<BR>    });<BR>   });<BR>       
window.onload = function () {<BR>       
 $('.sliderGallery').each(function(){<BR>      
   var id_parts = $(this).attr('id').split('_');<BR>   
var id = id_parts[id_parts.length - 1];<BR>    var container =
$('#sliderGallery_' + id) ;<BR>    var ul = $('ul',
container);<BR>            
var itemsWidth = ul.innerWidth() - container.outerWidth();<BR>   
<BR>    $('.slider',
container).slider({<BR>               
min:
0,<BR>               
max:
itemsWidth,<BR>               
handle:
'.handle',<BR>               
stop: function (event, ui)
{<BR>                   
ul.animate({'left' : ui.value * -1},
500);<BR>               
},<BR>               
slide: function (event, ui)
{<BR>                   
ul.css('left', ui.value *
-1);<BR>               
}<BR>           
});<BR>       
});<BR>       
};<BR></script></SPAN></FONT></DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN
class=493575514-04082009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN class=493575514-04082009>How can I
get it to still work when loaded into the DIV?</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN
class=493575514-04082009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN
class=493575514-04082009>Thanks</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN
class=493575514-04082009></SPAN></FONT> </DIV>
<DIV align=left><FONT size=2 face=Arial>Dave </FONT></DIV></BODY></HTML>