document.write("<style type='text/css'>.hidden{display:none;}<\/style>");$(document).ready(function(){$("#donjiMenuHolder #mainlevel").lavaLamp({fx:"easeInOutBack",speed:600});$.fn.colorbox.settings.bgOpacity="0.9";$('.stranafrontpage .blog_other h2:not(:has(a))').wrapInner('<a href="#" onclick="return false;"></a>');$('.strana40 .blog_other h2:not(:has(a))').wrapInner('<a href="#" onclick="return false;"></a>');$(".stranafrontpage .blog_other").accordion({header:'h2',event:'mouseover',autoHeight:false});$(".strana40 .blog_other").accordion({header:'h2',event:'mouseover',autoHeight:false});$('.strana42 .blog_leading').append('<a class="readon" href="index2.php?option=com_content&task=blogcategory&id=8&Itemid=46">svi datumi</a>');$(".stranafrontpage .readon, .stranafrontpage .contentpagetitle, .strana42 .blog_leading .readon, .strana40 .blog_other .readon, .strana40 .blog_other .contentpagetitle, .stranaalbums .view a").replaceAndBox({transition:"elastic",fixedHeight:450});$('.thickbox').colorbox({transition:"elastic"});$(".stranavidojes a.playLinkVidoje").replaceAndBox({fixedHeight:480,fixedWidth:690});$("#mainlevel-dole .item4 a").replaceAndBox({transition:"elastic",fixedHeight:400,fixedWidth:350,iframe:true,overlayClose:false},'?&iframe=1');$("#mainlevel-dole .item5 a").replaceAndBox({transition:"elastic",fixedHeight:500,fixedWidth:350,iframe:true,overlayClose:false},'?&iframe=1');$(".stranafrontpage #page, .stranaalbums #page, .strana40content #page, .strana42content #page, .stranaeasygallery #page").height($(window).height());$('#popupLink').click(function(){playerPopup();});});$.fn.replaceAndBox=function(boxAttr,append){if(append==undefined){append='?&popup=1';}
return this.each(function(){var href=$(this).attr('href')+append;href=href.replace(/ /,'');$(this).attr('href',href);$(this).colorbox(boxAttr);});}
function show_hide_datumi(){$('.strana42 .blog_other').toggle();}
$(document).ready(function(){createPlayer('playerBre');});var currentPlaylist=null;var currentLength=0;var currentItem=-1;var previousItem=-1;var currentMute=false;var currentVolume=80;var currentPosition=0;var currentState='NONE';var currentLoaded=0;var currentRemain=0;var player=null;function playerReady(thePlayer){player=document.getElementById('playerBre');addListeners();}
function addListeners(){if(player){player.addControllerListener("ITEM","itemListener");player.addControllerListener("MUTE","muteListener");player.addModelListener("LOADED","loadedListener");player.addModelListener("STATE","stateListener");player.addModelListener("TIME","positionListener");player.addViewListener("VOLUME","volumeListener");}else{setTimeout("addListeners()",100);}}
function stateListener(obj){currentState=obj.newstate;previousState=obj.oldstate;if(previousState=='PLAYING'&&currentState=='PAUSED'){setCookie('pstate',0);}
else if(previousState=='PAUSED'&&currentState=='PLAYING'){setCookie('pstate',1);}}
function positionListener(obj){currentPosition=obj.position;var tmp=document.getElementById("tim");if(tmp){tmp.innerHTML="position: "+currentPosition;}}
function loadedListener(obj){currentLoaded=obj.loaded;currentRemain=obj.total-currentLoaded;var tmp=document.getElementById("ldd");if(tmp){tmp.innerHTML="bytes loaded: "+currentLoaded+
"<br>bytes remaining: "+currentRemain;}}
function volumeListener(obj){currentVolume=obj.percentage;var tmp=document.getElementById("vol");setCookie('pvolume',currentVolume);if(tmp){tmp.innerHTML="volume: "+currentVolume;}}
function muteListener(obj){currentMute=obj.state;var tmp=document.getElementById("mut");if(tmp){tmp.innerHTML="mute: "+currentMute;}}
function itemListener(obj){if(obj.index!=currentItem){previousItem=currentItem;currentItem=obj.index;if(previousItem==-1){getPlaylistData();}
var tmp=document.getElementById("itm");if(tmp){tmp.innerHTML="current item: "+currentItem+
"<br>previous item: "+previousItem;}
var tmp=document.getElementById("item");if(tmp){tmp.innerHTML="item: "+currentItem;}
var tmp=document.getElementById("pid");if(tmp){tmp.innerHTML="(received from the player with the id: <i><b>"+obj.id+"</b></i>)";}
printItemData(currentItem);}}
function printItemData(theIndex){var plst=null;plst=player.getPlaylist();if(plst){var txt='';txt+='<li><b>item number: </b>'+theIndex+':</li>';txt+='<li><b>title: </b>'+plst[theIndex].title+'</li>';txt+='<li><b>author: </b>'+plst[theIndex].author+'</li>';txt+='<li><b>file: </b>'+plst[theIndex].file+'</li>';txt+='<li><b>image: </b>'+plst[theIndex].image+'</li>';txt+='<li><b>link: </b><a href="'+plst[theIndex].link+'">'+plst[theIndex].link+'</a></li>';var tmp=document.getElementById("itmsDat");if(tmp){tmp.innerHTML=txt;}}}
function getPlaylistData(){var plst=null;plst=player.getPlaylist();if(plst){currentPlaylist=plst;var txt='';for(var i in currentPlaylist){txt+='<input type="checkbox" id="cb'+i+'" checked="checked" /> &nbsp; ';txt+=currentPlaylist[i].title;txt+='<br />';}
var tmp=document.getElementById("plstDat");if(tmp){tmp.innerHTML=txt;}}}
function loadCheckedPlaylistData(){if(currentPlaylist){var j=0;var lst=new Array();for(var i in currentPlaylist){if(document.getElementById('cb'+i).checked){lst[j]={author:currentPlaylist[i].author,description:currentPlaylist[i].description,duration:currentPlaylist[i].duration,file:currentPlaylist[i].file,link:currentPlaylist[i].link,image:currentPlaylist[i].image,start:currentPlaylist[i].start,title:currentPlaylist[i].title,type:currentPlaylist[i].type}
j++;}}
if(lst.length>0){player.sendEvent('LOAD',lst);}}}
function getLength(){currentLength=player.getPlaylist().length;return(currentLength);};function loadFile(theFile){currentItem=-1;previousItem=-1;player.sendEvent('LOAD',theFile);};function createPlayer(holderID){var flashvars=new Array();flashvars['shuffle']='true';flashvars['repeat']='always';if(getCookie('pstate')=='0'){flashvars['autostart']="false";}
else{if(!/Linux/.test(navigator.platform.test)){flashvars['autostart']="true";}
else{flashvars['autostart']="true";}}
flashvars['skin']="http://www.negativeband.net/playerskins/negative.swf";if(!isdefined('playlist')){flashvars['file']="media/negative.xml";}
else{flashvars['file']=playlist;}
if((vol=getCookie('pvolume'))!==''){flashvars['volume']=vol;}
var params={allowfullscreen:"true",allowscriptaccess:"always",}
var attributes={id:"playerBre",name:"playerBre"}
swfobject.embedSWF("player.swf",holderID,"320","32","9.0.115",false,flashvars,params,attributes);player=document.getElementById('playerBre');}
function isdefined(variable){return(typeof(window[variable])=="undefined")?false:true;}
function setCookie(n,v){var cookieStr="";var date=new Date();date.setTime(date.getTime()+(3*30*24*60*60*1000));var expiry="; expires="+date.toGMTString();cookieStr=n+" = "+v+";expires="+expiry+";path=/ ";document.cookie=cookieStr;}
function getCookie(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}
return"";}
var w;function playerPopup(focus){var w=window.open('player.php','playerProzor','width=350,height=250');setCookie('ppopup',1);if(player){player.sendEvent('STOP');}}
