Wp theme Jquery conflict with plugins that use jquery
<p>I have a jquery conflict with one of the websites I administrate. reffering to this link:( <a href="http://www.terraworldltd.com/pc/business/2056.html" rel="nofollow">http://www.terraworldltd.com/pc/business/2056.html</a> ), the product page consist of fancy zoom that when the picture is clicked on, the picture zooms out. The calling for the jquery is done on the single.php for the product. This is the code:</p>

<pre><code>&lt;?php get_header(); ?&gt;

&lt;script&gt; var closebutton='&lt;?php bloginfo('template_directory'); ?&gt;/library/js/closebox.png'; &lt;/script&gt;

&lt;script type="text/javascript" src="&lt;?php bloginfo('template_directory'); ?&gt;/library/js/jquery.js"&gt;&lt;/script&gt;

&lt;script type="text/javascript" src="&lt;?php bloginfo('template_directory'); ?&gt;/library/js/fancyzoom.js"&gt;&lt;/script&gt;

&lt;link href="&lt;?php bloginfo('template_directory'); ?&gt;/library/css/thickbox.css" rel="stylesheet" type="text/css" /&gt;

&lt;script type="text/javascript" charset="utf-8"&gt;

$(document).ready(function() {

$('div.photo a').fancyZoom({scaleImg: true, closeOnClick: true});

$('#medium_box_link').fancyZoom({width:400, height:300});

$('#large_box_link').fancyZoom();

$('#flash_box_link').fancyZoom();

});

&lt;/script&gt;

&lt;script type="text/javascript"&gt;

$(document).ready(function(){

$('.hide').hide();

$('body').append('&lt;div id="infoBacking"&gt;&lt;/div&gt;&lt;div id="infoHolder" class="large"&gt;&lt;/div&gt;');

$('#infoBacking').css({position:'absolute', left:0, top:0, display:'none', textAlign:'center', background:'', zIndex:'600'});

$('#infoHolder').css({left:0, top:0, display:'none', textAlign:'center', zIndex:'600', position:'absolute'});

if($.browser.msie){$('#infoHolder').css({position:'absolute'});}

$('.more').mouseover(function() {$(this).css({textDecoration:'none'});} );

$('.more').mouseout(function() {$(this).css({textDecoration:'none'});} );

$('.more').click(function(){

if ($('.' + $(this).attr("title")).length &gt; 0) {

browserWindow()

getScrollXY()

if (height&lt;totalY) { height=totalY; }

$('#infoBacking').css({width: totalX + 'px', height: height + 'px', top:'0px', left:scrOfX + 'px', opacity:0.85});

$('#infoHolder').css({width: width + 'px', top:scrOfY + 25 + 'px', left:scrOfX + 'px'});

source = $(this).attr("title");

$('#infoHolder').html('&lt;div id="info"&gt;' + $('.' + source).html() + '&lt;p class="clear"&gt;&lt;span class="close"&gt;Close X&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;');

$('#infoBacking').css({display:'block'});

$('#infoHolder').show();

$('#info').fadeIn('slow');

}

$('.close').click(function(){

$('#infoBacking').hide();

$('#infoHolder').fadeOut('fast');

});

});

/* find browser window size */

function browserWindow () {

width = 0

height = 0;

if (document.documentElement) {

width = document.documentElement.offsetWidth;

height = document.documentElement.offsetHeight;

} else if (window.innerWidth &amp;&amp; window.innerHeight) {

width = window.innerWidth;

height = window.innerHeight;

}

return [width, height];

}

/* find total page height */

function getScrollXY() {

scrOfX = 0;

scrOfY = 0;

if( typeof( window.pageYOffset ) == 'number' ) {

scrOfY = window.pageYOffset;

scrOfX = window.pageXOffset;

} else if( document.body &amp;&amp; ( document.body.scrollLeft || document.body.scrollTop ) ) {

scrOfY = document.body.scrollTop;

scrOfX = document.body.scrollLeft;

} else if( document.documentElement &amp;&amp; ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {

scrOfY = document.documentElement.scrollTop;

scrOfX = document.documentElement.scrollLeft;

}

totalY = (window.innerHeight != null? window.innerHeight : document.documentElement &amp;&amp; document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body != null ? document.body.clientHeight : null);

totalX = (window.innerWidth != null? window.innerWidth : document.documentElement &amp;&amp; document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null);

return [ scrOfX, scrOfY, totalY, totalX ];

}

return false;

});

&lt;/script&gt;
</code></pre>

<p>I recently installed couple of plugins that use jquery, but it does not work on the product page. When I remove:</p>

<pre><code>&lt;script type="text/javascript" src="&lt;?php bloginfo('template_directory'); ?&gt;/library/js/jquery.js"&gt;&lt;/script&gt;
</code></pre>

<p>from the code above, the plugins start to wok but the fancyzoom stops working.</p>

<p>I have tried every solution I found on google, but none of them worked. Including the no conflict and changing '$' to 'j' in the jquery. I really appreciate if if someone can help me.</p>
