/**
 * Custom plugins file.
 *
 * Use this file to:
 * 
 * - Override system wide default settings from shared.
 * - Invoke default actions for each page load (see tableHighlight for example).
 *
 * Custom plugins should be placed in a separate file in the customer folder.
 */

// >>> inputFade >>>

/** The class and text to apply if the element is blurred. */
//jQuery.fn.formInputBlur.defaults.blurClass	= 'blurred';
//jQuery.fn.formInputBlur.defaults.blurText		= '';

/** The class and text to apply if the element is focused. */
//jQuery.fn.formInputBlur.defaults.focusClass	= 'focused';
//jQuery.fn.formInputBlur.defaults.focusText	= '';

// <<< inputFade <<<


// >>> tableHighlight >>>

/** The class to add if a  row is hovered */
$.fn.tableHighlight.defaults.hoverClass = 'atableRowHover';

/** The class to add if a  row is clicked (will be removed on second click) */
$.fn.tableHighlight.defaults.clickClass = 'atableRowClick';

// Example for adding the script to each atable table found on the page.
// This will automagically apply the default highlighting to each table with class "atable".
//jQuery(function(){
//	jQuery('table.atable').tableHighlight();
	
	// You may also define more presets here:
	//	jQuery('table.atableMarktinformationen').tableHighlight(hoverClass: 'hoverRowOrange', clickClass: clickRowOrange');
	//	jQuery('table.atablePartnerbereich').tableHighlight(hoverClass: 'hoverRowGreen', clickClass: clickRowGreen');
//});
	
// <<< tableHighlight <<<




// >>> formInputFilter >>>

/**
 * Presets to restrict input.
 * Uncomment these as needed, if you need a different setup for a customer.
 */

//$.fn.formInputFilterAlpha.defaults.allowedChars			= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
//$.fn.formInputFilterNumeric.defaults.allowedChars			= '0123456789';
//$.fn.formInputFilterDecimal.defaults.allowedChars			= '0123456789.,';
//$.fn.formInputFilterAlphaNumeric.defaults.allowedChars	= '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';

/**
 * You may also define custom presets available on each page:
 */
//jQuery(function(){
//	jQuery('input.tschtsch').formInputFilter({allowedChars: 'tsch'});
//});


// <<< formInputFilter <<<


/**
 * Init the plugins
 */
jQuery(function(){
	jQuery('table.atable').tableHighlight();
	jQuery('.loginInputUsername').formInputBlur({blurText: 'Benutzername'});
	jQuery('.loginInputPassword').formInputBlur({blurText: 'Passwort'});
	jQuery('.search').formInputBlur({blurText: 'Search...'});
});

