// JavaScript Document
	$(function() {
		 $('#changetag').click(function(){
					$(".tagecloud").slideToggle('show');
		});
		init();
		//init_review();
		//$("#txtfield_search").autocomplete(site_host_name+"xml/search.php");
		
		//$("#txtfield_search").keyup(function(event){
		//	if (event.keyCode == 13) {
		//		$("#form_search").submit();
		//	}
		//});
		
/*		$("#accordion-content").accordion({
			autoHeight: false,
			icons: {
    			header: "ui-icon-circle-arrow-e",
   				headerSelected: "ui-icon-circle-arrow-s",
				navigation: true,
				collapsible:true,
				clearStyle:true,
				animated:'easeslide'
			}
		});*/
		
		$(".provider-gallery").fancybox();
		
	/*	$("a.video").fancybox({
			'frameWidth':  660, 
			'frameHeight':	505, 
			'hideOnContentClick':false, 
			'overlayShow':		true
		});
		$("a.mobile").fancybox({
			'frameWidth':	500, 
			'frameHeight':	400, 
			'hideOnContentClick':false,
			'overlayShow':		false
		});	*/
	
	});
	
	
	
    var map;
	var	geocoder ;
	var marker ;
	
	 var baseIcon = new GIcon();
          baseIcon.iconSize=new GSize(32,32);
          baseIcon.shadowSize=new GSize(56,32);
          baseIcon.iconAnchor=new GPoint(16,32);
          baseIcon.infoWindowAnchor=new GPoint(16,0);
      var Icon = new GIcon(baseIcon,provider_logo, null,null);
    

/*	  var Icon = new GIcon();
      Icon.image = "<?php echo $row_RsProviderShows["logo"]; ?>";
	  Icon.iconSize = new GSize(40, 40);
      Icon.shadow = "<?php echo $row_RsProviderShows["logo"]; ?>";
      Icon.shadowSize = new GSize(36, 34);*/


	function init(){
	  if (GBrowserIsCompatible()) {
	    map = new GMap2(document.getElementById("map-index"));
	    map.setCenter(new GLatLng(provider_lat,provider_lng),provider_zoom);
		//map.addControl(new GMapTypeControl());
		map.addControl(new GSmallMapControl());
		map.enableScrollWheelZoom();
		var html= '<div class="marker_info">'+
				  '<img src= "'+site_host_name+provider_image+'" title="image" class="map_pic"  />'+
				  '<a class="map_goto_big_map" href="'+site_host_name+'maps.php?provider='+provider_id+'" target="_blank">Big Map</a></div>';
		placeMarker(new GLatLng(provider_lat,provider_lng),html,Icon);
	  }
	}
	
	/**
	 * Place Marker
	 * @param {Latlngt} latlng
	 * @param {HTML} html
	 */
	function  placeMarker(latlng,html,icon) {

		  var marker = new GMarker(latlng);
		 // allMarkers.push(marker);
		  map.addOverlay(marker);
		  marker.openInfoWindowHtml(html);
		  GEvent.addListener(marker, "click", function() {
		  	marker.openInfoWindowHtml(html);
		  });
 		return marker;
	}
	
	
	
	
