	//----------------------------------------------------------------------------------------
	//GALLERY ADJUST EFFECTS LAYER
	var $j = jQuery.noConflict();
	$j(document).ready(function () {
		if($j("#gallery_img").length > 0){
			adjust_gallery_position();
			setTimeout(adjust_gallery_position, 500);
			$j("#gallery_effect").fadeOut("fast");
		}
		if($j("#slideshow_toggle").length > 0){
			//
			$j("#slideshow_toggle").click(function(){
				toggle_galery_slideshow();
			});
			toggle_galery_slideshow();
		}
		$j(window).bind('resize', function() {
			if($j("#gallery_img").length > 0){
				adjust_gallery_position();
			}
		});
	});
	function adjust_gallery_position(){
		var $j = jQuery.noConflict();
		if($j("#gallery_img").length > 0){
			$j("#gallery_effect").css("left", $j("#gallery_img").position().left + "px");
			$j("#gallery_effect").css("top", $j("#gallery_img").position().top + "px");
			$j("#gallery_effect").css("width", $j("#gallery_img").width() + "px");
			$j("#gallery_effect").css("height", $j("#gallery_img").height() + "px");
		}
	}
	//----------------------------------------------------------------------------------------
	//GALLERY PRELOAD
	function preload(imgarray){
		var myimgarray = new Array();
		if(imgarray){
			for(var i = 0; i < imgarray.length; i++){
				myimgarray[i] = new Image(100, 100);
				myimgarray[i].src = imgarray[i];
			}
		}
	}
	//----------------------------------------------------------------------------------------
	//NAVIGATION  DROPDOWNS
	$j(document).ready(function () {
		//if li has inner ul
		//on mouse over, display child ul, set position = li position
		if($j("#navigation li").length > 0){
			$j("#navigation li:has(ul)").mouseover(function(){
				//$(this).children("ul").css("display", "block");
				$j("#nav_sub_lvl").html($j(this).children("ul").html());
				$j("#nav_sub_lvl").css("display", "block");
				$j("#nav_sub_lvl").css("top", $j(this).position().top + "px");
				$j("#nav_sub_lvl").css("left", $j(this).position().left + "px");
			});
		}
		$j("#nav_sub_lvl").mouseleave( function(){
			$j(this).css("display", "none");
		});
	});
	//----------------------------------------------------------------------------------------