var jq1 = jQuery.noConflict();
jq1(document).ready(function () {
    jq1("ul.gallery li").hover(function () { //On hover...

        var thumbOver = jq1(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'

		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
        jq1(this).find("a.thumb").css({ 'background': 'url(' + thumbOver + ') no-repeat center bottom' });

		//Animate the image to 0 opacity (fade it out)
        jq1(this).find("span").stop().fadeTo('normal', 0, function () {
            jq1(this).hide() //Hide the image after fade
		});
	} , function() { //on hover out...
		//Fade the image to full opacity 
	    jq1(this).find("span").stop().fadeTo('normal', 1).show();
	});

});

var jq2 = jQuery.noConflict();
jq2(document).ready(function () {
    jq2("ul.galleryhome li").hover(function () { //On hover...

        var thumbOver = jq2(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'

        //Set a background image(thumbOver) on the <a> tag - Set position to bottom
        jq2(this).find("a.thumb").css({ 'background': 'url(' + thumbOver + ') no-repeat center bottom' });

        //Animate the image to 0 opacity (fade it out)
        jq2(this).find("span").stop().fadeTo('normal', 0, function () {
            jq2(this).hide() //Hide the image after fade
        });
    }, function () { //on hover out...
        //Fade the image to full opacity 
        jq2(this).find("span").stop().fadeTo('normal', 1).show();
    });

});
