/*  www.stevenpotestio.com  */

/* Footer Scroll to top link */
function goToByScroll(id){
	$('html,body').animate({scrollTop: $("#"+id).offset().top},'normal');
}


/* COMMENTS FORM */
$(document).ready(function(){
	$(".ce_comments div.form").hide();
	$(".ce_comments h2").click(function(){
		$(".ce_comments div.form").toggle();
	});
});


/*
 * Mobile Scripts
 */
$(document).ready(function(){
	var winWidth = $(window).width();
	var mobileWidth = 767;
	var contactPage = $("body").hasClass("contact");
	
	if (winWidth < mobileWidth && !contactPage){
		$('#container #main').detach().prependTo('#container');
	}
	
});

$(document).ready(function(){
	var winWidth = $(window).width();
	var mobileWidth = 767;
	
	if (winWidth < mobileWidth){
		//Remove portfolio showcase
		$("#mainNav li.portfolio a").click(function(event){
			event.preventDefault();
			window.location = "http://stevenpotestio.com/index.php/featured-projects-listing.html";
		});
	}
	
});
