if (typeof console == 'undefined'){	window.console = {		log:function(){},		info:function(){},		error:function(){},		warn:function(){}	}}$(document).ready(function(){	$('input.h_button_01_over, button.h_button_01_over')		.bind('mouseover', function(){$(this).addClass('button_01_hover')})		.bind('mouseout', function(){$(this).removeClass('button_01_hover')});});/** * @using tworzenie nowego parametru opisu */function saveCategoryDetails(id){	//table_details_list	var list_details = "";	$("#table_details_list :checkbox").each( function(i, e)	{		if(e.checked)		{			list_details += e.value + ";";		}	});	var id_subcategory = 0;	if(id != undefined)	{		id_subcategory = id;	}	$.ajax({		type: "GET",		url: "none-administracja_szczegoly-lista_1_zapis-" + id_subcategory + "," + list_details + ".html",		success: function(msg){			//alert( "Data Saved: " + msg );			alert("Zapisano");		}	});}function selectCheckBoxes(parent, state){	$("#categories input[type='checkbox'][alt='" + parent + "']").each(function(key, value){		selectCheckBoxes(value.value, state);		value.checked = state;	});}function checkCategory(id){	selectCheckBoxes(parseInt(id.value), id.checked);	var categories_value = "";	$("#categories :checkbox").each(function(key, value){		if(value.checked)			categories_value += value.value + "|";	});	loadSearchForm(categories_value);}function loadSearchForm(categories){	commonLoadAjaxContents("index.php?page=search&action=form&output=ajax", "categories=" + categories);}/*function test(){	alert("test");}*/// COMMON FUNCTIONS ============================================================function commonLoadAjaxContents(url, data, async){	if(!url)	{		return;	}	$.ajax(	{		type: "POST",		url: url,		data: data,		async: async,		dataType: "json",		global: false,		success: function(values)		{			if(values)			{				$.each(values, function(key, value)				{					$("#" + key).html(value);				});			}		}	});}function commonSendAjaxContents(url, data, async){	if(!url)	{		return;	}	$.ajax(	{		type: "POST",		url: url,		data: data,		async: async,		dataType: "json",		success: function(values)		{}	});}function commonShowColorBox(href, type, call_before, call_after, fixed_size){	if(call_before)	{		window[call_before]();	}	var colorbox_width		= "700px";	//var colorbox_height		= "500px";	var colorbox_height		= "90%";	var colorbox_opacity		= 0.5;	var colorbox_transition = "fade";	switch(type)	{		case 'iframe':			$.fn.colorbox({				width				: colorbox_width,				height			: colorbox_height,				transition		: colorbox_transition,				iframe			: true,				opacity			: colorbox_opacity,				href				: href,				overlayClose	: false,				open				: true			});			break;		case 'image':			$.fn.colorbox({				transition		: colorbox_transition,				opacity			: colorbox_opacity,				href				: href,				overlayClose	: false,				open				: true			});			break;	}		if(call_after)	{		$().unbind('cbox_closed');		$().bind('cbox_closed', function(){			window[call_after]();		});	}	return false;}
