$(document).ready(function(){
  
  	$(".project_thumb").hover(function(){
		//alert("rollover");			
		var infoarea = $(this).children(".project_thumb_info");
		infoarea.addClass('project_thumb_active');
	});	
  
  	$(".project_thumb").mouseleave(function(){
		//alert("rollover");			
		var infoarea = $(this).children(".project_thumb_info");
		infoarea.removeClass('project_thumb_active');
  	});	
	
	$(".project_thumb").click(function(){
		var purl = $(this).attr("rel");
		document.location.href = "http://www.blacknorth.tv/"+purl;
	});
	
	$(".news_section a.readmore").click(function(){
		var linktxt = $(this).html();	
		var extraarea = $(this).parent().parent().children(".extranews");	
		
		if(linktxt == "Read More") {
			extraarea.slideDown('fast');
			$(this).html("Read Less");	
		} else {
			extraarea.slideUp('fast');
			$(this).html("Read More");
		}
	});
	
	$(".extranews").hide();
	
	
	// Project Pin Projection
	
	$("#request_pin_link").click(function(){
		$("#form_container").slideDown('fast');
		$("#request_pin_msg").html("Simply fill out the form below and we'll send you a PIN by email.");
	});
	
	
	$("#pin_submit").click(function() {
		//alert("button clicked");
		/*
		$.ajax({
			dataType : 'json',
			url: "http://www.blacknorth.tv/etc/verify_pin.php",
			data: ({}),
			success: function(data){
				alert(data);
			},
			error: function (request, status, error) {
				alert(request.responseText);
			}
		});  // ajax block 
		
		$.ajax({
		 	type: "POST",
		 	url: "http://www.blacknorth.tv/etc/verify_pin.php",
		 	data: "name=John&location=Boston",
		 	success: function(msg){
		   		alert( "Data Saved: " + msg );
		 	}
	   });
	   */
	});
	
	
	// google map stuff
	
	/*
	if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(54.59571291777208,-5.931072235107422), 15);
		var point = new GLatLng(54.59571291777208,-5.931072235107422);
   		map.addOverlay(new GMarker(point));

        map.setUIToDefault();
      }
*/
	
});   <!-- /document ready --->
