 /*
 * TipTip
 * Copyright 2010 Drew Wilson
 * www.drewwilson.com
 * code.drewwilson.com/entry/tiptip-jquery-plugin
 *
 * Version 1.2   -   Updated: Jan. 13, 2010
 *
 * This Plug-In will create a custom tooltip to replace the default
 * browser tooltip. It is extremely lightweight and very smart in
 * that it detects the edges of the browser window and will make sure
 * the tooltip stays within the current window size. As a result the
 * tooltip will adjust itself to be displayed above, below, to the left 
 * or to the right depending on what is necessary to stay within the
 * browser window. It is completely customizable as well via CSS.
 *
 * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */



$(document).ready(function(){
     
   
   /* Tabele */
	$('#example').dataTable({
					"bJQueryUI": true,
					"sPaginationType": "full_numbers",
					"oLanguage": {
					  "sLengthMenu": "Pokaż _MENU_ rekordów na stronę",
					  "sZeroRecords": "Nie ma żadnych rekordów",
					  "sInfo": "Pokaż od _START_ do _END_ z _TOTAL_ rekordów",
					  "sInfoEmtpy": "Pokaż od 0 do 0 z 0 rekordów",
					  "sInfoFiltered": "(przeszukałem z _MAX_ wszystkich rekordów)",
					  "sSearch": "Szukaj:",
					  "sPrevious": "Poprzednia",
					  "sFirst": "Pierwsza",
					  "sNext": "Następna",
					  "sLast": "Ostatnia"
			      },
					"aaSorting": [ [0,'asc'] ],
					"bFilter": true
	});   
	
											  
		$("a[rel^='prettyPhoto']").prettyPhoto({
			theme:     'light_square',
			iframe:     true,
			autoDimensions: false,
			default_width: 520,
			default_height: 520,
		});
		
	


   
});
	
	
	
	function what2validate(id) {
		
		if(id == 1) {
			document.getElementById('invoice_person').style.display='block';
			document.getElementById('invoice_company').style.display='none';
		} else if (id == 2) {
			document.getElementById('invoice_person').style.display='none';
			document.getElementById('invoice_company').style.display='block';
		} else {
			document.getElementById('invoice_person').style.display='none';
			document.getElementById('invoice_company').style.display='none';
		}
	}
