// 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();
	// IE is not working
	// $("#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();
	$(".edit-asset").show();
	$('#sm').hide();
	$('#add-s').removeClass('pressed');
	$('.ui-resizable-handle').hide();
	$('.home-edit-section').removeClass("home-edit-section").css('z-index','auto');
	$( '.snippet' ).unbind("click");
	//enable video player
	$('.triggeroff').hide();
	// IE is not working
	// $("#black-overlay").fadeOut(200);



};

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



$(document).ready(function () { 
	$('#navigation').prepend('	<span class=\"home\">\n			  		<a href=\"http://www.georgianaavram.com/\" do_follow=\"true\">home<\/a>\n				\n\n	<\/span>\n	<span class=\"events\">\n			  		<a href=\"http://www.georgianaavram.com/events\" do_follow=\"true\">events<\/a>\n				\n\n	<\/span>\n	<span class=\"images\">\n			  		<a href=\"http://www.georgianaavram.com/albums\" do_follow=\"true\">images<\/a>\n				\n\n	<\/span>\n	<span class=\"resume\">\n			  		<a href=\"http://www.georgianaavram.com/resume\" do_follow=\"true\">resume<\/a>\n				\n\n	<\/span>\n	<span class=\"about\">\n			  		<a href=\"http://www.georgianaavram.com/about\" do_follow=\"true\">about<\/a>\n				\n\n	<\/span>\n	<span class=\"contact\">\n			<a href=\"/contact\" do_follow=\"true\">contact<\/a>\n	<\/span>\n');
	

	$("body").append('<script type=\"text/javascript\">\nvar clicky_site_id = 66418673;\n(function() {\n  var s = document.createElement(\'script\');\n  s.type = \'text/javascript\';\n  s.async = true;\n  s.src = \'//static.getclicky.com/js\';\n  ( document.getElementsByTagName(\'head\')[0] || document.getElementsByTagName(\'body\')[0] ).appendChild( s );\n})();\n<\/script>\n<noscript><p><img alt=\"Clicky\" width=\"1\" height=\"1\" src=\"//in.getclicky.com/66418673ns.gif\" /><\/p><\/noscript>\n');  
 	$('.login').show(); 
 	$('.error').remove();
 	$('.notice').remove();
	 $('.edit-asset').hide();
	


 });
