if(typeof(jq) == 'undefined') {
	jq = jQuery.noConflict();
}

jq(document).ready(function($) {
	jq('noscript').remove();
});

function findLike() {
	return false;
}

var fbutils = {
	like: function(link, show, x, y) {
		jq('#like').remove();
		
		xpos = parseInt(x);
		ypos = parseInt(y);
		
		if(show == 'show') {
			link = escape(link);
			var iframsrc = '';
			
			if(String(window.location.href).match(/https/g)) {
				iframsrc = 'https://www.facebook.com/plugins/like.php?locale=pl_PL&href='+link+'&layout=button_count&show_faces=false&width=120&action=like&font=tahoma&colorscheme=light&height=21';
			} 
			else {
				iframsrc = 'http://www.facebook.com/plugins/like.php?locale=pl_PL&href='+link+'&layout=button_count&show_faces=false&width=120&action=like&font=tahoma&colorscheme=light&height=21';
			}
			
			var likeme = jq('<iframe>').attr({id: 'like', scrolling: 'no', frameborder: '0', src: iframsrc}).css({ overflow: 'hidden', width: '140px', height: '20px', position: 'absolute', zIndex: 999});
			likeme.css({top: ypos, left: xpos, border: 'none', background: 'transparent', padding: '1px 0 0 1px'});
			
			if(jq.browser.msie) {
				likeme.css({height: 21, width: 120});
			}

			jq('#website').before(likeme);

			return true;
		}
		return false;		
	},
	
	likevisible: function(v) {
		if(v == 'visible') { jq('#like').css({zIndex: 999}); } else { jq('#like').css({zIndex: 0}); }
	},
	
	movelike: function(x,y) {
		
		xpos = parseInt(x);
		ypos = parseInt(y);
		
		jq('#like').css({top: ypos, left: xpos, zIndex: 999});
		return true;
	}
}

