



/*javascript:(function(){

var mode=document.compatmode,m;
if(mode){
  if(mode=='BackCompat')m='quirks';
  else if(mode=='CSS1Compat')m='Standards Compliance';
  else m='Almost Standards Compliance';
  alert('The document is being rendered in '+m+' mode.');
  }})();*/

var z_popup = 1000;



jQuery(document).ready(function() {
  // init Page...
	
	// Hier ausgelagert in Extra-Datei, da bei Shop-Locator über TS abgeschaltet werden muss.
	//     jQuery('.contents_inner').jScrollPane(scroll_defaults);
	//     jQuery('#contents_inner').find('a,input').unbind();

	 
				
	/**
	 * Wenn vornaden. Trailer starten.
	 */
	startTrailer();
				

});

function goToPage(value)
{
    if(value != '')
    {
      window.document.location.href = value;
    }
}

var scroll_defaults = {
    scrollbarWidth : 22,
    scrollbarMargin : 10,
    wheelSpeed : 25,
    showArrows : true,
    arrowSize : 230,
    animateTo : false,
    dragMinHeight : 1,
    dragMaxHeight : 99999,
    animateInterval : 100,
    animateStep: 0,
    maintainPosition: false,
    scrollbarOnLeft: false,
    reinitialiseOnImageLoad: false,
    tabIndex : 3,
    enableKeyboardNavigation: true,
    animateToInternalLinks: false
  }

function startLightbox(el)
{
  var target = jQuery(el).parents('.product_data_item:first').find('a.lightbox:first');
  target.trigger('click');
  console.log(target);
}

function printpage()
{
    window.print();
}


function startTrailer()
{
	var trailerVideoLinks = jQuery('.video_element > a');
	var i, trailerVideo;
	
	for (i=0; i < trailerVideoLinks.length; i++)
	{
		trailerVideo_src = jQuery(trailerVideoLinks[i]).attr('href');
		
		trailerVideo = jQuery(trailerVideoLinks[i]).parents('.video_element:first');
		
		if(navigator.userAgent.replace(/MSIE/g, "") != navigator.userAgent)
		{
			trailerVideo.html('<object id="id1" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="640" height="360" style="height: 360px; position: relative; width: 640px; " class="inline-block"><param name="src" value="' + trailerVideo_src + '"/><param name="controller" value="false"/><param name="autoplay" value="true"/><param name="scale" value="tofit"/><param name="volume" value="100"/><param name="loop" value="true"/></object>');
		}
		else
		{
			trailerVideo.html('<object id="id1" class="inline-block" width="640" height="360" style="height: 360px; position: relative; width: 640px;" data="' + trailerVideo_src + '" type="video/quicktime"><param value="' + trailerVideo_src + '" name="src"/><param value="false" name="controller"/><param value="true" name="autoplay"/><param value="tofit" name="scale"/><param value="100" name="volume"/><param value="true" name="loop"/></object>');
		}		
		
	}
		
}
