
$(document).ready(function() {

/* ***************** schaufenster *******************/
if($("#showcase").length){
// main vertical scroll
$("#showcase").scrollable({

	// basic settings
	vertical: true,

	// up/down keys will always control this scrollable
	keyboard: 'static',

	// assign left/right keys to the actively viewed scrollable
	onSeek: function(event, i) {
		horizontal.eq(i).data("scrollable").focus();
	}

// main navigator (thumbnail images)
}).navigator("#showcase_navi");

// horizontal scrollables. each one is circular and has its own navigator instance
var horizontal = $(".scrollable").scrollable({ circular: true }).navigator(".navi");


// when page loads setup keyboard focus on the first horzontal scrollable
horizontal.eq(0).data("scrollable").focus();
}
/* ***************** /end schaufenster *******************/


/* ***************** contactform *******************/
$.tools.validator.localize("de", {
	':email'  		: ': das Format ist ung&uuml;ltig.',
	'[required]' 	: 'ist ein Pflichtfeld.'
});
// adds an effect called "wall" to the validator
$.tools.validator.addEffect("wall", function(errors, event) {

	// get the message wall
	var wall = $(this.getConf().container).fadeIn();
	
	// remove all existing messages
	wall.find("p").remove();
	
	// add new ones
	$.each(errors, function(index, error) {
		wall.append(
			"<p style='padding:0'><strong>" +error.input.attr("name")+ "</strong> " +error.messages[0]+ "</p>"
		);		
	});
	
// the effect does nothing when all inputs are valid	
}, function(inputs)  {
	
});
$("#frmA40853C6F8124A0707B8500646BA6473").validator({
	lang: 'de',
	effect: 'wall', 
    container: '#errors',
   
   // do not validate inputs when they are edited
   errorInputEvent: null
	// custom form submission logic  
}).submit(function(e)  { 
   
   // when data is valid 
   if (!e.isDefaultPrevented()) {
      return true;
   
   } 

	});
	
/* ***************** /end contactform *******************/
});




