// PNG Fix
$(document).ready(function(){
	$(document).pngFix();
});

// sIFR Flash Font Replacing
$(document).ready(function(){
	$("h1:not('.plain'), .s-home h2").sifr({
		font: 'myriad',
		path: '/img/flash',
		textAlign: 'left'
	});
});

// Open rel='external' links in new windows.
$(document).ready(function(){
 $("a[rel='external']").click(function(){
  window.open(this.href);
  return false;
 });
});


// Change postcode popup
function OpenPostcodePopUp() {
	if( $("body").hasClass("s-home") ) {
		$("#postcode").click();
	}
}

/* Search equipment - pressing Enter submits form */
// tried to make it working with browers other than I.E, but failed
/*jQuery(document).ready(function() {
	jQuery.each(jQuery.browser, function(i) {
		if(!$.browser.msie){			
			var searchButtonHref = $('#content span.btn-search a.btn').attr('href').replace('javascript:', '').replace(/"/g, "'");
			//alert(searchButtonHref);
			$("#content input.search-words").attr('onkeyup', 'if ((event.keyCode || event.which) == 13) {' + searchButtonHref + ';}');
		}
	});
});*/