		$(function(){
			$('select#propertytype').selectmenu({style:'dropdown'});
			$('select#pricemin').selectmenu({style:'dropdown'});
			$('select#orderby').selectmenu({style:'dropdown'});
			$('select#pricemax').selectmenu({style:'dropdown'});		
			$('select#pricemin2').selectmenu({style:'dropdown'});
			$('select#pricemax2').selectmenu({style:'dropdown'});		
			$('select#city').selectmenu({maxHeight:'300', style:'dropdown'});
		});
		

		
		//a custom format option callback
		var addressFormatting = function(text){
			var newText = text;
			//array of find replaces
			var findreps = [
				{find:/^([^\-]+) \- /g, rep: '<span class="ui-selectmenu-item-header">$1</span>'},
				{find:/([^\|><]+) \| /g, rep: '<span class="ui-selectmenu-item-content">$1</span>'},
				{find:/([^\|><\(\)]+) (\()/g, rep: '<span class="ui-selectmenu-item-content">$1</span>$2'},
				{find:/([^\|><\(\)]+)$/g, rep: '<span class="ui-selectmenu-item-content">$1</span>'},
				{find:/(\([^\|><]+\))$/g, rep: '<span class="ui-selectmenu-item-footer">$1</span>'}
			];
			
			for(var i in findreps){
				newText = newText.replace(findreps[i].find, findreps[i].rep);
			}
			return newText;
		}

$(window).resize(function() {
  setDivWidth();
});

function setDivWidth(){
var totalWidth = $(window).width();
$("#right1").width(totalWidth - 265);
}



