hs.graphicsDir = 'css/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.outlineType = 'rounded-white';
hs.fadeInOut = true;
hs.dimmingOpacity = 0.0; //0.75
// define the restraining box
hs.useBox = true;
hs.width = 800;
hs.height = 600;
// Add the controlbar
hs.addSlideshow({
    //slideshowGroup: 'group1',
    interval: 5000,
    repeat: false,
    useControls: true,
    fixedControls: 'fit',
    overlayOptions: {
        opacity: 1,
        position: 'bottom center',
        hideOnMouseOut: true
    }
});
function loadMap(id,latitude,longitude, zoom, tipo) {
    zoom = zoom ? zoom : 16;
    //http://maps.google.com/maps?f=q&source=s_q&hl=pt-BR&geocode=&q=Av.+Mutir%C3%A3o+2361+Goi%C3%A2nia&sll=-16.69898,-49.269297&sspn=0.013688,0.019312&g=Av.+Mutir%C3%A3o+1361+Goi%C3%A2nia&ie=UTF8&ll=-16.699119,-49.268505&spn=0.003422,0.004828&t=h&z=18
    if (GBrowserIsCompatible()) {

        var map = new GMap2(document.getElementById(id));
        map.setCenter(new GLatLng(latitude,longitude), zoom);

        tipo = tipo ? tipo : G_NORMAL_MAP;

        map.setMapType(tipo);

        map.addControl(new GSmallMapControl());
        //map.addControl(new GScaleControl());
        //map.addControl(new GMapTypeControl());
        //map.addControl(new GOverviewMapControl());

        var marker = new GMarker(new GLatLng(latitude,longitude));
        map.addOverlay(marker);
        //marker.openInfoWindowHtml("<img src='images/map_desc.gif' align='left' />");

    }
}
function popUp(url, name, x, y) { 
    name = name?name:'popup';
    x = x?x:350;
    y = y?y:300;
    setTimeout(function(){
        open(url,name,'width='+x+',height='+y);
    }, 1);
}
$(document).ready(function(){
    $('input, textarea, select').keyup(function(){
        var maxlength = parseInt($(this).attr('maxlength'), 10);
        var index = $('input, textarea, select').index(this);
        if(maxlength > 0 && this.selectionEnd == maxlength)
            $('input, textarea, select').eq(index+1).focus();
    });
});
