
$(document).ready(function(){	

	
	/******************************************
	 * ankerlinks animieren
	 */
		 var duration=500;

	     // easing values: swing | linear
	     var easing='swing';
	 
		 $('a[href*=#]').click(function() {

		      // duration in ms
		     

		      // get / set parameters
		      var newHash=this.hash;
		     
		      var oldLocation=window.location.href.replace(window.location.hash, '');
		      var newLocation=this;

		      // make sure it's the same location      
		      if(oldLocation+newHash==newLocation)
		      {
		    	  var target=$(this.hash+', a[name='+this.hash.slice(1)+']').offset().top;
		    	 if(this.hash.slice(1)=="top") target=0;
		         // set selector
		         if($.browser.safari) var animationSelector='body:not(:animated)';
		         else var animationSelector='html:not(:animated)';

		         
		         // animate to target and set the hash to the window.location after the animation
		         $(animationSelector).animate({ scrollTop: target }, duration, easing, function() {
		        	// add new hash to the browser location
			          //  window.location.href=newLocation;
		           
		         });

		         // cancel default click action
		         return false;
		      }
		   });
	/*$('.mainmenutItem img').hover(function() 
			{ 
		idgesamt=this.id
		idNum=idgesamt.replace(/normal/,"");
		
			$('#ro'+idNum).fadeIn("fast"); 
			}, 
			function () { 
				idgesamt=this.id
				idNum=idgesamt.replace(/normal/,"");
				//	$('#ro'+idNum).fadeOut("fast"); 
			}
			); 

	$('.mainmenutItem div.rollover').hover(function() 
			{ 
		idgesamt=this.id
		idNum=idgesamt.replace(/ro/,"");
		
			}, 
			function () { 
				idgesamt=this.id
				idNum=idgesamt.replace(/ro/,"");
				$('#'+idgesamt).fadeOut("fast"); 
			}
			); 
	*/
});

function getFlashVersion(){
	  // ie
	  try {
	    try {
	      // avoid fp6 minor version lookup issues
	      // see: http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
	      var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
	      try { axo.AllowScriptAccess = 'always'; }
	      catch(e) { return '6,0,0'; }
	    } catch(e) {}
	    return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
	  // other browsers
	  } catch(e) {
	    try {
	      if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
	        return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1];
	      }
	    } catch(e) {}
	  }
	  return false;
	}
