// for clearing the search query
function clearquery(id,text) {
 if(!document.getElementById(id)) return false;
 if (document.getElementById(id).value == text) {
	document.getElementById(id).value = "";
 }
}
// image rotation 
$(document).ready(
 function(){
  $('#vt_featureSlot').css({'display': 'none'});
  $('#vt_features_all').css({'display': 'block'});
  $('#vt_features_all').innerfade({ 
    animationtype: 'fade',
    speed: 'slow',
    timeout: 7000,
    type: 'random',
    containerheight: '400px'
  });
 }
);
// Google  Maps Initialization
$(window).unload(GUnload());
$(window).load(
function () {
        if (GBrowserIsCompatible()) {
                var icon = new GIcon(G_DEFAULT_ICON);
                icon.image = "/local_assets/www.vtc.vt.edu/images/map_mark.png";
        icon.iconSize = new GSize(102, 58);
        icon.iconAnchor = new GPoint(48, 58);
        icon.shadow = "/local_assets/www.vtc.vt.edu/images/map_mark_shadow.png"
        icon.shadowSize = new GSize(102, 58);
        icon.infoWindowAnchor = new GPoint(5, 30);
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(37.25602, -79.943497), 4);
        //map.disableDragging();
        var point = new GLatLng(37.25602, -79.943497);
        map.addOverlay(new GMarker(point, icon));
    }
}
);
