jQuery.preloadImages = function()
{
	for(var i = 0; i<arguments.length; i++)
	jQuery("<img>").attr("src", arguments[i]);
}
//jQuery.preloadImages("plus.png", "pluso.png");
var jscp0func;
var jscp1func;
jQuery(document).ready(function()
{
	jscp0func = function() {
		$('div.jScrollPaneContainer').css('display','none');
	};
	jscp1func = function() {
		
		$('div.jScrollPaneContainer').css('display','');
		//$('div.jScrollPaneContainer').css('margin-left','-16px');
		//$('div.jScrollPaneContainer').css('margin-top','-21px');
		$('div.jScrollPaneContainer').css('height','412px');
	};
	
	$('#pane2').jScrollPane({showArrows:true, scrollbarWidth: 15, arrowSize: 16});
	//$('div.jScrollPaneContainer').css('height','412px');
	
	$("#sideBar .contact").click
	(
		function()
		{
			
			var iconName = $(this).children("img").attr("src");
			$("#sideBar .topContainer").children("img").attr({src: HOME + "/images/plus.png"});
			$(this).children("img").attr({src:HOME + "/images/pluso.png" });
			$(this).animate({ height: "412px" }, {queue:true, duration:"normal", complete:jscp1func});
			$(this).children("span").animate({opacity: "show"}, "fast");
			$("#sideBar .featured").animate({height:"1px"},{queue:false, duration:"normal", complete:jscp0func});

		}
		
	);
	$("#sideBar .topContainer").click
	(
		function()
		{
			var iconName = $(this).children("img").attr("src");
			$(this).children("img").attr({src:HOME + "/images/pluso.png"});
			$("#sideBar .contact").children("img").attr({src: HOME + "/images/plus.png"});
			$("#sideBar .featured").animate({height: "412px"},{queue:false, duration:"normal", complete:jscp0func});
			$(this).children("span").animate({opacity: "hide"}, "fast");
			$("#sideBar .contact").animate({height: "29px"},{queue:true, duration:"normal", complete:jscp1func});
			
		}		
	);
});