Hi There,

I'm trying to reduce the load speed of an ekmpowershop-powered site, and to do this I'd like to combine all of the javascript scripts into one. As I have no idea how to do this, I'm going to try using the jmerge tool. First I need to put all of the javascript into their own files, rather than directly in the <head> of the site. Which brings me to my point...In the following code, why is the
Code:
var $j = jQuery;
wrapped in its own script tags, and is it directly related to the script beneath it?
Can I put these both in their own external js file?

Here is the code in full:

Code:
<script type="text/javascript">
var $j = jQuery; 
</script>
<script language="JavaScript" type="text/JavaScript">
x = 20;
y = 70;
function setVisible(obj)
{
	obj = document.getElementById(obj);
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
}
function placeIt(obj)
{
	obj = document.getElementById(obj);
	if (document.documentElement)
	{
		theLeft = document.documentElement.scrollLeft;
		theTop = document.documentElement.scrollTop;
	}
	else if (document.body)
	{
		theLeft = document.body.scrollLeft;
		theTop = document.body.scrollTop;
	}
	theLeft += x;
	theTop += y;
	obj.style.left = theLeft + 'px' ;
	obj.style.top = theTop + 'px' ;
	setTimeout("placeIt('layer1')",500);
};
</script>
Thanks,
Dan