title: "TypeError: $(...).dialog is not a function" is showing when I am trying to open the map using markicon method
body: <p>Why I am getting this error?When I am trying to open a map It is not showing and I am getting the above error.
  Please Help me. When I am not adding the  "jquery.min.js" it is working fine.But when I am adding map is not opening at that time.When the map is showing the "quicksearch" method is not working.        </p>
  
  <pre><code>    &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" /&gt;
     &lt;script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"&gt;&lt;/script&gt;
     &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8./jquery.min.js"&gt; &lt;/script&gt;
   &lt;script type="text/javascript" src="Scripts/jquery.quicksearch.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
     &lt;!--Quick Search Method--&gt;
      $(function () {
          $('[id$=txtBdoNames]').each(function (i) {
              alert("Search Running");
              $(this).quicksearch("[id*=grdAgentReport] tr:not(:has(th))", {
                  'testQuery': function (query, txt, row) {
                      return $(row).children(":eq(" + ")").text().toLowerCase().indexOf(query[0].toLowerCase()) != -1;
                  }
              });
          });
      });
  
  
      function Openpopup(popurl) {
          alert("Map Running");
          winpops = window.open(popurl, "", "width=1000, height=800, left=15, top=45, scrollbars=yes, menubar=no,toolbar=no,resizable=no,directories=no,location=no")
      }
      var map = null; var infowindow;
      var directionsDisplay;
      var directionsService = new google.maps.DirectionsService();
  
  
      function InitializeMap() {
  
          directionsDisplay = new google.maps.DirectionsRenderer();
  
          var latlng = new google.maps.LatLng(0.0, 0.0);
          var myOptions = {
              zoom: 13,
              center: latlng,
              mapTypeId: google.maps.MapTypeId.ROADMAP
          };
  
  
          map = new google.maps.Map(document.getElementById("map"), myOptions);
  
          directionsDisplay.setMap(map);
  
      }
      function calcRoute(start, end) {
  
          var request = {
              origin: start,
              destination: end,
              travelMode: google.maps.DirectionsTravelMode.DRIVING
          };
          directionsService.route(request, function (response, status) {
              if (status == google.maps.DirectionsStatus.OK) {
                  directionsDisplay.setDirections(response);
              }
          });
      }
  
      function markicons(listString) {
          InitializeMap();
          var markerarray = new Array();
          var locations = [];
          var ltlng = listString.split('~');
  
          var bounds = new google.maps.LatLngBounds();
  
          for (var i = 0; i &lt; ltlng.length; i++) {
              var loc = ltlng[i].split(",")
              var lat = parseFloat(loc[0])
              var lng = parseFloat(loc[1])
              var curPoint = new google.maps.LatLng(lat, lng);
              bounds.extend(curPoint);
              locations.push(curPoint);
          }
  
  
  
          for (var i = 0; i &lt; locations.length; i++) {
              var iconPath = 'http://maps.google.com/mapfiles/ms/icons/red-dot.png';
              if (i == 0) {
                  iconPath = 'http://maps.google.com/mapfiles/ms/icons/blue-dot.png';
              }
              else if (i == locations.length - 1) {
                  iconPath = 'http://maps.google.com/mapfiles/ms/icons/green-dot.png';
              }
  
              marker = new google.maps.Marker({
                  map: map,
                  icon: iconPath,
                  position: locations[i]
              });
  
              markerarray[i] = marker.getPosition();
  
  
              (function (i, marker) {
  
                  google.maps.event.addListener(marker, 'mouseover', function () {
  
                      if (!infowindow) {
                          infowindow = new google.maps.InfoWindow();
                      }
  
                      if (i == 0) {
                          infowindow.setContent("Starting Point");
                      }
                      else if (i == locations.length - 1) {
                          infowindow.setContent("Ending Point");
                      }
                      else {
                          infowindow.setContent("Point: " + (i + 1));
                      }
  
  
                      infowindow.open(map, marker);
  
                  });
  
              })(i, marker);
  
          }
          var flightPath = new google.maps.Polyline({
              path: markerarray,
              geodesic: true,
              strokeColor: '#FF0000',
              strokeOpacity: 1.0,
              strokeWeight: 2
          });
  
          flightPath.setMap(map);
  
          var dil = $("#map").dialog({
              autoOpen: false,
              minHeight: 500,
              minWidth: 1024,
              height: 500,
              width: 1024,
              closeOnEscape: true,
              modal: true,
              buttons: {
                  "CLOSE": function () {
                      $(this).dialog("close");
                      //$("#map").style.display = "none";
                  }
              }
          });
          dil.dialog('open');
          google.maps.event.trigger(map, "resize");
          map.setCenter(locations[0]);
      }
  
  &lt;/script&gt;
  </code></pre>