// JavaScript Document
$(document).ready(function() {

// otevirani pdf v novem okne
$("a[href$=.pdf]").each(function() {
    $(this).attr("target", "_blank");
});

// vyska boxu v karte vozidla (parametry, vybava, hledani)
/*var col1h = $("#bottomBox").height();
var col2h = $("#topBox").height();
//alert(col2h+ ' - ' + col1h);
if (col1h != null && col2h != null){
	colhsum = (col1h+col2h+47);
	
	if ($.browser.msie && $.browser.version.substr(0,1)<8) {
		colhsum = colhsum - 45;
	}
	
	$("#bottomBox").css('margin-top', (col2h+40)+'px');
	$("#topBox").css('margin-top', '-'+colhsum+'px');
	$("#topBox").css('width', '610px');
	$("#topBox").css('position', 'absolute');
}*/

$('#podlahy-detail .s').click(function() {
  ori_src = $(".dekor .dek").attr("src");
  $(".dekor .dek").attr('src', $(this).attr("href"));
  //$(".dekor .s img").attr('src', ori_src);
  $(".dekor .s").css('display', 'none');
  return false;
});
$('#podlahy-detail .d').click(function() {
	//alert($(this).attr("href"));
  $(".dekor img").attr('src', $(this).attr("href"));
  return false;
});

$('.demand').click(function(){
  	if ($('#demand').css('display') == 'none') 	$('#demand').css('display', 'block');
    else										$('#demand').css('display', 'none');
    return false;
  });

});

