var $j = jQuery.noConflict();

$j(function(){
	
	$j("img.more_info_button").hover(function() {
		$j(this).attr("src", template_path + "img/learn_more_button_hover.png");
		
	}, function() {
		$j(this).attr("src", template_path + "img/learn_more_button_no_hover.png");
		
	});

	$j("a#read_more").live("click", function() {
		
		if ( $j(this).html() == "Read more..")
		{
			$("div#read_more_content").slideDown("slow");
			$j(this).html("Read less..");
		}
		else
		{
			$j("div#read_more_content").slideUp("slow");
			$j(this).html("Read more..");
		}
		return false;
	});


	$j("a#watch_video").live("click", function() {
		if ( $j(this).html() == "Watch a Demonstration Video")
		{
			$j("div#video").slideDown("slow");
			$j(this).html("Hide Demonstration Video");
		}
		else
		{
			$j("div#video").slideUp("slow");
			$j(this).html("Watch a Demonstration Video");
		}
		return false;
	});
	
	$j("div.item_content").delay(500).slideDown("slow");
	
	/*
	$j("a.hide_item_content").click(function() {
		$j("div.item_content").slideUp(500);
	});
	
	$j("a.hide_boxcontent").click(function() {
		$j("div.item_content").slideUp(600);
		$j("div#boxcontent").slideUp(700);
	});
	*/
	
	/* click on an info_box_small and it goes to the base_url of the site / the id of the div */
	
	$j("div.info_box_small").click(function() {
		
		var link = $j(this).attr("id");
		
		if (link == "") {
			return false;
		}
		else
		{
			window.location = base_url + "/" + link;	
		}
		
	});
		
	
	$j("div.info_box").click(function() {
		
		var link = $j(this).attr("id");
		
		if (link == "") {
			return false;
		}
		else
		{
			window.location = base_url + "/" + link;	
		}
		
	});
	
});
