//.inputFieldText('tekst','klasa');
jQuery.fn.inputFieldText = function(string, hintClass) {
	this.each(function() {
		$(this).addClass(hintClass).val(string);
		$(this).focus(function(){
			if ($(this).val() == string){
				$(this).removeClass(hintClass).val('');
			}
		});
		$(this).blur(function(){
			if ($(this).val() == '' ){
				$(this).addClass(hintClass).val(string);
			}
		});  
	});
};

//text replace
$.fn.replaceText=function(b,a,c){return this.each(function(){var f=this.firstChild,g,e,d=[];if(f){do{if(f.nodeType===3){g=f.nodeValue;e=g.replace(b,a);if(e!==g){if(!c&&/</.test(e)){$(f).before(e);d.push(f)}else{f.nodeValue=e}}}}while(f=f.nextSibling)}d.length&&$(d).remove()})};

function vote(mi, ti) {
   window.open('http://www.carfocus.pl/ajax/vote.php?wid=' + mi + '&oid=' + ti, 'vot'+mi, 'width=150, height=100, noscrollbars');
}
function vote2(mi, ti) {
   window.open('http://www.carfocus.pl/ajax/vote2.php?wid=' + mi + '&oid=' + ti, 'vot'+mi, 'width=150, height=100, noscrollbars');
}