
/**** preloader ****/

if (start) {
	var ima = new Array('menu2_hov.png', 'menu2_hov2.png', 'home_hov.png', 'hybrid_hov.png', 'oferta_hov.png', 'kontakt_hov.png');
	for(var i = 0; i < ima.length; ++i) {
		temp = ima[i];
		ima[i] = new Image();
		ima[i].src = base+'tpl/pl/szablon1/images/'+temp;
	}
}

$(document).ready(function() {

	var buff, temp, stop;

	/**** _target="blank" ****/
	buff = $('a').map(function() { return $(this); });
	jQuery.each(buff, function(index, value) {
		temp = value.attr('href');
		if (temp != undefined && (temp.substr(0, 7) == 'http://' || temp.substr(0, 8) == 'https://')) {
			stop = temp;
			temp = temp.replace(/http:\/\//, '');
			if (temp != stop) {
				temp = temp.split('/');
				if (temp[0] != window.location.host) value.attr('target', '_blank');
			}
		}
	});
	stop = false;

});

/***** linki do innych stron *****/

function href(url) {
	window.location.href = url;
}

