$(function(){
	$("#videos li a").bind("click", playVideo);
});

function playVideo(evt) {
	// Grab the id from the <a> elements URI
	var id = ($(evt.target).attr("href") || $(evt.target).parent().attr("href")).substr(10);

	$("#videoMainWrapper").show();
	$(".videoMain").slideUp(400);
	$("#videoMain" + id).slideDown(400);

	return false;
}

function sendEvent(swf,typ,prm) {
	thisMovie(swf).sendEvent(typ,prm);
};
function getUpdate(typ,pr1,pr2,swf) {
	if(typ == 'item') {
		$(".videoMain li.active").removeClass("active");
		$("#" + swf + "_" +(pr1)).addClass("active");
	}
};
function thisMovie(swf) {
  if(navigator.appName.indexOf("Microsoft") != -1) {
    return window[swf];
  } else {
    return document[swf];
  }
};