function resizeContainer() {
if ($('#container').height() < $(window).height()) {
$('#container').height($(window).height());
}
}
$(document).ready(function() {
$('#searchForm #searchBtn').click(function(){
document.searchForm.submit();
})
$('#leftNavigation li.open:last').addClass('active');
$('#mainNavigation ul li.right:first, #mainNavigation ul li.left:last, #mainNavigation ul ul li:last').css({'border': 'none'});
$('#print-version a').click(function() {
print = window.open(window.location.pathname, 'Print', '');
return false;
})
//$('body, #footer').css('border', '1px #000 solid');
resizeContainer();
if (window.name == "Print") {
$('*:not(logo)').css('background', 'none');
$('#top, #topNavigation, #mainNavigation, #mainImage, #leftNavigation, #leftSubNavigation, #leftSubSubNavigation, #blueBox').hide();
var date = new Date();
date = date.getDate() + '.' + date.getMonth() + '.' + date.getFullYear() + '.' + date.getHours() + "." + date.getMinutes() + ":" + date.getSeconds();
$('.main').prepend('
Eduard Hueck GmbH & Co. KG
')
.append('
' + date + '')
.css({'padding': '20px'});
}
$('#a-search-button').click(function() {
if ($('#a-search-form input:checked').attr('value') == 'fenster') {
$('#a-search-content').html($('#a-search-windows').html());
}
else if ($('#a-search-form input:checked').attr('value') == 'industrie') {
$('#a-search-content').html($('#a-search-profiles').html());
}
})
$('.references-popup a').click(function() {
window.open($(this).attr('href'), 'Plan', 'width=700,height=600');
return false;
})
/* External urls and files open in new window */
$('a').each(function() {
var result = $(this).attr('href').match(/([^\.]*)\.(pdf|xls|doc|zip|exe|jpg|gif)/);
if ((result !== null) || (this.href.indexOf(location.hostname) == -1)) {
$(this).attr('target', '_blank');
}
})
if ($('h1.main').html() == ' ') {
$('h1.main').remove();
}
$('.searchQuery')
.focusin(function() {
$(this).css('background', '#fff');
})
.focusout(function() {
$(this).css('background', '#E5E7EE');
})
$('.content-module.sitemap ul:not(:has(li))').remove();
// Home scroller
if ($('#news-ticker').length) {
$jScroller.add("#nt-container","#nt-wraper","left",5,true);
$jScroller.start();
}
/*
//{travelocity: 0.15}
//alert($('#news-ticker #nt-source ul').html());
//$('#news-ticker #nt-box ul').html($('#news-ticker #nt-source ul').html());
$('#news-ticker #nt-box ul').prepend($('#news-ticker #nt-source ul').html());
$('#news-ticker #nt-box li').each(function() {
$(this).html('' + $(this).html() + '');
})
$('#news-ticker #nt-box ul').liScroll();
*/
})
$(window).resize(function(){
resizeContainer();
})
/* For contact form */
function noenter() {
return !(window.event && window.event.keyCode == 13); }