/*
 * BieScript
 *
 * Warning:
 * This script file needs jQuery 1.2.1 or higher in order to function correctly!
 *
 */

jQuery(document).ready(function() {
	
	/* IE 6 fix */
	
	jQuery('input[type="checkbox"]').css( {
		background: "none", 
		border: "none"
	} );
	
	/* IE 6 fix */
	
	jQuery('input[type="radio"]').css( {
		background: "none", 
		border: "none"
	} );
	
	jQuery('input[type="submit"]').css( {
		padding: "2px 4px"
	} );	
	
	/* Form submit for images in forms with "button_" in src attribute */
		
	jQuery('form img[src*="button_"]').click(function() {		
		jQuery(this).parents('form').submit();
	} );
		
	/* Form submit for input elements on enter press */
	
	jQuery('#fSearch input[type="text"], #dSearch input[type="text"]').keyup(function(event) {
		if(event.keyCode == 13) {
			jQuery(this).parents('form').submit();
		}
	} );

	/* Form submit for images in forms with "button_" in src attribute */
		
	jQuery('form a.basketChange').click(function() {		
		jQuery(this).parents('form').submit();
	} );
	
	/* Automatic value for input element "searchparam" */
	
	jQuery('#fSearch input[name="searchparam"]').blur(function() {
		if(this.value == '') {
			this.value = 'Volltextsuche';	
		}			
	} );

	/* Automatic value for input element "searchparam" */

	jQuery('#fSearch input[name="searchparam"]').focus(function() {
		if(this.value == 'Volltextsuche') {
			this.value = '';	
		}
	} );
	
	/* Equals height of classes detailsLeft aund detailsRight */
	
	if(jQuery('.detailsLeft').height() < jQuery('.detailsRight').height()) {
		jQuery('.detailsLeft').height(jQuery('.detailsRight').height());
	}
	
/* automatic submit on change on a select element
	
	jQuery('form select').change(function() {
		jQuery(this).parents('form').submit();
	} );
*/
	
} ); 
 
