$(function(){

				// Accordion
				$(".accordion").accordion({ 
					header: "h3",
					collapsible: true
					});
	
				// Tabs
				$('#tabs').tabs({
					cookie: { expires: 30 }
					});
	
				// Dialog			
					$("div:[alt='dialogBox']").dialog({
					autoOpen: false,
					width: 950,
					bgiframe: false,
					resizable: true,
					modal: true,
					overlay: {
					backgroundColor: '#000',
					opacity: 1
					},
					buttons: {
						'Close': function() {
							$(this).dialog('close');
						}
					}
				});
				
				// Dialog Link
				$("p[alt='dialog_link']").click(function(){
				var dialogueBoxToOpen = $(this).attr("nextBox");
				$("#" + dialogueBoxToOpen).dialog('open');
				return false;
				});
				
				
				
				
				
				
				
				
				

				// Datepicker : assigns to a box with a class of "calendar"
				$('.calendar').datepicker({ 
					dateFormat: 'dd/mm/yy',
					inline: true
					});

				
				$("#slider").slider({
					value:100,
					min: 0,
					max: 500,
					step: 50,
					slide: function(event, ui) {
						$("#amount").val('$' + ui.value);
					}
				});
				$("#amount").val('$' + $("#slider").slider("value"));


				
				// Progressbar
				$("#progressbar").progressbar({
					value: 20
				});
				
				//hover states on the static widgets
				$('#dialog_link, ul#icons li').hover(
					function() { $(this).addClass('ui-state-hover'); }, 
					function() { $(this).removeClass('ui-state-hover'); }
				);
				
			});