var flashversion = "9.0.115";

if(typeof(swfobject)=='object' && swfobject.hasFlashPlayerVersion(flashversion)){
	var head = document.getElementsByTagName('head');
	var flashstyle = document.createElement('style');
	var css = '#flashcontent h1, #flashcontent p {display: none}';
	flashstyle.setAttribute('type','text/css');
	if(head[0]){
		if(flashstyle.styleSheet){
			flashstyle.styleSheet.cssText = css;
		}else{
			flashstyle.appendChild(document.createTextNode(css));
		}
		head[0].appendChild(flashstyle);
	}
}


var flashvars = {};
								
var params = {
	allowscriptaccess:"always",
	allowfullscreen:"true",
	wmode:"opaque",
	base:"media"
};
			
var attributes = {};
									
swfobject.embedSWF("media/main.swf", "flashcontent", "100%", "569", flashversion, "", flashvars, params, attributes);
//swffit.fit("flashcontent");

share.url = 'http://karatekid-derfilm.de/';
share.facebook.title = 'The Karate Kid - Official international Site';
share.title = 'Check Out The Official Karate Kid Movie Site and Trailer';
share.facebook.description = "In Columbia Pictures' The Karate Kid, 12-year-old Dre Parker (Jaden Smith) could've been the most popular kid in Detroit, but his mother's latest career move has taken them to China.  Dre immediately falls for his classmate Mei Ying, but cultural differences make such a friendship impossible. Even worse, Dre's feelings make an enemy of the class bully, and kung fu prodigy, Cheng.  In the land of kung fu, Dre knows only a little karate, and Cheng puts 'the karate kid' on the floor with ease.  With no friends in a strange land, Dre has nowhere to turn but maintenance man Mr. Han (Jackie Chan), who is secretly a kung fu master.  As Han teaches Dre that kung fu is not about punches and skill, but maturity and calm, Dre realizes that facing down the bullies will be the adventure of a lifetime."
//share.description = "In Columbia Pictures' The Karate Kid, 12-year-old Dre Parker (Jaden Smith) could've been the most popular kid in Detroit, but his mother's (Taraji P. Henson) latest career move has landed him in China.  Dre immediately falls for his classmate Mei Ying - and the feeling is mutual - but cultural differences make such a friendship impossible. Even worse, Dre's feelings make an enemy of the class bully, Cheng.  In the land of kung fu, Dre knows only a little karate, and Cheng puts 'the karate kid' on the floor with ease.  With no friends in a strange land, Dre has nowhere to turn but maintenance man Mr. Han (Jackie Chan), who is secretly a master of kung fu.  As Han teaches Dre that kung fu is not about punches and parries, but maturity and calm, Dre realizes that facing down the bullies will be the fight of his life.";
share.description = 'THE KARATE KID, starring Jaden Smith, Jackie Chan and Taraji P. Henson, is a story about a bullied boy who learns self-defense and much more under the tutelage of an unlikely kung fu master.';
share.tweet = 'Check out The Karate Kid Movie Site and Trailer at http://karatekid-themovie.net/';

// Social bookmarking function

 $(document).ready(function(){
		$('#share a').click(function(){
			
			var rel = $(this).attr('rel');

			if(share){
				share.send(rel);
			}

			return false;
		});

});



// Social bookmarking function
/*
function shareThis() {
	var links = document.getElementById('share').getElementsByTagName('a');
	
	for (i=0; i<links.length; i++) {
		var link = links[i];
		var rel = link.getAttribute('rel');
		switch(rel){
			case 'facebook':
			case 'myspace':
			case 'twitter':
			case 'delicious':
			case 'digg':
			case 'stumbleupon':
		
			extendOnClick(link, function(evt,el) {
				var flashcontent = document.getElementById('flashcontent');
				flashcontent.shareActive();
				share.send(el.getAttribute('rel'));						
				return false;
			});
		}
		
		if (link.getAttribute('rel') == 'facebookfan') {	
			extendOnClick(link, function() {
				var flashcontent = document.getElementById('flashcontent');
				flashcontent.shareActive();
			});
		}
		
	}
}
*/
function registerPop() {
	var register = document.getElementById('register');
	if (register){	
		var a = register.getElementsByTagName('a');
		extendOnClick(a[0], function(evt,el) {
			displayWindow(this.getAttribute('href'),'_blank',446,496);
			return false;
		});
	}
}

//overlayPlayer config
feedUrl = "http://www.sonypictures.com/previews/movies/thekaratekid.xml"; 
autocloseToggle = true; 
singlevideoToggle = true; 
clipName = 1580;
useQAplayer = false; 
//addLoadEvent(registerPop);

//addLoadEvent(shareThis);