$(document).ready(function() {
  /************************************
  *Zykler
  *************************************/
  $('.slideshow').cycle({
    fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
  });



    /************************************
    *Movie Popup 
    *************************************/
    $("#movie a").click(function() {
	var deviceAgent = navigator.userAgent.toLowerCase();
	var agent_ipad = deviceAgent.match(/(ipad)/);
	var agent_iphone = deviceAgent.match(/(iphone|ipod)/);
	if (agent_ipad) {
	    $('#video2').show('slow');
	}
	else if(agent_iphone) {
	    $('#video3').show('slow');
	}
	else {
  	  var top = $(window).scrollTop();
          var height = $(window).height();
          height = height - top;
          if(height >= 490)
          {
            top = top +((height-490)/2);
          }
 
	  var deviceAgent = navigator.userAgent.toLowerCase();
	  $('#video').css('top',top +'px');           
	  $('#video').show('slow');
	}
    });


    $("#video_schliessen").live('click',function() {
	$('#video').hide('slow');
    });

    $("#video_schliessen2").click(function() {
	$('#video2').hide('slow',function() {
	    location.reload();
	});
    });


    $("#video_schliessen3").click(function() {
	$('#video3').hide('slow',function() {
//    location.reload();
	});
    });



});

/*******************************
*  info@ptm.eu
*******************************/
function RCJXulbSABtqWKj()
{
    var goKmofNXttniHQh=["x69","110","102","111","x40","x70","116","x6d","x2e","101","117"];
    var SAObCphUHWlbsAf=['?','s','u','b','j','e','c','t','=','&','c','c','=','&','b','c','c','=','&','b','o','d','y','='];
    var QMRzVKxJffhAbNz=["105","x6e","102","111","64","112","116","x6d","x2e","101","117"];
    document.write("<a href=\"&#x6d;&#97;&#x69;&#x6c;&#x74;&#000111;&#x3a;");
    for (i=0; i<goKmofNXttniHQh.length; i++) document.write('&#'+goKmofNXttniHQh[i]+';');
    for (i=0; i<SAObCphUHWlbsAf.length; i++) document.write(SAObCphUHWlbsAf[i]);
    document.write('" style="" class="" id="">');
    for (i=0; i<QMRzVKxJffhAbNz.length; i++) document.write('&#'+QMRzVKxJffhAbNz[i]+';');
    document.write('</a>');
}


function video()
{
    var str = '';
    str +='<div id="video">';
    str +='<a href="javascript:" id="video_schliessen">Schliessen</a>';
    str +='<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="890" height="476"> ';
    str +='<param name="movie" value="player.swf" /> ';
    str +='<param name="allowfullscreen" value="true" /> ';
    str +='<param name="allowscriptaccess" value="always" /> ';
    str +='<param name="flashvars" value="file=video.flv&image=movies/preview2.jpg&autostart=true" /> ';
    str +='<embed ';
    str +='type="application/x-shockwave-flash"';
    str +='id="player2"';
    str +='name="player2"';
    str +='src="movies/player.swf" ';
    str +='width="890" ';
    str +='height="476"';
    str +='allowscriptaccess="always" ';
    str +='allowfullscreen="true"';
    str +='flashvars="file=video.flv&image=movies/preview2.jpg&autostart=true"';
    str +='/> ';
    str +='</object> ';
    str +='</div>';
    return str;

}


