	$(function(){
		// don\'t forget this init!
		$.initWindowMsg();
		var childWin;

	//funkce slouzi k overeni existence substringu
	jQuery.isSubstring = function(haystack, needle) {
	return haystack.indexOf(needle) !== -1; };

	var pathname;
	// funkce naplni promenou pathname hodnotou url
	$(document).ready(function() {
		pathname = window.location.pathname;
		//document.write(pathname);
	});

if( $.isSubstring(pathname, "article") && $.isSubstring(pathname, "edit")) {
	$('#openWin0').click(function(){
		childWin = window.open('List2','', "width=500, height=500, location=no, menubar=no, scrollbars=no, status=no, toolbar=no");
		if (window.focus) {childWin.focus()}});

	$('#openWin1').click(function(){
		childWin = window.open('List2','', "width=500, height=500, location=no, menubar=no, scrollbars=no, status=no, toolbar=no");
		if (window.focus) {childWin.focus()}});

};



	$.windowMsg("childMsg0", function(message) {
		$('#in0').val(message);
	});

	$.windowMsg("childMsg1", function(message) {
		$('#in1').val(message);
	});

});

