
function KEYPUBLISHER_Adminbar_getWidth()
{if(document.documentElement.clientWidth==0)
return document.body.clientWidth+"px";else
return document.documentElement.clientWidth+"px";}
var locationbar='no';var ref=0;function setref(s){ref=s;}
var MSIE=(navigator.userAgent.indexOf('MSIE')>=0&&navigator.userAgent.indexOf('Win')>=0&&navigator.userAgent.toLowerCase().indexOf('opera')<0)?true:false;var Opera=opera=navigator.userAgent.toLowerCase().indexOf('opera')>=0?true:false;var navigatorVersion=navigator.appVersion.replace(/.*?MSIE (\d\.\d).*/g,'$1')/1;function rand(){return new String(Math.ceil(Math.random()*200+1));}
function popuperror(){alert("     Du må skru på Javaskript \"Popup\" støtte i nettleseren din"+"\n\n"+"___________________________________________________________"+"\n\n"+"             Informasjon om dette, kan du finne på:"+"\n\n"+"                       www.keyteq.no/kundesenter/popup               "+"\n\n"+"\n\n"+"____________________________________________________________");}
function getY(height){return(screen.height-height)/2;}
function getX(width){return(screen.width-width)/2;}
function openKeyPublisherWindow(url,name,height,width,scroll,toolbar,resize)
{if(scroll)scroll='yes';else scroll='no';if(toolbar)toolbar='yes';else toolbar='no';if(resize)resize='yes';else resize='no';var newwindow=window.open(url,name,'height='+height+', width='+width+', status=no, scrollbars='+scroll+', toolbar='+toolbar+', resizable='+resize+', location='+locationbar+', menubar=no,top='+getY(height)+', left='+getX(width),'true');if(!newwindow){popuperror();}else{if(!newwindow.opener){newwindow.opener=self;}if(window.focus){newwindow.focus();}}}
function customWindow(path,windowname,height,width){openKeyPublisherWindow(path,windowname+ref,height,width,false,false,true);}
function productPopup(popupId,productId,height,width,scrollable,resizeable){openKeyPublisherWindow('/index.php?c_=ShopProductPopupGUI&m_=showPopup&popupId='+popupId+'&productId='+productId,'productPopup'+ref,height,width,scrollable,false,resizeable);}
function customWindowToolbar(path,windowname,height,width){openKeyPublisherWindow(path,windowname+ref,height,width,true,true,true);}
function customWindowResize(path,windowname,height,width){openKeyPublisherWindow(path,windowname+ref,height,width,true,false,true);}
function customWindowScroll(path,windowname,height,width){openKeyPublisherWindow(path,windowname+ref,height,width,true,false,true);}
function getnavipos(){if(typeof window.pageYOffset!='undefined')return pos=window.pageYOffset;else return pos=Math.max(document.body.scrollTop,document.documentElement.scrollTop);}
function phonelistcard(phonelistid){customWindow('/index.php?c_=PhonelistGUI&m_=writeCard&PhonelistGUI_writeCard_0_='+phonelistid,'writecard',200,300);}
function checkUser(){return;script=document.createElement('script');script.setAttribute('src','/checkuser.php');script.setAttribute('language','Javascript');script.setAttribute('type','text/javascript');document.getElementsByTagName('head').item(0).appendChild(script);setTimeout("checkUser()",5000);}
function helpWindow(extraUrl){if(!window.open('http://keypublisher.manual.keyteq.no'+extraUrl,'help','height=500, width=900, scrollbars=yes, status=no, toolbar=no, resizable=yes, location='+locationbar+', menubar=no,top=70, left=20','true'))popuperror();}
function runGraph(chart,xml,width,height,http)
{document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+http+'://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+width+'" HEIGHT="'+height+'" ALIGN=""  id="charts">');document.write('<PARAM NAME=movie VALUE="/executable/fusion_charts/'+chart+'">');document.write('<PARAM NAME="FlashVars" VALUE="&dataXML='+xml+'&chartWidth='+width+'&chartHeight='+height+'">');document.write('<PARAM NAME="quality" VALUE="high">');document.write('<PARAM NAME="bgcolor" VALUE="#FAFAFA">');document.write('<PARAM NAME="wmode" VALUE="transparent">');document.write('<EMBED src="/executable/fusion_charts/'+chart+'" FlashVars="&dataXML='+xml+'&chartWidth='+width+'&chartHeight='+height+'" quality="high" bgcolor=#FAFAFA" wmode="transparent"  WIDTH="'+width+'" HEIGHT="'+height+'" NAME="charts" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="'+http+'://www.macromedia.com/go/getflashplayer"></EMBED>');document.write('</OBJECT>');}
function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',o='opera',h=document.getElementsByTagName('html')[0],b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js'];c=b.join(' ');h.className+=' '+c;return c;};css_browser_selector(navigator.userAgent);(function($){function getter(plugin,method,args){function getMethods(type){var methods=$[plugin][type]||[];return(typeof methods=='string'?methods.split(/,?\s+/):methods);}
var methods=getMethods('getter');return($.inArray(method,methods)!=-1);}
$.fn.jPlayer=function(options){var name="jPlayer";var isMethodCall=(typeof options=='string');var args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=='_'){return this;}
if(isMethodCall&&getter(name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){var instance=$.data(this,name);if(!instance&&!isMethodCall){$.data(this,name,new $[name](this,options))._init();}
(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args));});};$.jPlayer=function(element,options){this.options=$.extend({},options);this.element=$(element);};$.jPlayer.getter="jPlayerOnProgressChange jPlayerOnSoundComplete jPlayerVolume jPlayerReady getData jPlayerController";$.jPlayer.defaults={cssPrefix:"jqjp",swfPath:"/sitefiles/72/js",volume:80,oggSupport:false,nativeSupport:true,customCssIds:false,graphicsFix:true,errorAlerts:false,warningAlerts:false,position:"absolute",width:"0",height:"0",top:"0",left:"0",quality:"high",bgcolor:"#ffffff"};$.jPlayer._config={jPlayerControllerId:undefined,delayedCommandId:undefined,isWaitingForPlay:false,isFileSet:false};$.jPlayer._diag={isPlaying:false,src:"",loadPercent:0,playedPercentRelative:0,playedPercentAbsolute:0,playedTime:0,totalTime:0};$.jPlayer._cssId={play:"jplayer_play",pause:"jplayer_pause",stop:"jplayer_stop",loadBar:"jplayer_load_bar",playBar:"jplayer_play_bar",volumeMin:"jplayer_volume_min",volumeMax:"jplayer_volume_max",volumeBar:"jplayer_volume_bar",volumeBarValue:"jplayer_volume_bar_value"};$.jPlayer.count=0;$.jPlayer.timeFormat={showHour:false,showMin:true,showSec:true,padHour:false,padMin:true,padSec:true,sepHour:":",sepMin:":",sepSec:""};$.jPlayer.convertTime=function(mSec){var myTime=new Date(mSec);var hour=myTime.getUTCHours();var min=myTime.getUTCMinutes();var sec=myTime.getUTCSeconds();var strHour=($.jPlayer.timeFormat.padHour&&hour<10)?"0"+hour:hour;var strMin=($.jPlayer.timeFormat.padMin&&min<10)?"0"+min:min;var strSec=($.jPlayer.timeFormat.padSec&&sec<10)?"0"+sec:sec;return(($.jPlayer.timeFormat.showHour)?strHour+$.jPlayer.timeFormat.sepHour:"")+(($.jPlayer.timeFormat.showMin)?strMin+$.jPlayer.timeFormat.sepMin:"")+(($.jPlayer.timeFormat.showSec)?strSec+$.jPlayer.timeFormat.sepSec:"");};$.jPlayer.prototype={_init:function(){var self=this;var element=this.element;this.config=$.extend({},$.jPlayer.defaults,this.options,$.jPlayer._config);this.config.diag=$.extend({},$.jPlayer._diag);this.config.cssId={};this.config.cssSelector={};this.config.cssDisplay={};this.config.clickHandler={};this.element.data("jPlayer.config",this.config);$.extend(this.config,{id:this.element.attr("id"),swf:this.config.swfPath+((this.config.swfPath!=""&&this.config.swfPath.slice(-1)!="/")?"/":"")+"Jplayer.swf",fid:this.config.cssPrefix+"_flash_"+$.jPlayer.count,aid:this.config.cssPrefix+"_audio_"+$.jPlayer.count,hid:this.config.cssPrefix+"_force_"+$.jPlayer.count,i:$.jPlayer.count,volume:this._limitValue(this.config.volume,0,100)});$.jPlayer.count++;if(this.config.ready!=undefined){if($.isFunction(this.config.ready)){this.jPlayerReady=this.config.ready;}else{this._warning("Constructor's ready option is not a function.");}}
try{this.config.audio=new Audio();this.config.audio.id=this.config.aid;this.element.append(this.config.audio);}catch(err){this.config.audio={};}
$.extend(this.config,{canPlayMP3:!!((this.config.audio.canPlayType)?((""!=this.config.audio.canPlayType("audio/mpeg"))&&("no"!=this.config.audio.canPlayType("audio/mpeg"))):false),canPlayOGG:!!((this.config.audio.canPlayType)?((""!=this.config.audio.canPlayType("audio/ogg"))&&("no"!=this.config.audio.canPlayType("audio/ogg"))):false),aSel:$("#"+this.config.aid)});$.extend(this.config,{html5:!!((this.config.oggSupport)?((this.config.canPlayOGG)?true:this.config.canPlayMP3):this.config.canPlayMP3)});$.extend(this.config,{usingFlash:!(this.config.html5&&this.config.nativeSupport),usingMP3:!(this.config.oggSupport&&this.config.canPlayOGG&&this.config.nativeSupport)});var events={setButtons:function(e,playing){self.config.diag.isPlaying=playing;if(self.config.cssId.play!=undefined&&self.config.cssId.pause!=undefined){if(playing){self.config.cssSelector.play.css("display","none");self.config.cssSelector.pause.css("display",self.config.cssDisplay.pause);}else{self.config.cssSelector.play.css("display",self.config.cssDisplay.play);self.config.cssSelector.pause.css("display","none");}}
if(playing){self.config.isWaitingForPlay=false;}}};var eventsForFlash={setFile:function(e,mp3,ogg){try{self._getMovie().fl_setFile_mp3(mp3);self.config.diag.src=mp3;self.config.isFileSet=true;element.trigger("jPlayer.setButtons",false);}catch(err){self._flashError(err);}},clearFile:function(e){try{element.trigger("jPlayer.setButtons",false);self._getMovie().fl_clearFile_mp3();self.config.diag.src="";self.config.isFileSet=false;}catch(err){self._flashError(err);}},play:function(e){try{if(self._getMovie().fl_play_mp3()){element.trigger("jPlayer.setButtons",true);}}catch(err){self._flashError(err);}},pause:function(e){try{if(self._getMovie().fl_pause_mp3()){element.trigger("jPlayer.setButtons",false);}}catch(err){self._flashError(err);}},stop:function(e){try{if(self._getMovie().fl_stop_mp3()){element.trigger("jPlayer.setButtons",false);}}catch(err){self._flashError(err);}},playHead:function(e,p){try{if(self._getMovie().fl_play_head_mp3(p)){element.trigger("jPlayer.setButtons",true);}}catch(err){self._flashError(err);}},playHeadTime:function(e,t){try{if(self._getMovie().fl_play_head_time_mp3(t)){element.trigger("jPlayer.setButtons",true);}}catch(err){self._flashError(err);}},volume:function(e,v){self.config.volume=v;try{self._getMovie().fl_volume_mp3(v);}catch(err){self._flashError(err);}}};var eventsForHtmlAudio={setFile:function(e,mp3,ogg){self.config.audio=new Audio();self.config.audio.id=self.config.aid;self.config.aSel.replaceWith(self.config.audio);self.config.aSel=$("#"+self.config.aid);if(self.config.usingMP3){self.config.diag.src=mp3;}else{self.config.diag.src=ogg;}
self.config.isWaitingForPlay=true;self.config.isFileSet=true;element.trigger("jPlayer.setButtons",false);self.jPlayerOnProgressChange(0,0,0,0,0);clearInterval(self.config.jPlayerControllerId);self.config.audio.addEventListener("canplay",function(){self.config.audio.volume=self.config.volume/100;},false);},clearFile:function(e){self.setFile("","");self.config.isWaitingForPlay=false;self.config.isFileSet=false;},play:function(e){if(self.config.isFileSet){if(self.config.isWaitingForPlay){self.config.audio.src=self.config.diag.src;}
self.config.audio.play();element.trigger("jPlayer.setButtons",true);clearInterval(self.config.jPlayerControllerId);self.config.jPlayerControllerId=window.setInterval(function(){self.jPlayerController(false);},100);clearInterval(self.config.delayedCommandId);}},pause:function(e){if(self.config.isFileSet){self.config.audio.pause();element.trigger("jPlayer.setButtons",false);}},stop:function(e){if(self.config.isFileSet){try{self.config.audio.currentTime=0;element.trigger("jPlayer.pause");clearInterval(self.config.jPlayerControllerId);self.config.jPlayerControllerId=window.setInterval(function(){self.jPlayerController(true);},100);}catch(err){clearInterval(self.config.delayedCommandId);self.config.delayedCommandId=window.setTimeout(function(){self.stop();},100);}}},playHead:function(e,p){if(self.config.isFileSet){try{if((typeof self.config.audio.buffered=="object")&&(self.config.audio.buffered.length>0)){self.config.audio.currentTime=p*self.config.audio.buffered.end(self.config.audio.buffered.length-1)/100;}else{self.config.audio.currentTime=p*self.config.audio.duration/100;}
element.trigger("jPlayer.play");}catch(err){clearInterval(self.config.delayedCommandId);self.config.delayedCommandId=window.setTimeout(function(){self.playHead(p);},100);}}},playHeadTime:function(e,t){if(self.config.isFileSet){try{self.config.audio.currentTime=t/1000;element.trigger("jPlayer.play");}catch(err){clearInterval(self.config.delayedCommandId);self.config.delayedCommandId=window.setTimeout(function(){self.playHeadTime(t);},100);}}},volume:function(e,v){self.config.volume=v;self.config.audio.volume=v/100;self.jPlayerVolume(v);}};if(this.config.usingFlash){$.extend(events,eventsForFlash);}else{$.extend(events,eventsForHtmlAudio);}
for(var event in events){var e="jPlayer."+event;this.element.unbind(e);this.element.bind(e,events[event]);}
if(this.config.usingFlash){if(this._checkForFlash(8)){if($.browser.msie){var html_obj='<object id="'+this.config.fid+'"';html_obj+=' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';html_obj+=' codebase="'+document.URL.substring(0,document.URL.indexOf(':'))+'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"';html_obj+=' type="application/x-shockwave-flash"';html_obj+=' width="'+this.config.width+'" height="'+this.config.height+'">';html_obj+='</object>';var obj_param=new Array();obj_param[0]='<param name="movie" value="'+this.config.swf+'" />';obj_param[1]='<param name="quality" value="high" />';obj_param[2]='<param name="FlashVars" value="id='+escape(this.config.id)+'&fid='+escape(this.config.fid)+'&vol='+this.config.volume+'" />';obj_param[3]='<param name="allowScriptAccess" value="always" />';obj_param[4]='<param name="bgcolor" value="'+this.config.bgcolor+'" />';var ie_dom=document.createElement(html_obj);for(var i=0;i<obj_param.length;i++){ie_dom.appendChild(document.createElement(obj_param[i]));}
this.element.html(ie_dom);}else{var html_embed='<embed name="'+this.config.fid+'" id="'+this.config.fid+'" src="'+this.config.swf+'"';html_embed+=' width="'+this.config.width+'" height="'+this.config.height+'" bgcolor="'+this.config.bgcolor+'"';html_embed+=' quality="high" FlashVars="id='+escape(this.config.id)+'&fid='+escape(this.config.fid)+'&vol='+this.config.volume+'"';html_embed+=' allowScriptAccess="always"';html_embed+=' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';this.element.html(html_embed);}}else{this.element.html("<p>Flash 8 or above is not installed. <a href='http://get.adobe.com/flashplayer'>Get Flash!</a></p>");}}
this.element.css({'position':this.config.position,'top':this.config.top,'left':this.config.left});if(this.config.graphicsFix){var html_hidden='<div id="'+this.config.hid+'"></div>';this.element.append(html_hidden);$.extend(this.config,{hSel:$("#"+this.config.hid)});this.config.hSel.css({'text-indent':'-9999px'});}
if(!this.config.customCssIds){$.each($.jPlayer._cssId,function(name,id){self.cssId(name,id);});}
if(!this.config.usingFlash){this.element.css({'left':'-9999px'});window.setTimeout(function(){self.volume(self.config.volume);self.jPlayerReady();},100);}},jPlayerReady:function(){},setFile:function(mp3,ogg){this.element.trigger("jPlayer.setFile",[mp3,ogg]);},clearFile:function(){this.element.trigger("jPlayer.clearFile");},play:function(){this.element.trigger("jPlayer.play");},pause:function(){this.element.trigger("jPlayer.pause");},stop:function(){this.element.trigger("jPlayer.stop");},playHead:function(p){this.element.trigger("jPlayer.playHead",[p]);},playHeadTime:function(t){this.element.trigger("jPlayer.playHeadTime",[t]);},volume:function(v){v=this._limitValue(v,0,100);this.element.trigger("jPlayer.volume",[v]);},cssId:function(fn,id){var self=this;if(typeof id=='string'){if($.jPlayer._cssId[fn]){if(this.config.cssId[fn]!=undefined){this.config.cssSelector[fn].unbind("click",this.config.clickHandler[fn]);}
this.config.cssId[fn]=id;this.config.cssSelector[fn]=$("#"+id);this.config.clickHandler[fn]=function(e){self[fn](e);return false;}
this.config.cssSelector[fn].click(this.config.clickHandler[fn]);this.config.cssDisplay[fn]=this.config.cssSelector[fn].css("display");if(fn=="pause"){this.config.cssSelector[fn].css("display","none");}}else{this._warning("Unknown/Illegal function in cssId\n\njPlayer('cssId', '"+fn+"', '"+id+"')");}}else{this._warning("cssId CSS Id must be a string\n\njPlayer('cssId', '"+fn+"', "+id+")");}},loadBar:function(e){if(this.config.cssId.loadBar!=undefined){var offset=this.config.cssSelector.loadBar.offset();var x=e.pageX-offset.left;var w=this.config.cssSelector.loadBar.width();var p=100*x/w;this.playHead(p);}},playBar:function(e){this.loadBar(e);},onProgressChange:function(fn){if($.isFunction(fn)){this.onProgressChangeCustom=fn;}else{this._warning("onProgressChange parameter is not a function.");}},onProgressChangeCustom:function(){},jPlayerOnProgressChange:function(lp,ppr,ppa,pt,tt){this.config.diag.loadPercent=lp;this.config.diag.playedPercentRelative=ppr;this.config.diag.playedPercentAbsolute=ppa;this.config.diag.playedTime=pt;this.config.diag.totalTime=tt;if(this.config.cssId.loadBar!=undefined){this.config.cssSelector.loadBar.width(lp+"%");}
if(this.config.cssId.playBar!=undefined){this.config.cssSelector.playBar.width(ppr+"%");}
this.onProgressChangeCustom(lp,ppr,ppa,pt,tt);this._forceUpdate();},jPlayerController:function(override){var pt=0,tt=0,ppa=0,lp=0,ppr=0;if(this.config.audio.readyState>=1){pt=this.config.audio.currentTime*1000;tt=this.config.audio.duration*1000;tt=isNaN(tt)?0:tt;ppa=(tt>0)?100*pt/tt:0;if((typeof this.config.audio.buffered=="object")&&(this.config.audio.buffered.length>0)){lp=100*this.config.audio.buffered.end(this.config.audio.buffered.length-1)/this.config.audio.duration;ppr=100*this.config.audio.currentTime/this.config.audio.buffered.end(this.config.audio.buffered.length-1);}else{lp=100;ppr=ppa;}}
if(this.config.audio.ended){clearInterval(this.config.jPlayerControllerId);this.jPlayerOnSoundComplete();}else if(!this.config.diag.isPlaying&&lp>=100){clearInterval(this.config.jPlayerControllerId);}
if(override){this.jPlayerOnProgressChange(lp,0,0,0,tt);}else{this.jPlayerOnProgressChange(lp,ppr,ppa,pt,tt);}},volumeMin:function(){this.volume(0);},volumeMax:function(){this.volume(100);},volumeBar:function(e){if(this.config.cssId.volumeBar!=undefined){var offset=this.config.cssSelector.volumeBar.offset();var x=e.pageX-offset.left;var w=this.config.cssSelector.volumeBar.width();var p=100*x/w;this.volume(p);}},volumeBarValue:function(e){this.volumeBar(e);},jPlayerVolume:function(v){if(this.config.cssId.volumeBarValue!=null){this.config.cssSelector.volumeBarValue.width(v+"%");this._forceUpdate();}},onSoundComplete:function(fn){if($.isFunction(fn)){this.onSoundCompleteCustom=fn;}else{this._warning("onSoundComplete parameter is not a function.");}},onSoundCompleteCustom:function(){},jPlayerOnSoundComplete:function(){this.element.trigger("jPlayer.setButtons",false);this.onSoundCompleteCustom();},getData:function(name){var n=name.split(".");var p=this.config;for(var i=0;i<n.length;i++){if(p[n[i]]!=undefined){p=p[n[i]];}else{this._warning("Undefined data requested.\n\njPlayer('getData', '"+name+"')");return undefined;}}
return p;},_getMovie:function(){return document[this.config.fid];},_checkForFlash:function(version){var flashIsInstalled=false;var flash;if(window.ActiveXObject){try{flash=new ActiveXObject(("ShockwaveFlash.ShockwaveFlash."+version));flashIsInstalled=true;}
catch(e){}}
else if(navigator.plugins&&navigator.mimeTypes.length>0){flash=navigator.plugins["Shockwave Flash"];if(flash){var flashVersion=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1");if(flashVersion>=version){flashIsInstalled=true;}}}
return flashIsInstalled;},_forceUpdate:function(){if(this.config.graphicsFix){this.config.hSel.text(""+Math.random());}},_limitValue:function(value,min,max){return(value<min)?min:((value>max)?max:value);},_flashError:function(e){this._error("Problem with Flash component.\n\nCheck the swfPath points at the Jplayer.swf path.\n\nswfPath = "+this.config.swfPath+"\nurl: "+this.config.swf+"\n\nError: "+e.message);},_error:function(msg){if(this.config.errorAlerts){this._alert("Error!\n\n"+msg);}},_warning:function(msg){if(this.config.warningAlerts){this._alert("Warning!\n\n"+msg);}},_alert:function(msg){alert("jPlayer : id='"+this.config.id+"' : "+msg);}};})(jQuery);$(document).ready(function(){var playItem=0;var jpPlayTime=$("#jplayer_play_time");var jpTotalTime=$("#jplayer_total_time");$("#jquery_jplayer").jPlayer({ready:function(){displayPlayList();playListInit(false);}}).jPlayer("onProgressChange",function(loadPercent,playedPercentRelative,playedPercentAbsolute,playedTime,totalTime){jpPlayTime.text($.jPlayer.convertTime(playedTime));jpTotalTime.text($.jPlayer.convertTime(totalTime));}).jPlayer("onSoundComplete",function(){playListNext();});$("#jplayer_previous").click(function(){playListPrev();return false;});$("#jplayer_next").click(function(){playListNext();return false;});function displayPlayList(){for(i=0;i<myPlayList.length;i++){$("#playlist_list ul").append("<li id='playlist_item_"+i+"'>"+myPlayList[i].name+"</li>");$("#playlist_item_"+i).data("index",i).click(function(){var index=$(this).data("index");if(playItem!=index){playListChange(index);}else{$("#jquery_jplayer").jPlayer("play");}});if($.browser.msie){$("#jquery_jplayer").jPlayer("setFile",myPlayList[playItem].mp3,myPlayList[playItem].ogg);$("#playlist_item_0").addClass("current");}}}
function playListInit(autoplay){if(autoplay){playListChange(playItem);}else{playListConfig(playItem);}}
function playListConfig(index){$("#playlist_item_"+playItem).removeClass("current");$("#playlist_item_"+index).addClass("current");playItem=index;$("#jquery_jplayer").jPlayer("setFile",myPlayList[playItem].mp3,myPlayList[playItem].ogg);}
function playListChange(index){playListConfig(index);$("#jquery_jplayer").jPlayer("play");}
function playListNext(){var index=(playItem+1<myPlayList.length)?playItem+1:0;playListChange(index);}
function playListPrev(){var index=(playItem-1>=0)?playItem-1:myPlayList.length-1;playListChange(index);}});$(document).ready(function(){var playItem=0;var jpPlayTime=$("#jplayer_play_time2");var jpTotalTime=$("#jplayer_total_time2");$("#jquery_jplayer2").jPlayer({ready:function(){displayPlayList();playListInit(false);}}).jPlayer("cssId","play","jplayer_play2").jPlayer("cssId","pause","jplayer_pause2").jPlayer("cssId","stop","jplayer_stop2").jPlayer("cssId","loadBar","jplayer_load_bar2").jPlayer("cssId","playBar","jplayer_play_bar2").jPlayer("cssId","volumeMin","jplayer_volume_min2").jPlayer("cssId","volumeMax","jplayer_volume_max2").jPlayer("cssId","volumeBar","jplayer_volume_bar2").jPlayer("cssId","volumeBarValue","jplayer_volume_bar_value2").jPlayer("onProgressChange",function(loadPercent,playedPercentRelative,playedPercentAbsolute,playedTime,totalTime){jpPlayTime.text($.jPlayer.convertTime(playedTime));jpTotalTime.text($.jPlayer.convertTime(totalTime));}).jPlayer("onSoundComplete",function(){playListNext();});$("#jplayer_previous2").click(function(){playListPrev();return false;});$("#jplayer_next2").click(function(){playListNext();return false;});function displayPlayList(){for(i=0;i<myPlayList2.length;i++){$("#playlist2_list ul").append("<li id='playlist2_item_"+i+"'>"+myPlayList2[i].name+"</li>");$("#playlist2_item_"+i).data("index",i).click(function(){var index=$(this).data("index");if(playItem!=index){playListChange(index);}else{$("#jquery_jplayer2").jPlayer("play");}});$("#jquery_jplayer2").jPlayer("setFile",myPlayList2[playItem].mp3,myPlayList2[playItem].ogg);$("#playlist2_item_0").addClass("current");}}
function playListInit(autoplay){if(autoplay){playListChange(playItem);}else{playListConfig(playItem);}}
function playListConfig(index){$("#playlist2_item_"+playItem).removeClass("current");$("#playlist2_item_"+index).addClass("current");playItem=index;$("#jquery_jplayer2").jPlayer("setFile",myPlayList2[playItem].mp3,myPlayList2[playItem].ogg);}
function playListChange(index){playListConfig(index);$("#jquery_jplayer2").jPlayer("play");}
function playListNext(){var index=(playItem+1<myPlayList2.length)?playItem+1:0;playListChange(index);}
function playListPrev(){var index=(playItem-1>=0)?playItem-1:myPlayList2.length-1;playListChange(index);}});
