// Jquery Plugin Settings

$(document).ready(function() {
						   // Home Page Jquery Cycle Banner Settings BEGIN
						   $('#bannerCycle')
						   .before('<div id="cycleNavBar">')
						   .cycle({
								  fx: 'fade',
								  speed: 1000,
								  timeout: 8000,
								  pager: '#cycleNavBar'
								  });
						   // Home Page Jquery Cycle Banner Settings END
						   
						   //Sub Page Jquery Cycle Banner Settings BEGIN
						   $('#bannerCycleSub')
						   .before('<div id="cycleNavBarSub">')
						   .cycle({
								  fx: 'fade',
								  speed: 1000,
								  timeout: 8000,
								  pager: '#cycleNavBarSub'
								  });
						   //Sub Page Jquery Cycle Banner Settings END
						   
						   /* // Banner Rotator Flash BEGIN
						   $('#bannerRotator').flash({
													 src: '/swf/rotator.swf',
													 type: 'application/x-shockwave-flash',
													 width: 930,
													 height: 270,
													 wmode: 'transparent' // needed to go behind the dropdown
													 //flashvars not needed. xml must be in /xml/ and called rotator.xml
													 },
													 { expressInstall: true, update: false, version: '9.0.45.0' }
													 );
						   // Banner Rotator Flash END
						   
						   // Banner Gallery Flash BEGIN
						   $('#bannerGallery').flash({
													 src: '/swf/gallery.swf',
													 type: 'application/x-shockwave-flash',
													 width: 930,
													 height: 720,
													 wmode: 'transparent', // needed to go behind the dropdown
													 flashvars: { xmlUrl: '/xml/gallery.xml' }
													 },
													 { expressInstall: true, update: false, version: '9.0.45.0' }
													 );
						   // Banner Gallery Flash END
						   
						   // Banner SlideShow Flash BEGIN
						   $('#bannerSlideshow').flash({
													   src: '/swf/slideshow.swf',
													   type: 'application/x-shockwave-flash',
													   width: 930,
													   height: 720,
													   wmode: 'transparent', // needed to go behind the dropdown
													   flashvars: { pathToFiles: '/xml/', xmlPath: 'slideshow.xml', componentWidth: 'stageW', componentHeight: 'stageH' }
													   },
													   { expressInstall: true, update: false, version: '9.0.45.0' }
													   );
						   // Banner SlideShow Flash END */

						   // Browser Specific CSS3 BEGIN
						   $('#form .submit').css({ '-moz-border-radius': '8px', '-webkit-border-radius': '8px'
												  });
						   $('#bannerCont .flashBox').css({ '-moz-border-radius': '10px', '-webkit-border-radius': '10px'
														  });
						   $('#cycleNavBar a, #cycleNavBarSub a').css({ '-moz-box-shadow': '2px 2px 20px #000', '-webkit-box-shadow': '2px 2px 20px #000'
												   });
						   $('#.Top-Pulldown .level2, #.Top-Pulldown .level3').css({ '-moz-border-radius': '5px', '-webkit-border-radius': '5px', '-moz-box-shadow': '5px 5px 25px #000', '-webkit-box-shadow': '5px 5px 25px #000'
														   });
						   // Browser Specific CSS3 END

						   // Equal Columns BEGIN
						   $('.columns').equalizeCols();
						   // Equal Columns END
						   
						   // Accordion Menu BEGIN
						   $(".mvccmenu #accordion").accordion({
													 collapsible: true,
													 autoHeight: false,
													 icons: false,
													 active: false
													 });
						   // Accordion Menu END
						   
						   // Add F2 Management Key BEGIN
						   document.onkeyup = KeyCheck;
						   function KeyCheck(e){
							   var KeyID = (window.event) ? event.keyCode : e.keyCode;
							   if (KeyID == '113') {
								   location.href = location.pathname + '?editmode=1';
								   }
								   }
						   //Add F2 Management Key END
						   
						   // Form Validation BEGIN
						   $("#contactForm").validate();
						   jQuery.validator.addMethod("postalcode", function(postalcode, element) {
																			 return this.optional(element) || postalcode.match(
																															   /(^\d{5}(-\d{4})?$)|(^[ABCEGHJKLMNPRSTVXYabceghjklmnpstvxy]{1}\d{1}[A-Za-z]{1} ?\d{1}[A-Za-z]{1}\d{1})$/);
																			 }, "Please specify a valid postal/zip code");

						   // Form Validation END
						   
						   // Zip Code Auto Complete BEGIN
						   $("#zip").blur(function() {
													   var city = $("#City");
													   if (!city.val() && $(this).valid()) {
														   $.getJSON("http://www.geonames.org/postalCodeLookupJSON?&country=DE&callback=?", {postalcode: this.value }, function(response) {
																																												if (!city.val() && response && response.postalcodes.length && response.postalcodes[0].placeName) {
																																													city.val(response.postalcodes[0].placeName);
																																												}
																																												})
													   }
													   });
						   //Zip Code Auto Complete END
						   
						   // Stops Browsers from Autocompleting BEGIN
						   $('#formFirstname').attr('autocomplete','off');
						   // Stops Browsers from Autocompleting END
						   
						   // Scroll Bar Styling BEGIN
						   //$('#navVert').jScrollPane();
						   // Scroll Bar Styling END
});
UAcode="UA-20246624-1";
