/**
 * element.js
 * @author | sunder
 * @email  | sunder@subswara.com
 * 
 * This file contains functions related to building and handling the elementny.com website
 */
 
 
/**
 * getSideNav
 * 
 * This function will load the html snippiets via ajax that are in the sidebar.
 * 
 * Requires: Yahoo open source js for handling the ajax connection.
 * 
 */
 function getSideNav() { 
	YAHOO.util.Connect.asyncRequest('GET','http://www.elementny.com/ajax/nav_feature.html',featureCallback);
	YAHOO.util.Connect.asyncRequest('GET','http://www.elementny.com/ajax/nav_join.html',joinCallback);
}


/**
 * featureCallback
 * Callback object called for building the featured item section
 */
var featureCallback = { 
	success: function(o) {document.getElementById("navFeature").innerHTML = o.responseText;}, 
	failure: function(o) {/*do nothing*/}
}

/**
 * joinCallback
 * Callback object for building the join section
 */
var joinCallback = { 
	success: function(o) {document.getElementById("navJoin").innerHTML = o.responseText;}, 
	failure: function(o) {/*do nothing*/}
}



function swap(imgSrc) {
	document.getElementById("mainPic").src = "images/clubpics/" + imgSrc;	
}

function swapSpecial(imgSrc) {
	document.getElementById("mainPic").src = "images/specialpics/" + imgSrc;	
}

