			$(function(){

				// Accordion
				$("#accordion").accordion({ header: "h3" });
	
				// Tabs
				$('#tabs').tabs();
	

				// Dialog			
				$('#dialog').dialog({
					autoOpen: false,
					width: 600,
					buttons: {
						"Ok": function() { 
							$(this).dialog("close"); 
						}, 
						"Cancel": function() { 
							$(this).dialog("close"); 
						} 
					}
				});
				
				// Dialog Link
				$('#dialog_link').click(function(){
					$('#dialog').dialog('open');
					return false;
				});

				// Datepicker
				$('#datepicker').datepicker({
					inline: true
				});
				
				// Slider
				$('#slider').slider({
					range: true,
					values: [17, 67]
				});
				
				// 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'); }
				);
				
			});
function menu(){
				$(" #menu ul li ul ").css({display: "none"});
				$(" #menu ul li").hover(function(){
					$(this).find('ul:first').css({visibility: "visible",display: "none"}).slideToggle(500);
					},function(){
					$(this).find('ul:first').css({visibility: "hidden"});
					});
				}
				$(document).ready(function(){					
					menu();
			});
			//  tweet
			$('#slides').cycle({ 
				fx:     'scrollHorz', 
				prev:   '#arrowleft', 
				next:   '#arrowright', 
				timeout: 9000 
			});
			

			
			$(document).ready(
				function(){
				$("#arrowhide a").click(function(){
				  $("#slideshower").slideToggle("slow");
				  $("#arrowhide a").toggleClass("hidden");
				});
			});
			
			// Z-index in IE7 Improvement
			$(function() {
				var zIndexNumber = 1000;
				$('div').each(function() {
					$(this).css('zIndex', zIndexNumber);
					zIndexNumber -= 10;
				});
			});
			
			
			
