// Page Control Buttons
jQuery.fn.edithome = function() {
	$('.edit').fadeIn();
	$('.normal').hide();
	$('.snippet').css('z-index','200').addClass("home-edit-section").draggable( 'enable' ).resizable( 'enable' );
  $('.controls').show();
	$('.ui-resizable-handle').show();
	$("#black-overlay").fadeIn(400);
	$(".edit-asset").hide();
	//disable video player
	$('.triggeroff').show();
	var zmax = 0; 
	$( '.snippet' ).click( function () {
	       $( this ).siblings( '.snippet' ).each(function() {
	             var cur =  $( this ).css( 'zIndex');
	              zmax = cur > zmax ? cur : zmax;   // use 'cur' here instead of $( this ).css( 'zIndex')
	     });
	     $( this ).css( 'zIndex', zmax+1 );
	 });
	
};

jQuery.fn.normalhome = function() {
	$('.edit').hide();
	$('.normal').fadeIn();
	$('.controls').hide();
	$('.ui-resizable-handle').hide();
	$('.home-edit-section').removeClass("home-edit-section").css('z-index','auto');
	$( '.snippet' ).unbind("click");
	//enable video player
	$('.triggeroff').hide();
	$("#black-overlay").fadeOut(200);
	$(".edit-asset").show();


};

jQuery.fn.addmenu = function() {
	$('#sm').toggle();
	$(this).toggleClass('pressed');
	$("#black-overlay").toggleClass('disabled-by-menu');
	$('#sample-s').removeClass('pressed');
};



$(document).ready(function () { 
	$('#navigation').prepend('\n	<span class=\"contact\">\n		 	<a href=\"/contact\">contact<\/a>\n	<\/span> \n\n	<span class=\"about\">\n		 	<a href=\"/about\">about<\/a>\n	<\/span> \n\n	<span class=\"resume\">\n		 	<a href=\"/resume\">resume<\/a>\n	<\/span> \n\n	<span class=\"images\">\n		 	<a href=\"/albums\">images<\/a>\n	<\/span> \n\n	<span class=\"videos\">\n		 	<a href=\"/videos\">videos<\/a>\n	<\/span> \n\n	<span class=\"projects\">\n		 	<a href=\"/projects\">projects<\/a>\n	<\/span> \n\n	<span class=\"events\">\n		 	<a href=\"/events\">events<\/a>\n	<\/span> \n\n	<span class=\"news\">\n		 	<a href=\"/news\">news<\/a>\n	<\/span> \n\n	<span class=\"home\">\n		 	<a href=\"/index\">home<\/a>\n	<\/span> \n	\n');
	// any snippets that have the snippet-wrapper class in their partials will have a scroll bar. Removed this for now because it's not displaying correctly 
	$('.snippet-wrapper').jScrollPane();
	

	
		



   $('.login').show(); 
	 $('.error').remove();
	 $('.notice').remove();


 });