// JavaScript Document 
$(function(){
	

				// Dialog			
				$('#dialog').dialog({
					autoOpen: false,
					width: 800,
					height: 200,
					minHeight: 200,
  				    modal: true
					/*,buttons: {
						"Ok": function() { 
							$(this).dialog("close"); 
						}, 
						"Cancel": function() { 
							$(this).dialog("close"); 
						} 
					}*/
				});
				
							
				// Dialog Link
				$('.dialog_link').click(function(){
					var link = $(this).attr("href");										
					$('#dialog a.link').attr('href', link);										
					$('#dialog').dialog('open');	
					setTimeout(function() {
  						window.location.href = link;
					}, 20000);			
					return false;
				});	
				
				function redirect() {	
				var redirect =  document.getElementById.href()
					setTimeout("window.location = document.getElementById.href()",5000);	
				}			
					
					
				//hover states on the static widgets
				$('.dialog_link, ul#icons li').hover(
					function() { $(this).addClass('ui-state-hover'); }, 
					function() { $(this).removeClass('ui-state-hover'); }
				);
				
			});
