//ON LOAD Functions and Call
//Should only be in here if for every page
$(function(){ 

	
});

//FUNCTIONS SECTION

function initBios(section) {
	if (section=="company") {
		$.each($('#company .left ul li'), function(index, value) { 
			$('.nyroModal').nyroModal();
		});
	} else {
		$('#projects-list').hide();
		$('#projects-list ul li a').click(function () {
			$('#projects-list').animate({
					height: 'toggle'
			});
		});
		if ($(window).width() < 650) {
			removeCoda();
		}
		$('#hide_projects').attr('href','javascript:void(0);')
		$('#hide_projects').click(function() {
			$('#details > a:first-child').text("View all Work");
			$('#projects-list').animate({
					height: 'toggle'
			});
		});
	
		$.each($('#team-list li'), function(index, value) { 
			$('.nyroModal').nyroModal();
		});

		$('#details > a:first-child').attr("href","javascript:void(0);")
		
		$('#details > a:first-child').click(function(){
	
			var myStr = $(this).text();
			if ( myStr == "View all Work" ) {
				$(this).text("Hide all Work");
				
			} else {
				$(this).text("View all Work");
				
			}

			$('html, body').animate({
				scrollTop:100
			}, 'slow');
			$('#projects-list').animate({
					height: 'toggle'
			});
			
			

			
				

		});
	}
}

function removeCoda() {
	var firstImg = $('#coda-slider-2 .panel-container .panel:first-child').html();
	$('#gallery').html(firstImg);
	$('#gallery img').css('width','100%');
}





//CLEAR FORM ON FOCUS
// clearing  inputs on focus
function doClear(theText) { if (theText.value == theText.defaultValue) { theText.value = ""; } }
//replace input value with default on blur
function doReset(theText) { if (theText.value == "") { theText.value = theText.defaultValue; } }
