/*** pg-events ***/
$(document).ready(function(){
						   
	var target = 'body div.s_singleEvent';			
	var whichLink = 'span.s_venue a:eq(0)';	
	
	/* make div clickable; put hover class & status bar */	
	  $(target).each(function() {
		  $(this).hover(
		  function() {
			$(this).addClass('hoveredEvent');
			status=$(whichLink, this).attr('href');
			$('div.btn_wrapper a.btn' ,this).css({'marginTop':'0px', 'lineHeight':'100%'});
			$('div.btn_wrapper a.btn span' ,this).css({'height':'13px'});
			
			$('div.btn_wrapper' ,this).show();
		  },
		  function () {
			 $(this).removeClass('hoveredEvent');
			 $('div.btn_wrapper' ,this).hide();
		  }); //end:hover event
	
		$(this).click(function(event) {
			if (event.target == this) {
		   	location = $(whichLink, this).attr('href');
			}
		}); //end:click event
	  }); // end:each
  		$("div#s_events div.s_items div.s_singleEvent:last").addClass("last");
	  $("p.city").toggle(function() {
		$("p.city").removeClass("opened");
		$("div.s_singleEvent").removeClass("showcity");
		var nextElem = $(this).next();
		while(!nextElem.hasClass("city")) {
			nextElem.addClass("showcity");	
			if(nextElem.hasClass("last")) {
				break;
			}					
			nextElem = nextElem.next();
		}
		$(this).addClass("opened");
		return false;
	}, function() {
		$("p.city").removeClass("opened");
		$("div.s_singleEvent").removeClass("showcity");		
	});
}); // end:$(document).ready



