//****************************************** METODY *****************************************************************

//*************************************** J Q U E R Y ****************************************************************
$(document).ready(function() {
	  
	if(document.getElementById("mapCanvas")){
		initializeMap();
    }
	
	$("#Facebook").click(function(){
	    
        var newWindow = window.open('https://www.facebook.com/pages/fit-hany-bany/222241304476879', '_blank');
        newWindow.focus();
        return false;
        
    });
    $("#google-mapa").click(function(){
    
        var newWindow = window.open('http://maps.google.com/maps?q=B%C5%99ezinova+4609+586+01+Jihlava&hl=cs&ie=UTF8&ll=49.401632,15.60123&spn=0.011297,0.033023&sll=37.0625,-95.677068&sspn=55.586984,135.263672&z=16', '_blank');
        newWindow.focus();
        return false;
        
    });
    
});

function clock()
{
    var currentTime = new Date();    
    var currentHours = currentTime.getHours ( );
      var currentMinutes = currentTime.getMinutes ( );
      var currentSeconds = currentTime.getSeconds ( );

       currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
      currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
    
    var time=currentHours+':'+currentMinutes+':'+currentSeconds;
    $('#H_time').text(time);
    
}

function date()
{
    var currentTime = new Date();    
    var day = currentTime.getDate();
      var month = currentTime.getMonth()+1;
      var year = currentTime.getFullYear();

    
    var time=day+'/'+month+'/'+year;
    $('#H_datum ').append(time);
}

function addBanner(bannerName,width,height,element){
    html = '<embed wmode="transparent" width="'+width+'" height="'+height+'" quality="high" name="mymovie" id="mymovie" style="" src="'+bannerName+'" type="application/x-shockwave-flash"/>';
    $(element).append(html);
                
}

function openInNewWindow(thisClick) {
	 // Change "_blank" to something like "newWindow" to load all links in the same new window
	 var newWindow = window.open($(thisClick).attr("href"), "_blank");
	 newWindow.focus();
	 return false;
	}


