/*
configuration

Plug in options

Usage:
$(selector).corners([options]);
 
Options:
radio 	(int) radius size of corners
inColor 	(color) inside color of element
outColor 	(color) outside color of corners
borderSize 	(int) border width
borderColor 	(color) color of borders

*/
var mRounding_config = {
	'.rounded': {
		'size': 0,
		'image': 'Images/Design/cutmask_10.png'
	}
	//'selector': int_size,
}


jQuery(function() {
				
				

				
});

var _officeItemListCombobox = null;
var _cssStyleSelectJQ = null;
var _animationTypeSelectJQ = null;
var _animationType = "slide";

$(
	function()
	{
		//$('select').combobox();
	});
	
	// create a jquery combobx and set the Css class styles
	function setupCombobox()
	{
		_officeItemListCombobox = $('#field-age_from').combobox(
			{
				comboboxContainerClass: "comboboxContainer",
				comboboxValueContentContainerClass: "comboboxValueContainer",
				comboboxValueContentClass: "comboboxValueContent",
				comboboxDropDownClass: "comboboxDropDownContainer",
				comboboxDropDownButtonClass: "comboboxDropDownButton",
				comboboxDropDownItemClass: "comboboxItem",
				comboboxDropDownItemHoverClass: "comboboxItemHover",
				comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
				comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer"
			},
			{
				animationType: _animationType,
				width: 250
			});
	}
	
	function changeStyle()
	{
	
		var cssStyleSelectJQ = $("#cssStyleSelect");
		var selectedStyle = cssStyleSelectJQ.val();
		selectedStyle = "style/screen/" + selectedStyle + ".css";
		
		_officeItemListCombobox.combobox.remove()
		
		$("link[@title='combobox']").attr("href", selectedStyle);
		
		// Time delay required for the new css stylesheet to be processed by the Browser,
		// otherwise, jquery.combobox cannot calculate the correct layout for the new styles
		setTimeout(setupCombobox, 1);
	}
	
	function changeAnimation()
	{
		var animationTypeSelectJQ = $("#animationTypeSelect");
		_animationType = animationTypeSelectJQ.val();
		
		_officeItemListCombobox.combobox.remove();
		setupCombobox();
	}
	
	// Example to show the dynamic insertion of data directly into the original Select element
	// and then calling the jQuery combobox to synchronise by calling update().
	function updateCombobox()
	{
		var officeItemListSelectJQ = $("#officeItemList");
		var currentDate = Date();
		officeItemListSelectJQ.append("<option value='" + currentDate + "'>" + currentDate + "</option>");

		_officeItemListCombobox.combobox.update();
	}

