 			jQuery(document).ready(function($) {
											

  $('#views-exposed-form-property-search-bar-page-1 .views-exposed-form #edit-city option').each(function(index) {
    $(this).addClass($(this).val());
  });
  


 $('#items-per-page-selector select').change(function(){
													  
	var url = window.location;
	
	url += 'items-per-page=' + $(this).val();
    window.location += '&items-per-page=' + $(this).val();
 });

		
											
				$('ul.buttons .printerdiv').prepend('<li class="pf"><a href="#">Printer Friendly Version</a></li>');
				$('#dialog-form .printerdiv').prepend('<a href="#">Printer Large Map</a>');
				
				$('ul.buttons li.pf a').click(function() {
				window.print();
				return false;
		
				});	
				
				
		

			

  $('.page-node ul#menu1 div.formitem').hide();
  $('#menu1 div.formitem').hide();

  $.each($('ul.formmenu'), function(){
  var cookie = $.cookie(this.id);
  if(cookie === null || String(cookie).length < 1) {
  $('#' + this.id + '.expandfirst div:first').show();
  }
  else {
  $('#' + this.id + ' .' + cookie).next().show();
  }
  });
  $('ul.formmenu li a').click(
  function() {
 
  var checkElement = $(this).next();
  var parent = this.parentNode.parentNode.id;
 
  if($('#' + parent).hasClass('noaccordion')) {
  if((String(parent).length > 0) && (String(this.className).length > 0)) {
  if($(this).next().is(':visible')) {
  $.cookie(parent, null);
 }
 else {
 $.cookie(parent, this.className);
 }
 $(this).next().slideToggle('normal');
 }
 }
 if((checkElement.is('div.formitem')) && (checkElement.is(':visible'))) {
 if($('#' + parent).hasClass('collapsible')) {
 $('#' + parent + ' div.formitem:visible').slideUp('normal');
 }
 return false;
 }
 if((checkElement.is('div.formitem')) && (!checkElement.is(':visible'))) {
 $('#' + parent + ' div.formitem:visible').slideUp('normal');
 if((String(parent).length > 0) && (String(this.className).length > 0)) {
 $.cookie(parent, this.className);
 }
 checkElement.slideDown('normal');
 return false;
 }
 }
 );
  
											});
				
		
