var currentShareurl = null;
var currentTitle = null;


// Set any onload-related jQuery helpers here
if (jQuery) { (function($) { $(function() { 

	// Enable popup links
	/*$("a.popup").bind("click", function(){
		window.open($(this).attr("href"));
		return false;
	});*/
   
	// If we're logged-in and on a permalink/comment page
	// There's a timeout to allow userData to load completely
	function moveTypecomment(){ 
		
		if ((commentForm = $("#comment-form")) && commentForm.height() && (userData && userData.loggedIn)) {
			
			// Remove the "Post a comment" headline block (since we're replacing it with the comment form)
			$("div.postBlock").remove();
			// Remove the extraneous dotted-border that results
			$("li.post:last").css("background", "none");
			
			// Clone comment form and append clone to main column; remove original form
			commentForm.clone().attr("id","commentForm").appendTo($(".col2")[0]);
			commentForm.remove();
			
			
			// Scroll viewport to comment form if available
			//$("html,body").animate({scrollTop: $("#commentForm").offset().top});
		
		}
		
	};
	
	window.setTimeout( function(){ 
	
	userDataEventRegistry.add(moveTypecomment())
	
	}, 1500);
	
	//setting share urls. 
	
	

	jQuery("a.share_post").bind("click", function() {
		
		//currentShareurl = "http://brides.com" + jQuery(this).parent().children('a.permalink').attr('href');
		currentShareurl = "http://www.brides.com/blog/weddedbits/102/2009/03/5773/melissa_sweet.html"
		currentTitle = jQuery('a.share_post').eq(0).parents('li.post').children('div.blogpost').children('h3.bst_txtClr_dkBrown').children('a.entry_link').text();
		console.log(currentTitle);
	}
	
	
	
	
	)
	 // End _/comment page helpers
	
	//* Put this last *//
	// This sets right and left columns to equal height as center col 
	}) })(jQuery) }   // End onload helpers