// JavaScript Document
function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        //carousel.startAuto(0); //stop autoscroll
    });

    carousel.buttonPrev.bind('click', function() {
        //carousel.startAuto(0); //stop autoscroll
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

/*
function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(37.4419, -122.1419), 13);
        map.setUIToDefault();
      }
    
    }
*/

function initialize(_long, _lat) {
    var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(_long, _lat), 10);
        map.setUIToDefault();
    var marker = new GMarker(new GLatLng(_long, _lat));
    map.addOverlay(marker);
    map.disableScrollWheelZoom();
    

} 

$(document).ready(function(){
	
        jQuery('.carusel').jcarousel({
                scroll: 1,
                auto: 5,
        wrap: 'last',
                initCallback: mycarousel_initCallback
        });
        
        jQuery('.carusel2').jcarousel({
                scroll: 1,
                wrap: 'last',
                initCallback: mycarousel_initCallback
        });
        
        //$("a[rel='example1']").colorbox({transition:"fade"});
        $("a[rel='example1']").colorbox();
        
        
        //realizace hledani input
        /*
        $('._js_input_text').focus(
            function() {
                if (this.value == this.defaultValue) {
                    this.value = '';
                }
            }
        );

        $('._js_input_text').blur(
            function() {
                if (this.value == '') {
                    this.value = this.defaultValue;
                }
            }
        );
        */
});	

