function getWidth() {
var resizePcs = $('.imgObal').get();
for ( var i = 0; i < resizePcs.length; i++ ) {
tmpHeight = $(resizePcs[i]).width();
$(resizePcs[i]).css("height", tmpHeight+"px");
}
resizePcs = $('.imgObalObd').get();
for ( var i = 0; i < resizePcs.length; i++ ) {
tmpHeight = $(resizePcs[i]).width()*0.63;
$(resizePcs[i]).css("height", tmpHeight+"px");
}
var mapa = $('#map_canvas');
var mapaHeight = mapa.width()*0.63;
mapa.css("height", mapaHeight+"px");
var h1Height = $('.pokracovani #cover img').height();
if (!h1Height || h1Height < 30 || h1Height > 200) {
h1Height = 88;
}
$('.pokracovani .h1').css("line-height", h1Height+"px");
var pcsHeight = $('.pcs').width();
$('.pokracovani .pcs').css("height", pcsHeight/1.5+"px");
var pcsHeight = $('.pcs').width();
$('.uvod .pcs').css("height", pcsHeight/1.5+"px");
}
function zobraz() {
var img = $("#lupa");
img.attr("src", "../../../../../pcs/lupaB.gif");
img.attr("onClick", "sendForm();");
var text = $('#textfield');
text.css("visibility", "visible");
text.focus();
}
function sendForm() {
var form = $("#formSearch");
form.submit();
}
$(document).ready(function() {
$("a[rel^='prettyPhoto']").prettyPhoto({social_tools:''});
// on resize
var delay = (function(){
var timer = 0;
return function(callback, ms){
clearTimeout (timer);
timer = setTimeout(callback, ms);
};
})();
$(window).resize(function() {
delay(function(){
getWidth();
}, 200);
});
// on load center .box
getWidth();
});