		$(function(){			
			$('select#speedC').selectmenu();
			
			$('select#artist_select').selectmenu();
			$('select#label_select').selectmenu();
			$('select#tour_dates_artist').selectmenu();
			$('select#tour_dates_location').selectmenu();
			$('select#speedF').selectmenu();
			
			$('select#speedG').selectmenu();
			
			$('select#speedD').selectmenu();
			
			$('select#filesC').selectmenu({
				style:'popup', 
				positionOptions: {
					my: "left center",
					at: "right center",
					offset: "10 0"
				}
			});	
		});		
		
		//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;
		}		
		
		// add themeswitcher
		$(function(){ 
			var ts = $('<div class="ui-button ui-widget ui-state-default ui-corner-all" style="padding: 5px; position: absolute; top: 20px; right: 10px;">Click here to add Themeswitcher!</div>')
			.appendTo('body')
			.bind("click", function() {
				ts.text("Loading Themeswitcher...");
				$.getScript('http://ui.jquery.com/applications/themeroller/themeswitchertool/', function() {
					ts.removeClass("ui-button ui-widget ui-state-default ui-corner-all").text("").unbind("click").themeswitcher(); 
				});
			}); 
		});
	
