window.onload = init;

var jsReady = false;
var flashMovie = "";
var nonverblasterClicked = false;

function init(){
	jsReady = true;
}

function getFlashMovie(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
}
// broadcasts the actions to the player
function sendToNonverBlaster(value) {
	getFlashMovie(flashMovie).sendToActionScript(value);
}

function registerForJavaScriptCommunication(_flashMovie){
	flashMovie = _flashMovie;
}
// Called if the Player was clicked
function nonverBlasterClickHandler(){
	nonverblasterClicked = true;
	//alert("nonverblasterClicked: " + nonverblasterClicked)
}
function quelltext() {
	window.open('view-source:' + window.location.href);
}





        function formatText(index, panel) {
		  return index + "";
	    }
    
        $(function () {
        
            $('.anythingSlider').anythingSlider({
                easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: false,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 5000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 600,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
         		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
		        navigationFormatter: formatText // Details at the top of the file on this use (advanced use)

            });
            

           $("#jump1").click(function(){
                $('.anythingSlider').anythingSlider(1);
            });
           $("#jump2").click(function(){
                $('.anythingSlider').anythingSlider(2);
            });
            $("#jump3").click(function(){
                $('.anythingSlider').anythingSlider(3);
            });
            $("#jump4").click(function(){
                $('.anythingSlider').anythingSlider(4);
            });


$('a.fb_dynamic').each(function(){  
        var dWidth  = parseInt($(this).attr('href').match(/width=[0-9]+/i)[0].replace('width=',''));  
        var dHeight     =  parseInt($(this).attr('href').match(/height=[0-9]+/i)[0].replace('height=',''));  
$(this).fancybox({  
    'width':dWidth,  
    'height':dHeight,  
    'autoScale'         : false,  
    'transitionIn'      : 'elastic',  
    'transitionOut'     : 'elastic',  
    'type'          : 'iframe'  

});  
});

	$("a.iline").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic'
	});


	$("a#testi").fancybox({
'autoDimensions': false,
'width':630,
'height':800,
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic'
	});





	$("a#viewflv").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
    'type'          : 'swf'  
	});

	$("a#vid").fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic',
			'title'			: this.title,
			'width'		: 620,
			'height'		: 460,
         'type'    : 'swf',
         'href'    : this.href,
         'swf'   : { 'wmode':'transparent', 'allowfullscreen':'true' }
       });
		

$('#s1').cycle({ 
    fx: 'zoom', 
random: 0
	});

$('#s13').cycle({ 
    fx:    'fade', 
    fx: 'curtainX',
 });

        });

