// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

jQuery(function(){
 
 $.addRels = function(id) {
   $("a.popup").attr("rel","");
   $("#event_list_" + id + " a.popup").attr("rel","prettyPhoto[inline]");   
 };
 
 $.initPopup = function() {
   $(".pp_pic_holder").remove();
   $(".pp_overlay").remove();
   $(".ppt").remove();   
   $("a[rel^='prettyPhoto']").prettyPhoto({
     theme: 'light_square',
     default_width: 690,
		 callback: function(){ location.reload(true);}
   });
 };
 
 $.updateItemText = function(text) {
   $("div.nav_elements p.item").text(text);
 };
 
 $.showElement = function(elem) {
   $(elem).show();
 };
 
 $.hideElement = function(elem) {
   $(elem).hide();
 };

 $.fn.disableField = function() {
   $(this).attr('disabled','disabled');
 };

 $.fn.enableField = function() {
   $(this).removeAttr('disabled');
 };
 
	$(".hdate").hover(
			function () {
				$(this).css('background', '#FFD402').css('display', 'block');
			},
			function () {
				$(this).css('background', '#fff');
			}
		);
		
	$("#images .image").live("mouseover", function() {
		$(this).find(".image_delete").show();
	});
	
	$("#images .image").live("mouseout", function() {
		$(this).find(".image_delete").hide();
	});
});

