	
/* ------------------------------------------
 *  PHOTO VIEW PAGE
 * ---------------------------------------- */
function viewPage(){
	// Submit the comment via ajax
	$('#add-comment').submit(ajaxAddComment);
}

function indexPage() {
}

function meeboStatus(uid) {
	$.ajax({
		url: DOMAIN_ASYNC + '/user/tracking/is_online?uid='+uid,
		type: 'get',
		success: function(transport) {
			var response = eval("(" + transport + ")");
			if (response.header.code == '0') {
				if (response.header.msg == 'online') {
					$('#meebo_is_online').show();
				}
			}
		}.bind(this)
	});
}

/**
 * Checks to make sure non-default comment text is passed in on submission 
 **/
function validateComment() {
    if ($('#txtComment') && ($('#txtComment').val().substring(0,17) == 'Make a comment on' || !$('#txtComment').val().length)) {
        alert("Please enter some comment text.");
        return false;
    }
    else {
	    return true;
    }
}

/********** Functions for the profile/dashboard pages **************/
function standalonePlayer(enid) {
    $('#featured-playlist-links').html($('#featured-playlist-links_' + enid).html());
}
function getPlayer(gid) {
	return (navigator.appName.indexOf("Microsoft") != -1) ? window[gid] : document[gid];
}

// -----------------------------------------
// Function to call that reloads the player with the given id
// -----------------------------------------
function reloadFeaturedPlaylist(enid) {
	getPlayer('mini').loadPlaylist(enid);
	standalonePlayer(enid);
    // document.getElementById('featuredPlaylist').scrollIntoView();
}
