	function changecontent(url, itemID)
        {
        if(url!=''){
         var currentUrl= url+"/post-tv/"+itemID+".html"; 
         document.location = currentUrl;
        }
       }
        /*tellafriend*/
	var postURL;var parenttable;var parentid;function tipform(url,table,uid){postURL=url;parenttable=table;parentid=uid;$.ajax({url:url,cache:false,success:function(html){var scroll=$(window).scrollTop()-175;var top=(parseInt($(window).height())/2)+scroll
	$("#tipafriendlayout").html(html).css('top',top);$("#bigOverlay").css('display','block').css('opacity',0).fadeTo('fast',0.8);if($.browser.msie&&$.browser.version<7){$("#bigOverlay").height(document.body.clientHeight);}$("#tipafriendlayout").fadeIn();}});}function submitFormTellAFriend(){var name=$('#name').attr('value');var email=$('#email').attr('value');var recipient=$('#recipient').attr('value');var message=$('#message').attr('value');$.ajax({url:postURL,cache:false,type:"POST",data:"name="+name+"&email="+email+"&recipient="+recipient+"&message="+message+"&tipUrl=1&sendTip=1&parenttable="+parenttable+"&parentid="+parentid,success:function(html){$("#tipafriendlayout").html(html);}});}function hideForm(){$("#tipafriendlayout, #bigOverlay").fadeOut();}
	/*arx_comments*/	
	function reply(url,itemID,isArchive){var data=url+'&tx_arxcomments_pi1[replyTo]='+itemID+'&tx_arxcomments_pi1[replyForm]='+itemID+'&tx_arxcomments_pi1[ajaxReply]=1';var currentUrl=document.location.href;if(currentUrl.indexOf('?')!=-1)
	currentUrl=currentUrl+"&type=2666&tx_arxcomments_pi1[isArchive]="+isArchive;else
	currentUrl=currentUrl+"?type=2666&tx_arxcomments_pi1[isArchive]="+isArchive;$.ajax({url:currentUrl,cache:false,type:"POST",data:data,success:function(html){$("#replyPost"+itemID).html(html).show();$("#reportForm_"+itemID).hide();$("#replyPost"+itemID).jNice();$(':text',"#replyPost"+itemID).wrap('<span class="textInput"></span>')
	$("#replyLink_"+itemID).hide();$("#reportLink_"+itemID).show();$("#bottomForm").replaceWith('<div id="bottomForm">&nbsp;</div>');}});}
	function hideCommentsForm(objectId){$("#replyPost"+objectId).html('');$("#replyLink_"+objectId).show();var currPage=$('input#tx_arxcomments_pi1_page').val();var currentUrl=document.location.href;if(currentUrl.indexOf('?')!=-1)
	currentUrl=currentUrl+"&type=2666";else
	currentUrl=currentUrl+"?type=2666";if(objectId==0){data=data+'&tx_arxcomments_pi1[page]=0';}else{data=data+'&tx_arxcomments_pi1[page]='+currPage;}
	currentUrl=currentUrl.replace('#comentarii','');currentUrl=currentUrl.replace('#commentAddLink','');currentUrl=currentUrl.replace('#stire','');var data='&tx_arxcomments_pi1[formOnly]=1&tx_arxcomments_pi1[no_submit]=1&tx_arxcomments_pi1[replyTo]=0&no_cache=1';$('#bottomForm').empty().height(135).width(400).addClass('loader');$.ajax({url:currentUrl,cache:false,type:"POST",data:data,success:function(html){$("#bottomForm").height('auto').width('auto').replaceWith(html).removeClass('loader');}});}
	function hideReportingForm(objectId){$("#reportLink_"+objectId).show();$("#reportForm_"+objectId).hide();}
	function submitComment(objectID){var name=$('input#tx_arxcomments_pi1_name_'+objectID).val();var email=$('input#tx_arxcomments_pi1_email_'+objectID).val();var content=$('textarea#tx_arxcomments_pi1_content_'+objectID).val();var itemurl=$('input#tx_arxcomments_pi1_itemurl_'+objectID).val();var itemurlchk=$('input#tx_arxcomments_pi1_itemurlchk_'+objectID).val();var currPage=$('input#tx_arxcomments_pi1_page').val();var isArchive=$('input#tx_arxcomments_pi1_isArchive').val();var subscribe=$('#want').val();var data='tx_arxcomments_pi1[name]='+name+'&tx_arxcomments_pi1[email]='+email+'&tx_arxcomments_pi1[content]='+content+'&tx_arxcomments_pi1[itemurl]='+itemurl+'&tx_arxcomments_pi1[itemurlchk]='+itemurlchk+'&tx_arxcomments_pi1[submit]=1&tx_arxcomments_pi1[replyTo]='+objectID+'&tx_arxcomments_pi1[isArchive]='+isArchive+'&tx_arxcomments_pi1[subscribe]='+subscribe+'&tx_arxcomments_pi1[ajaxSubmit]=1&no_cache=1';var currentUrl=document.location.href;if(currentUrl.indexOf('?')!=-1)
	currentUrl=currentUrl+"&type=2666";else
	currentUrl=currentUrl+"?type=2666";if(objectID==0){data=data+'&tx_arxcomments_pi1[page]=0';}else{data=data+'&tx_arxcomments_pi1[page]='+currPage;}
	currentUrl=currentUrl.replace('#comentarii','');currentUrl=currentUrl.replace('#commentAddLink','');currentUrl=currentUrl.replace('#stire','');$.ajax({url:currentUrl,cache:false,type:"POST",data:data,success:function(html){$("#items").html(html);$("#tx_arxcomments_replyForm"+objectID).show();$("#reply_"+objectID).show();}});var data='&tx_arxcomments_pi1[formOnly]=1&tx_arxcomments_pi1[name]='+name+'&tx_arxcomments_pi1[email]='+email+'&tx_arxcomments_pi1[content]='+content+'&tx_arxcomments_pi1[replyTo]='+objectID+'&tx_arxcomments_pi1[isArchive]='+isArchive+'&no_cache=1';$('#bottomForm').empty().height(135).width(400).addClass('loader');$.ajax({url:currentUrl,cache:false,type:"POST",data:data,success:function(html){$("#bottomForm").height('auto').width('auto').replaceWith(html).removeClass('loader');$(':text','#tx_arxcomments_replyForm'+objectID).wrap('<span class="textInput"></span>');}});return false;}
	function updateCommentsNumber(data,isArchive){var data='&tx_arxcomments_pi1[data]='+data+'&tx_arxcomments_pi1[updateComments]=1'+'&tx_arxcomments_pi1[isArchive]='+isArchive;var currentUrl=document.location.href;if(currentUrl.indexOf('?')!=-1)
	currentUrl=currentUrl+"&type=2666";else
	currentUrl=currentUrl+"?type=2666";$.ajax({url:currentUrl,cache:false,type:"POST",data:data,success:function(html){$("#commentsCount").html(html);}});}
	function reportForm(url,itemID,error,isArchive){var data=url+'&tx_arxcomments_pi1[reportForm]='+itemID+'&tx_arxcomments_pi1[ajaxReport]=1'+'&tx_arxcomments_pi1[isArchive]='+isArchive;var currentUrl=document.location.href;if(currentUrl.indexOf('?')!=-1)
	currentUrl=currentUrl+"&type=2666";else
	currentUrl=currentUrl+"?type=2666";$.ajax({url:currentUrl,cache:false,type:"POST",data:data,success:function(html){if(url>'')
	{$("#reportForm_"+itemID).show();$("#replyPost"+itemID).hide();$("#replyLink_"+itemID).show();$("#reportLink_"+itemID).hide();}
	if(error==1)
	{$("#reasonError_"+itemID).show();}else{$("#reasonError_"+itemID).hide();}}});}
	function report(url,itemID,successReportMessage){if(document.getElementById('tx_arxcomments_pi1_reportReason_'+itemID).value>''){var data=url+'&tx_arxcomments_pi1[reason]='+document.getElementById('tx_arxcomments_pi1_reportReason_'+itemID).value+'&tx_arxcomments_pi1[report]='+itemID+'&tx_arxcomments_pi1[ajaxReport]=1';var currentUrl=document.location.href;if(currentUrl.indexOf('?')!=-1)
	currentUrl=currentUrl+"&type=2666";else
	currentUrl=currentUrl+"?type=2666";$.ajax({url:currentUrl,cache:false,type:"POST",data:data,success:function(html){$("#items").html(html);$("#reportLink_"+itemID).html('<a href="javascript:void(0);">'+successReportMessage+"</a>");}});}else{reportForm(url,itemID,1);}}
	function vote(url,itemID,isArchive){var data=url+'&tx_arxcomments_pi1[vote]='+itemID+'&tx_arxcomments_pi1[ajaxVote]=1';var currentUrl=document.location.href;if(currentUrl.indexOf('?')!=-1)
	currentUrl=currentUrl+"&type=2666&tx_arxcomments_pi1[isArchive]="+isArchive;else
	currentUrl=currentUrl+"?type=2666&tx_arxcomments_pi1[isArchive]="+isArchive;  $("#voteLink_"+ itemID).empty().html('Ai votat acest comentariu!').show('fast'); $.ajax({url:currentUrl,cache:false,type:"POST",data:data,success:function(html){$("#items").html(html);}});}
	/*vote*/
	function registerVote(url,data,type,value){if(url.indexOf('?')!=-1)url=url+"&type="+type;else url=url+"?type="+type;$.ajax({url:url,cache:false,type:"POST",data:'tx_voting_pi1[data]='+data,success:function(html){$(".recommend").replaceWith(html);value=value+1;$("#votesCount").replaceWith(value)}})}
	/*lsuvideo/ajax_functions.js*/
	function showCategVideoList(b,c,d){$("#latestList,#videoCatList").empty().width(230).height(208).addClass('loader');var e='tx_lsuvideo_pi1[showCateg]='+c+'&tx_lsuvideo_pi1[page]='+d+'&tx_lsuvideo_pi1[ajaxSwitchCat]=1';var f=document.location.href;if(f.indexOf('?')!=-1)f=f+"&tx_lsuvideo_pi1[showCateg]="+c+'&tx_lsuvideo_pi1[page]='+d+"&tx_lsuvideo_pi1[ajaxSwitchCat]=1&type=3690";else f=f+"?tx_lsuvideo_pi1[showCateg]="+c+'&tx_lsuvideo_pi1[page]='+d+"&tx_lsuvideo_pi1[ajaxSwitchCat]=1&type=3690";$.ajax({url:f,cache:false,type:"POST",data:e,success:function(a){$("#latestList,#videoCatList").replaceWith(a);$("#latestList,#videoCatList").removeAttr('width').removeAttr('height').removeClass('loader')}})}function closeTipForm(){var a=document.location.href;var b=document.location.href;$.ajax({url:b,cache:false,type:"POST",data:a,success:function(){$("#tipafriendlayout").html(' ')}})}
	/*coperta/res/cal.js*/
	function deruleaza(b,c,d){if(b=="inapoi")var e='tx_coperta_pi1[direction]=inapoi&tx_coperta_pi1[year]='+c+'&tx_coperta_pi1[month]='+d;if(b=="inainte")var e='tx_coperta_pi1[direction]=inainte&tx_coperta_pi1[year]='+c+'&tx_coperta_pi1[month]='+d;var f=document.location.href;if(f.indexOf('?')!=-1)f=f+"&type=44";else f=f+"?type=44";$.ajax({url:f,cache:false,type:"POST",data:e,dataType:"html",success:function(a){$("#calendar").html(a)}})}
	/*poll*/
	function pollSubmit(b,c){var d=$('input[name=answer_'+b+']:checked').val();var e=document.location.href;if(e.indexOf('?')!=-1)e=e+"&type="+c;else e=e+"?type="+c;$.ajax({url:e,cache:false,type:"POST",data:'tx_nxpoll_pi1[pollId]='+b+'&tx_nxpoll_pi1[answer]='+d,success:function(a){$("#pollinfo"+b).replaceWith(a)}})}function pollResults(b,c){var d='&tx_nxpoll_pi1[ajaxResults]=1';var e=document.location.href;if(e.indexOf('?')!=-1)e=e+"&type="+c;else e=e+"?type="+c;$.ajax({url:e,cache:false,type:"POST",data:'tx_nxpoll_pi1[pollId]='+b+d,success:function(a){$("#pollinfo"+b).replaceWith(a);return false}})}
	/*customindex_autocomplete*/	
	$.autocomplete=function(input,options){var me=this;var $input=$(input).attr("autocomplete","off");;if(options.inputClass)$input.addClass(options.inputClass);var results=document.createElement("div");var $results=$(results);var pos=findPos(input);var ch=navigator.userAgent.toLowerCase().indexOf('chrome')>-1?(pos.y+input.offsetHeight)+82+"px":(pos.y+input.offsetHeight)+"px"
	options.mustMatch=options.mustMatch||0;$results.hide().addClass(options.resultsClass).css({position:"absolute",top:ch,left:pos.x+"px"});var readWidth=parseInt($("input[name='tx_evzsearch_pi1[sword]']").get(0).clientWidth);if(readWidth>0){$results.css({width:readWidth+"px"});}
	$("body").append(results);input.autocompleter=me;input.lastSelected=$input.val();var timeout=null;var prev="";var active=-1;var cache={};var keyb=false;$input.keydown(function(e){switch(e.keyCode){case 38:e.preventDefault();moveSelect(-1);break;case 40:e.preventDefault();moveSelect(1);break;case 9:case 13:if(selectCurrent()){e.preventDefault();}
	break;default:active=-1;if(timeout)clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break;}}).blur(function(){hideResults();});hideResultsNow();function onChange(){var v=$input.val();if(v==prev)return;prev=v;if(v.length>=options.minChars){$input.addClass(options.loadingClass);requestData(v);}else{$input.removeClass(options.loadingClass);$results.hide();}};function moveSelect(step){var lis=$("li",results);if(!lis)return;active+=step;if(active<0){active=0;}else if(active>=lis.size()){active=lis.size()-1;}
	lis.removeClass("over");$(lis[active]).addClass("over");};function selectCurrent(){var li=$("li.over",results)[0];if(!li){var $li=$("li",results);if(options.selectOnly){if($li.length==1)li=$li[0];}else if(options.selectFirst){li=$li[0];}}
	if(li){selectItem(li);return true;}else{return false;}};function selectItem(li){if(!li){li=document.createElement("li");li.extra=[];li.selectValue="";}
	var v=$.trim(li.selectValue?li.selectValue:li.innerHTML);input.lastSelected=v;prev=v;$results.html("");$input.val(v);hideResultsNow();if(options.onItemSelect)setTimeout(function(){options.onItemSelect(li)},1);};function hideResults(){if(timeout)clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){if(timeout)clearTimeout(timeout);$input.removeClass(options.loadingClass);if($results.is(":visible")){$results.hide();}
	if(options.mustMatch){var v=$input.val();if(v!=input.lastSelected){selectItem(null);}}};function receiveData(q,data){if(data){$input.removeClass(options.loadingClass);results.innerHTML="";if($.browser.msie){var iframe=document.createElement('iframe');iframe.style.filter="mask";$results.append(iframe);}
	results.appendChild(dataToDom(data));$results.show();}else{hideResultsNow();}};function parseData(data){if(!data)return null;var parsed=[];var rows=data.split(options.lineSeparator);for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){parsed[parsed.length]=row.split(options.cellSeparator);}}
	return parsed;};function dataToDom(data){var ul=document.createElement("ul");var num=data.length;for(var i=0;i<num;i++){var row=data[i];if(!row)continue;var li=document.createElement("li");if(options.formatItem){li.innerHTML=options.formatItem(row,i,num);li.selectValue=row[0];}else{li.innerHTML=row[0];}
	var extra=null;if(row.length>1){extra=[];for(var j=1;j<row.length;j++){extra[extra.length]=row[j];}}
	li.extra=extra;ul.appendChild(li);$(li).hover(function(){$("li",ul).removeClass("over");$(this).addClass("over");},function(){$(this).removeClass("over");}).click(function(e){e.preventDefault();e.stopPropagation();selectItem(this)});}
	return ul;};function requestData(q){if(!options.matchCase)q=q.toLowerCase();var data=options.cacheLength?loadFromCache(q):null;if(data){receiveData(q,data);}else{$.get(makeUrl(q),function(data){data=parseData(data)
	addToCache(q,data);receiveData(q,data);});}};function makeUrl(q){var url=options.url+"&sw="+q;for(var i in options.extraParams){url+="&"+i+"="+options.extraParams[i];}
	return url;};function loadFromCache(q){if(!q)return null;if(cache[q])return cache[q];if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var qs=q.substr(0,i);var c=cache[qs];if(c){var csub=[];for(var j=0;j<c.length;j++){var x=c[j];var x0=x[0];if(matchSubset(x0,q)){csub[csub.length]=x;}}
	return csub;}}}
	return null;};function matchSubset(s,sub){if(!options.matchCase)s=s.toLowerCase();var i=s.indexOf(sub);if(i==-1)return false;return i==0||options.matchContains;};this.flushCache=function(){cache={};};this.setExtraParams=function(p){options.extraParams=p;};function addToCache(q,data){if(!data||!q||!options.cacheLength)return;if(!cache.length||cache.length>options.cacheLength){cache={};cache.length=1;}else if(!cache[q]){cache.length++;}
	cache[q]=data;};function findPos(obj){var curleft=obj.offsetLeft||0;var curtop=obj.offsetTop||0;while(obj=obj.offsetParent){curleft+=obj.offsetLeft
	curtop+=obj.offsetTop}
	return{x:curleft,y:curtop};}}
	$.fn.autocomplete=function(url,options){options=options||{};options.url=url;options.inputClass=options.inputClass||"ac_input";options.resultsClass=options.resultsClass||"ac_results";options.lineSeparator=options.lineSeparator||"\n";options.cellSeparator=options.cellSeparator||"|";options.minChars=options.minChars||1;options.delay=options.delay||400;options.matchCase=options.matchCase||0;options.matchSubset=options.matchSubset||1;options.matchContains=options.matchContains||0;options.cacheLength=options.cacheLength||1;options.mustMatch=options.mustMatch||0;options.extraParams=options.extraParams||{};options.loadingClass=options.loadingClass||"ac_loading";options.selectFirst=options.selectFirst||false;options.selectOnly=options.selectOnly||false;this.each(function(){var input=this;new $.autocomplete(input,options);});return this;}
	function selectItem(li){var thefield=$("input[name='tx_evzsearch_pi1[sword]']");var theForm=thefield.parent();var i=0;while(!theForm.is("form")&&i<20){theForm=thefield.parent();i++;}
	if(theForm.is("form")){}}
	function formatItem(row){if(parseInt(row[1])==1){return row[0];}
	return row[0];}
	$(document).ready(function(){var href=document.location.href;if(href.indexOf('?')>0)href=href+'&';else href=href+'?';$("input[name='tx_evzsearch_pi1[sword]']").autocomplete(href+"tx_customindexautocomplete_pi1[code]=search&no_cache=1&sr="+sr+"&sh="+sh+"",{minChars:3,matchSubset:1,matchContains:1,cacheLength:10,formatItem:formatItem,onItemSelect:selectItem,selectOnly:1});});
	/*gallery extension*/
	function showCategList(b,c,d){$("#latestList,#galleryCatList").empty().width(230).height(208).addClass('loader');var e='tx_gallery_pi1[showCateg]='+c+'&tx_gallery_pi1[page]='+d+'&tx_gallery_pi1[ajaxSwitchCat]=1';var f=document.location.href;if(f.indexOf('?')!=-1)f=f+"&tx_gallery_pi1[showCateg]="+c+'&tx_gallery_pi1[page]='+d+"&tx_gallery_pi1[ajaxSwitchCat]=1&type=3686";else f=f+"?tx_gallery_pi1[showCateg]="+c+'&tx_gallery_pi1[page]='+d+"&tx_gallery_pi1[ajaxSwitchCat]=1&type=3686";$.ajax({url:f,cache:false,type:"POST",data:e,success:function(a){$("#latestList,#galleryCatList").replaceWith(a);$("#latestList,#galleryCatList").removeAttr('width').removeAttr('height').removeClass('loader')}})}function closeTipForm(){var a=document.location.href;var b=document.location.href;$.ajax({url:b,cache:false,type:"POST",data:a,success:function(){$("#tipafriendlayout").html(' ')}})}
	
	/* jNice version: 1.0 (11.26.08) by Sean Mooney (sean@whitespace-creative.com) 
	* Examples at: http://www.whitespace-creative.com/jquery/jnice/
	* Dual licensed under the MIT and GPL licenses:
	*   http://www.opensource.org/licenses/mit-license.php
	*   http://www.gnu.org/licenses/gpl.html */
	
	(function($){$.fn.jNice=function(options){var self=this;var safari=$.browser.safari;$(document).mousedown(checkExternalClick);return this.each(function(nr){$('input.want',this).each(CheckAdd); $('select',this).each(function(index){SelectAdd(this,index);});$(this).bind('reset',function(){var action=function(){Reset(this);};window.setTimeout(action,10);});$('.jNiceHidden').css({opacity:0});});};var Reset=function(form){var sel;$('.jNiceSelectWrapper select',form).each(function(){sel=(this.selectedIndex<0)?0:this.selectedIndex;$('ul',$(this).parent()).each(function(){$('a:eq('+sel+')',this).click();});});$('a.jNiceCheckbox',form).removeClass('jNiceChecked');$('input:checkbox', form).each(function(){if(this.checked){$('a',$(this).parent()).addClass('jNiceChecked');}});};var CheckAdd=function(){var $input=$(this).addClass('jNiceHidden').wrap('<span class="jNiceWrapper"></span>');var $wrapper=$input.parent().append('<span class="jNiceCheckbox"></span>');var $a=$wrapper.find('.jNiceCheckbox').click(function(){var $a=$(this);var input=$a.siblings('input')[0];if(input.checked===true){input.checked=false;$a.removeClass('jNiceChecked');}
	else{input.checked=true;$a.addClass('jNiceChecked');}
	return false;});$input.click(function(){if(this.checked){$a.addClass('jNiceChecked');}
	else{$a.removeClass('jNiceChecked');}}).focus(function(){$a.addClass('jNiceFocus');}).blur(function(){$a.removeClass('jNiceFocus');});if(this.checked){$('.jNiceCheckbox', $wrapper).addClass('jNiceChecked');}};var SelectHide=function(){$('.jNiceSelectWrapper ul:visible').hide()};var checkExternalClick=function(event){if($(event.target).parents('.jNiceSelectWrapper').length===0){SelectHide();}};var SelectAdd=function(element,index){var $select=$(element);$select.css('opacity',0);index=index||$select.css('zIndex')*1;index=(index)?index:0;var width=($.browser.msie && $.browser.version<8) || $.browser.opera? parseInt($select.width())+12 : parseInt($select.width())+10;$select.wrap($('<div class="jNiceWrapper"></div>').css({zIndex:100-index,width:width+'px'}));$select.addClass('jNiceHidden').after('<div class="jNiceSelectWrapper"><div><span class="jNiceSelectText"></span><span class="jNiceSelectOpen"></span></div><ul style="overflow:auto"></ul></div>');var $wrapper=$(element).siblings('.jNiceSelectWrapper').css({width:width+'px'});$('.jNiceSelectText, .jNiceSelectWrapper ul',$wrapper).width(width-$('.jNiceSelectOpen',$wrapper).width());if($.browser.msie&&jQuery.browser.version<7){/*$select.after($('<iframe src="javascript:\'\';" marginwidth="0" marginheight="0" align="bottom" scrolling="no" tabIndex="-1" frameborder="0"></iframe>').css({height:$select.height()+4+'px'}));*/}
	SelectUpdate(element);$('div',$wrapper).click(function(){var $ul=$(this).siblings('ul');var $ulH=$(this).siblings('ul').height();if($ulH>150)$ul.css('height','150px');if($ul.css('display')=='none'){SelectHide();}
	$ul.slideToggle();var offSet=($('a.selected',$ul).offset().top-$ul.offset().top);$ul.animate({scrollTop:offSet});return false;});$select.keydown(function(e){var selectedIndex=this.selectedIndex;switch(e.keyCode){case 40:if(selectedIndex<this.options.length-1){selectedIndex+=1;}
	break;case 38:if(selectedIndex>0){selectedIndex-=1;}
	break;default:return;break;}
	$('ul a',$wrapper).removeClass('selected').eq(selectedIndex).addClass('selected');$('span:eq(0)',$wrapper).html($('option:eq('+selectedIndex+')',$select).attr('selected','selected').text());return false;}).focus(function(){$wrapper.addClass('jNiceFocus');}).blur(function(){$wrapper.removeClass('jNiceFocus');});};var SelectUpdate=function(element){var $select=$(element);var $wrapper=$select.siblings('.jNiceSelectWrapper');var $ul=$wrapper.find('ul').find('li').remove().end().hide();$('option',$select).each(function(i){  $ul.append('<li><a href="javascript:void(0)" index="'+i+'">'+this.text+'</a></li>');});$ul.find('a').click(function(){$('a.selected',$wrapper).removeClass('selected');$(this).addClass('selected');if($select[0].selectedIndex!=$(this).attr('index')&&$select[0].onchange){$select[0].selectedIndex=$(this).attr('index');$select[0].onchange();}
	$select[0].selectedIndex=$(this).attr('index');$('span:eq(0)',$wrapper).html($(this).html());$ul.hide();});$('a:eq('+$select[0].selectedIndex+')',$ul).click();};var SelectRemove=function(element){var zIndex=$(element).siblings('.jNiceSelectWrapper').css('zIndex');$(element).css({zIndex:zIndex}).removeClass('jNiceHidden');$(element).siblings('.jNiceSelectWrapper').remove();};$.jNice={SelectAdd:function(element,index){SelectAdd(element,index);},SelectRemove:function(element){SelectRemove(element);},SelectUpdate:function(element){SelectUpdate(element);}};})(jQuery);
	
	/*Filestyle jquery plugin
	Copyright (c) 2007-2009 Mika Tuupola
	Licensed under the MIT license:http://www.opensource.org/licenses/mit-license.php
	Based on work by Shaun Inman http://www.shauninman.com/archive/2007/09/10/styling_file_inputs_with_css_and_the_dom*/
	(function($){$.fn.filestyle=function(options){var settings={width:250};if(options){$.extend(settings,options);};return this.each(function(){var self=this;var wrapper=$("<div>").css({"width":settings.imagewidth+"px","height":settings.imageheight+"px","background":"url("+settings.image+") 0 0 no-repeat","background-position":"right","display":"inline","position":"absolute","overflow":"hidden"});var filename=$('<input class="file fileText">').addClass($(self).attr("class")).css({"display":"inline","width":settings.width+"px"});$(self).before(filename);$(self).wrap(wrapper);$(self).css({"position":"relative","height":settings.imageheight+"px","width":settings.width+"px","display":"inline","cursor":"pointer","opacity":"0.0"});if($.browser.mozilla){if(/Win/.test(navigator.platform)){$(self).css("margin-left","-142px");}else{$(self).css("margin-left","-168px");};}else{$(self).css("margin-left",settings.imagewidth-settings.width+"px");};$(self).bind("change",function(){filename.val($(self).val());});});};})(jQuery);
	
	/*jCarousel - Riding carousels with jQuery
	   http://sorgalla.com/jcarousel/
	  Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
	  Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
	  Built on top of the jQuery library	
	  http://jquery.com
	  Inspired by the "Carousel Component" by Bill Scott	
	  http://billwscott.com/carousel/*/
	eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(9($){$.1v.C=9(o){z 4.1b(9(){3p r(4,o)})};8 q={Z:F,25:1,21:1,u:7,1c:3,15:7,1K:\'2X\',2c:\'2Q\',1q:0,B:7,1j:7,1G:7,2F:7,2B:7,2z:7,2x:7,2v:7,2s:7,2p:7,1S:\'<P></P>\',1Q:\'<P></P>\',2m:\'2l\',2k:\'2l\',1O:7,1L:7};$.C=9(e,o){4.5=$.16({},q,o||{});4.Q=F;4.D=7;4.H=7;4.t=7;4.U=7;4.R=7;4.N=!4.5.Z?\'1H\':\'26\';4.E=!4.5.Z?\'24\':\'23\';8 a=\'\',1e=e.K.1e(\' \');1r(8 i=0;i<1e.I;i++){6(1e[i].2y(\'C-2w\')!=-1){$(e).1E(1e[i]);8 a=1e[i];1p}}6(e.2t==\'3o\'||e.2t==\'3n\'){4.t=$(e);4.D=4.t.19();6(4.D.1o(\'C-H\')){6(!4.D.19().1o(\'C-D\'))4.D=4.D.B(\'<P></P>\');4.D=4.D.19()}10 6(!4.D.1o(\'C-D\'))4.D=4.t.B(\'<P></P>\').19()}10{4.D=$(e);4.t=$(e).3h(\'>2o,>2n,P>2o,P>2n\')}6(a!=\'\'&&4.D.19()[0].K.2y(\'C-2w\')==-1)4.D.B(\'<P 3g=" \'+a+\'"></P>\');4.H=4.t.19();6(!4.H.I||!4.H.1o(\'C-H\'))4.H=4.t.B(\'<P></P>\').19();4.R=$(\'.C-11\',4.D);6(4.R.u()==0&&4.5.1Q!=7)4.R=4.H.1z(4.5.1Q).11();4.R.V(4.K(\'C-11\'));4.U=$(\'.C-17\',4.D);6(4.U.u()==0&&4.5.1S!=7)4.U=4.H.1z(4.5.1S).11();4.U.V(4.K(\'C-17\'));4.H.V(4.K(\'C-H\'));4.t.V(4.K(\'C-t\'));4.D.V(4.K(\'C-D\'));8 b=4.5.15!=7?1k.1P(4.1m()/4.5.15):7;8 c=4.t.32(\'1F\');8 d=4;6(c.u()>0){8 f=0,i=4.5.21;c.1b(9(){d.1I(4,i++);f+=d.S(4,b)});4.t.y(4.N,f+\'T\');6(!o||o.u===J)4.5.u=c.u()}4.D.y(\'1y\',\'1A\');4.U.y(\'1y\',\'1A\');4.R.y(\'1y\',\'1A\');4.2G=9(){d.17()};4.2b=9(){d.11()};4.1U=9(){d.2q()};6(4.5.1j!=7)4.5.1j(4,\'2a\');6($.2A.28){4.1f(F,F);$(27).1u(\'2I\',9(){d.1t()})}10 4.1t()};8 r=$.C;r.1v=r.2H={C:\'0.2.3\'};r.1v.16=r.16=$.16;r.1v.16({1t:9(){4.A=7;4.G=7;4.X=7;4.13=7;4.14=F;4.1d=7;4.O=7;4.W=F;6(4.Q)z;4.t.y(4.E,4.1s(4.5.21)+\'T\');8 p=4.1s(4.5.25);4.X=4.13=7;4.1i(p,F);$(27).22(\'2E\',4.1U).1u(\'2E\',4.1U)},2D:9(){4.t.2C();4.t.y(4.E,\'3u\');4.t.y(4.N,\'3t\');6(4.5.1j!=7)4.5.1j(4,\'2D\');4.1t()},2q:9(){6(4.O!=7&&4.W)4.t.y(4.E,r.M(4.t.y(4.E))+4.O);4.O=7;4.W=F;6(4.5.1G!=7)4.5.1G(4);6(4.5.15!=7){8 a=4;8 b=1k.1P(4.1m()/4.5.15),N=0,E=0;$(\'1F\',4.t).1b(9(i){N+=a.S(4,b);6(i+1<a.A)E=N});4.t.y(4.N,N+\'T\');4.t.y(4.E,-E+\'T\')}4.1c(4.A,F)},3s:9(){4.Q=1h;4.1f()},3r:9(){4.Q=F;4.1f()},u:9(s){6(s!=J){4.5.u=s;6(!4.Q)4.1f()}z 4.5.u},3q:9(i,a){6(a==J||!a)a=i;6(4.5.u!==7&&a>4.5.u)a=4.5.u;1r(8 j=i;j<=a;j++){8 e=4.L(j);6(!e.I||e.1o(\'C-1a-1D\'))z F}z 1h},L:9(i){z $(\'.C-1a-\'+i,4.t)},2u:9(i,s){8 e=4.L(i),20=0,2u=0;6(e.I==0){8 c,e=4.1B(i),j=r.M(i);1n(c=4.L(--j)){6(j<=0||c.I){j<=0?4.t.2r(e):c.1X(e);1p}}}10 20=4.S(e);e.1E(4.K(\'C-1a-1D\'));1R s==\'3l\'?e.3k(s):e.2C().3j(s);8 a=4.5.15!=7?1k.1P(4.1m()/4.5.15):7;8 b=4.S(e,a)-20;6(i>0&&i<4.A)4.t.y(4.E,r.M(4.t.y(4.E))-b+\'T\');4.t.y(4.N,r.M(4.t.y(4.N))+b+\'T\');z e},1V:9(i){8 e=4.L(i);6(!e.I||(i>=4.A&&i<=4.G))z;8 d=4.S(e);6(i<4.A)4.t.y(4.E,r.M(4.t.y(4.E))+d+\'T\');e.1V();4.t.y(4.N,r.M(4.t.y(4.N))-d+\'T\')},17:9(){4.1C();6(4.O!=7&&!4.W)4.1T(F);10 4.1c(((4.5.B==\'1Z\'||4.5.B==\'G\')&&4.5.u!=7&&4.G==4.5.u)?1:4.A+4.5.1c)},11:9(){4.1C();6(4.O!=7&&4.W)4.1T(1h);10 4.1c(((4.5.B==\'1Z\'||4.5.B==\'A\')&&4.5.u!=7&&4.A==1)?4.5.u:4.A-4.5.1c)},1T:9(b){6(4.Q||4.14||!4.O)z;8 a=r.M(4.t.y(4.E));!b?a-=4.O:a+=4.O;4.W=!b;4.X=4.A;4.13=4.G;4.1i(a)},1c:9(i,a){6(4.Q||4.14)z;4.1i(4.1s(i),a)},1s:9(i){6(4.Q||4.14)z;6(4.5.B!=\'18\')i=i<1?1:(4.5.u&&i>4.5.u?4.5.u:i);8 a=4.A>i;8 b=r.M(4.t.y(4.E));8 f=4.5.B!=\'18\'&&4.A<=1?1:4.A;8 c=a?4.L(f):4.L(4.G);8 j=a?f:f-1;8 e=7,l=0,p=F,d=0;1n(a?--j>=i:++j<i){e=4.L(j);p=!e.I;6(e.I==0){e=4.1B(j).V(4.K(\'C-1a-1D\'));c[a?\'1z\':\'1X\'](e)}c=e;d=4.S(e);6(p)l+=d;6(4.A!=7&&(4.5.B==\'18\'||(j>=1&&(4.5.u==7||j<=4.5.u))))b=a?b+d:b-d}8 g=4.1m();8 h=[];8 k=0,j=i,v=0;8 c=4.L(i-1);1n(++k){e=4.L(j);p=!e.I;6(e.I==0){e=4.1B(j).V(4.K(\'C-1a-1D\'));c.I==0?4.t.2r(e):c[a?\'1z\':\'1X\'](e)}c=e;8 d=4.S(e);6(d==0){3f(\'3e: 3d 1H/26 3c 1r 3b. 3a 39 38 37 36 35. 34...\');z 0}6(4.5.B!=\'18\'&&4.5.u!==7&&j>4.5.u)h.33(e);10 6(p)l+=d;v+=d;6(v>=g)1p;j++}1r(8 x=0;x<h.I;x++)h[x].1V();6(l>0){4.t.y(4.N,4.S(4.t)+l+\'T\');6(a){b-=l;4.t.y(4.E,r.M(4.t.y(4.E))-l+\'T\')}}8 n=i+k-1;6(4.5.B!=\'18\'&&4.5.u&&n>4.5.u)n=4.5.u;6(j>n){k=0,j=n,v=0;1n(++k){8 e=4.L(j--);6(!e.I)1p;v+=4.S(e);6(v>=g)1p}}8 o=n-k+1;6(4.5.B!=\'18\'&&o<1)o=1;6(4.W&&a){b+=4.O;4.W=F}4.O=7;6(4.5.B!=\'18\'&&n==4.5.u&&(n-k+1)>=1){8 m=r.Y(4.L(n),!4.5.Z?\'1l\':\'1N\');6((v-m)>g)4.O=v-g-m}1n(i-->o)b+=4.S(4.L(i));4.X=4.A;4.13=4.G;4.A=o;4.G=n;z b},1i:9(p,a){6(4.Q||4.14)z;4.14=1h;8 b=4;8 c=9(){b.14=F;6(p==0)b.t.y(b.E,0);6(b.5.B==\'1Z\'||b.5.B==\'G\'||b.5.u==7||b.G<b.5.u)b.2j();b.1f();b.1M(\'2i\')};4.1M(\'31\');6(!4.5.1K||a==F){4.t.y(4.E,p+\'T\');c()}10{8 o=!4.5.Z?{\'24\':p}:{\'23\':p};4.t.1i(o,4.5.1K,4.5.2c,c)}},2j:9(s){6(s!=J)4.5.1q=s;6(4.5.1q==0)z 4.1C();6(4.1d!=7)z;8 a=4;4.1d=30(9(){a.17()},4.5.1q*2Z)},1C:9(){6(4.1d==7)z;2Y(4.1d);4.1d=7},1f:9(n,p){6(n==J||n==7){8 n=!4.Q&&4.5.u!==0&&((4.5.B&&4.5.B!=\'A\')||4.5.u==7||4.G<4.5.u);6(!4.Q&&(!4.5.B||4.5.B==\'A\')&&4.5.u!=7&&4.G>=4.5.u)n=4.O!=7&&!4.W}6(p==J||p==7){8 p=!4.Q&&4.5.u!==0&&((4.5.B&&4.5.B!=\'G\')||4.A>1);6(!4.Q&&(!4.5.B||4.5.B==\'G\')&&4.5.u!=7&&4.A==1)p=4.O!=7&&4.W}8 a=4;4.U[n?\'1u\':\'22\'](4.5.2m,4.2G)[n?\'1E\':\'V\'](4.K(\'C-17-1w\')).1J(\'1w\',n?F:1h);4.R[p?\'1u\':\'22\'](4.5.2k,4.2b)[p?\'1E\':\'V\'](4.K(\'C-11-1w\')).1J(\'1w\',p?F:1h);6(4.U.I>0&&(4.U[0].1g==J||4.U[0].1g!=n)&&4.5.1O!=7){4.U.1b(9(){a.5.1O(a,4,n)});4.U[0].1g=n}6(4.R.I>0&&(4.R[0].1g==J||4.R[0].1g!=p)&&4.5.1L!=7){4.R.1b(9(){a.5.1L(a,4,p)});4.R[0].1g=p}},1M:9(a){8 b=4.X==7?\'2a\':(4.X<4.A?\'17\':\'11\');4.12(\'2F\',a,b);6(4.X!==4.A){4.12(\'2B\',a,b,4.A);4.12(\'2z\',a,b,4.X)}6(4.13!==4.G){4.12(\'2x\',a,b,4.G);4.12(\'2v\',a,b,4.13)}4.12(\'2s\',a,b,4.A,4.G,4.X,4.13);4.12(\'2p\',a,b,4.X,4.13,4.A,4.G)},12:9(a,b,c,d,e,f,g){6(4.5[a]==J||(1R 4.5[a]!=\'2h\'&&b!=\'2i\'))z;8 h=1R 4.5[a]==\'2h\'?4.5[a][b]:4.5[a];6(!$.2W(h))z;8 j=4;6(d===J)h(j,c,b);10 6(e===J)4.L(d).1b(9(){h(j,4,d,c,b)});10{1r(8 i=d;i<=e;i++)6(i!==7&&!(i>=f&&i<=g))4.L(i).1b(9(){h(j,4,i,c,b)})}},1B:9(i){z 4.1I(\'<1F></1F>\',i)},1I:9(e,i){8 a=$(e).V(4.K(\'C-1a\')).V(4.K(\'C-1a-\'+i));a.1J(\'2V\',i);z a},K:9(c){z c+\' \'+c+(!4.5.Z?\'-2U\':\'-Z\')},S:9(e,d){8 a=e.2g!=J?e[0]:e;8 b=!4.5.Z?a.1x+r.Y(a,\'2f\')+r.Y(a,\'1l\'):a.2e+r.Y(a,\'2d\')+r.Y(a,\'1N\');6(d==J||b==d)z b;8 w=!4.5.Z?d-r.Y(a,\'2f\')-r.Y(a,\'1l\'):d-r.Y(a,\'2d\')-r.Y(a,\'1N\');$(a).y(4.N,w+\'T\');z 4.S(a)},1m:9(){z!4.5.Z?4.H[0].1x-r.M(4.H.y(\'2T\'))-r.M(4.H.y(\'2S\')):4.H[0].2e-r.M(4.H.y(\'2R\'))-r.M(4.H.y(\'3i\'))},2P:9(i,s){6(s==J)s=4.5.u;z 1k.2O((((i-1)/s)-1k.2N((i-1)/s))*s)+1}});r.16({3m:9(d){z $.16(q,d||{})},Y:9(e,p){6(!e)z 0;8 a=e.2g!=J?e[0]:e;6(p==\'1l\'&&$.2A.28){8 b={\'1y\':\'1A\',\'2M\':\'2L\',\'1H\':\'1q\'},1Y,1W;$.29(a,b,9(){1Y=a.1x});b[\'1l\']=0;$.29(a,b,9(){1W=a.1x});z 1W-1Y}z r.M($.y(a,p))},M:9(v){v=2K(v);z 2J(v)?0:v}})})(3v);',62,218,'||||this|options|if|null|var|function||||||||||||||||||||list|size||||css|return|first|wrap|jcarousel|container|lt|false|last|clip|length|undefined|className|get|intval|wh|tail|div|locked|buttonPrev|dimension|px|buttonNext|addClass|inTail|prevFirst|margin|vertical|else|prev|callback|prevLast|animating|visible|extend|next|circular|parent|item|each|scroll|timer|split|buttons|jcarouselstate|true|animate|initCallback|Math|marginRight|clipping|while|hasClass|break|auto|for|pos|setup|bind|fn|disabled|offsetWidth|display|before|block|create|stopAuto|placeholder|removeClass|li|reloadCallback|width|format|attr|animation|buttonPrevCallback|notify|marginBottom|buttonNextCallback|ceil|buttonPrevHTML|typeof|buttonNextHTML|scrollTail|funcResize|remove|oWidth2|after|oWidth|both|old|offset|unbind|top|left|start|height|window|safari|swap|init|funcPrev|easing|marginTop|offsetHeight|marginLeft|jquery|object|onAfterAnimation|startAuto|buttonPrevEvent|click|buttonNextEvent|ol|ul|itemVisibleOutCallback|reload|prepend|itemVisibleInCallback|nodeName|add|itemLastOutCallback|skin|itemLastInCallback|indexOf|itemFirstOutCallback|browser|itemFirstInCallback|empty|reset|resize|itemLoadCallback|funcNext|prototype|load|isNaN|parseInt|none|float|floor|round|index|swing|borderTopWidth|borderRightWidth|borderLeftWidth|horizontal|jcarouselindex|isFunction|normal|clearTimeout|1000|setTimeout|onBeforeAnimation|children|push|Aborting|loop|infinite|an|cause|will|This|items|set|No|jCarousel|alert|class|find|borderBottomWidth|append|html|string|defaults|OL|UL|new|has|unlock|lock|10px|0px|jQuery'.split('|'),0,{}))
		
$(function() {
	var val;
	inputs();	
	/*general scripts*/
	
	$('.right .iconsList li:last-child, .linkBox li:last-child, #mainNews li:last,#articleListWrapper ul#articleList li:last-child,.debate li:last,#weatherList li:last, #currencyList li:last, .mList li:last-child, .opinions li:last-child,#recomandations li:last, .sideList li:last-child, .twoHalf li:last-child, .topList li:last-child, #discussions li:last, .comments ul li:last-child, #latest li:last-child, #results li:last-child, .footerLinks ul li:last-child, .friendSearch li:last-child, .similar ul:first li:last-child:not(":only-child"),#mainNews li:last,.footerLinks li ul li:last-child,.other:last-child').addClass('lastLi');
	$('#content form:has("select,:check")').not('#tx-srfeuserregister-pi1-fe_users_form').jNice();
	$('tr:even:has("td")','table.groups, table.subjects').addClass('odd');
	$('#brands li img').each(function() {
		var src=$(this).attr('src');
		var hoverSrc=src.replace(/\./,'-h.')
		$(this).hover(function() { $(this).attr('src',hoverSrc)},
		function() { $(this).attr('src',src); });
	});	
	if($('#gallery').length) {
		$('.single #gallery a').fancybox({
			'titleShow'     : true,
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	}
	if($('#narrowbox').length) {
		var block=$('.mainBlock').height(),bHeight=$('#narrowbox').height(),col1H=$('#headLineStory').height(),col2H=$('#articleListWrapper').height(),altColH=$('#articleListWrapper').height(),finalH=Math.max(bHeight,col1H,col2H,altColH),padd=parseInt(finalH-block)+19
		if(finalH>block) $('.mainBlock').css('padding-bottom',padd)
	}
	
	$('textarea', '.left #tellafriendform, .comunity-form, .left .comments .messageForm, .inviteForm fieldset').not('.reportPost .messageForm textarea').wrap('<div class="taWrap"></div>') 
	$('.newspart:last').addClass('lastpart');
	$('#latest li:lt(3)').addClass('important');
	$('.topList li:first-child').addClass('firstOne');
	$('#hotnewsCarousel li:first').addClass('firstLi');
	$('#navigation .active').next().addClass('noBg');
	$("#navigation li:not('.active') a").hover(
		function() {$(this).parent("li").next().addClass("noBg");},
		function() {$(this).parent("li").next().removeClass("noBg");}
	);
	$('.percentageLine li:last').addClass('lastLi')
	$('.currencyNav').jcarousel({scroll:6});
	$('#thumbs ul').jcarousel({scroll:3});
	$('#recomandations ul').jcarousel({scroll:6});
	$('#hotnewsCarousel ul').jcarousel({scroll:3});
	$('#gallery ul').jcarousel({scroll:1,itemLoadCallback: itemLoadCallbackFunction,initCallback: mycarousel_initCallback});
	if($.browser.msie && $.browser.version<8) $('.subject').prepend('<img src="fileadmin/images/quotStart.gif" />').append('<img src="fileadmin/images/quotEnd.gif">')	
	$('#rightForm form,#search','#forumPage').submit(function() { 
		var $t=$('input:first',this).val(),$sp=/^\s*$/
		if(($t=='căutare')||(!$sp.test($t)==false)) {if($('.error',this).length<1) { $(this).append('<div class="error">Vă rugăm să specificaţi termenul de căutare</div>')}; return false}
	});
	
	$('#scwHeadLeft').click(function() {
		var selm=$('#scwMonths').attr('selectedIndex'),mi=13-parseInt(selm)
		//$('#scwMonths').next('.jNiceSelectWrapper').find('ul li').eq(mi).find('a').click()
	});
	
	if($('#userDescr').length) {
		counting()
		$('#userDescr').find('textarea').keyup(function() { counting() });
	}
	
	$('>a','.infoMenu >li:has("div")').click(function() {
		var $a=$(this),$ap=$a.parent('li');
		if($ap.hasClass('visible')) $ap.removeClass('visible'); 
		else $ap.addClass('visible').siblings('li').removeClass('visible'); 
	}) 
	$('body').click(function(ev) { if($(ev.target).parents('.visible').length==0) $('.infoMenu li.visible').removeClass('visible') });	
	$('#searchFilter .checkList input').click(function() { 
		if($(this).is(':not("#cat_0")')) $('#cat_0').attr('checked',false); 
		else $('#searchFilter .checkList input[id!=cat_0]').attr('checked',false)
	});
	$('.searchForm :text,.email, .messageForm input, .messageForm textarea, .comunity-form input, .comunity-form textarea, #rightForm .cautare').each(function() { 
		var init=this.value;
		$(this).focus(function() { val=this.value; if(val==init) $(this).val('');   }).blur(function() { val=this.value;  if(val=="") $(this).val(init); });
	});	
	
	/*.parent().find('li:nth-child(2n+2)').after('<li class="clear"></li>')*/
	$('.newsbox').find('.linkBox li:last-child').prev().addClass('lastLi');
	$('.currencyNav  a').click(function() { 
		$(this).parent('li').addClass('active').siblings('li.active').removeClass('active');
	});
	$(".upload :file, #formAlbums :file").filestyle({image: "fileadmin/images/browse.gif", imageheight : 24, imagewidth : 83, width : 254 });
	
	//FONT SIZER
		var size = ['75%','87.5%','100%','112.5%','125%', '137.5%', '150%'], ind=2;		
		$('li.dimensions a.minus').click(function(){
			if(ind!=1) {		
				ind--;
				$('.single').css("font-size", size[ind]);	
			}	
		});
		$('li.dimensions a.plus').click(function(){	
			if(ind!=7) {	
				ind++;
				$('.single').css("font-size", size[ind]);	
			}	
		});
	
	$('.tabs li a').click(function() {
		var obj=$(this),$context=obj.parents('#multimedia').length?'#multimedia':'.right .sidePanel',target=obj.attr('title');
		obj.parent().addClass('active').siblings().removeClass('active');
		if(obj.parents('.tabs').is(':not(".tabs2")')) {
			var $list=$('*',$context).filter(function(){ return $(this).is("."+target) })
			$list.show().siblings('ol').hide();
			if(obj.parents('#multimedia').length) {
				$list.show().siblings('.mBox').hide()
			}
		}
		return false;
	});
	
	if($.browser.msie && $.browser.version<7) {
		if(document.getElementById('wImage')) {
			var picture = document.getElementById('wImage')
			var source = picture.src;
			picture.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + source + "',sizingMethod='crop')";									 
			picture.src = 'http://evz.com/fileadmin/images/transparent.gif';
		}	
	}
});
function inputs() { $('input.search, #tellafriendform :text,.comunity-form :text, #tellafriendform :password, .messageForm :text, .searchForm :text, #rightForm .cautare').wrap('<span class="textInput"></span>'); } 
 
function itemLoadCallbackFunction(carousel) {
	$('.picControls strong').html(carousel.first);
	var title=$('#gallery ul li').eq(carousel.first-1).find('a').attr('title');
	$('.picControls .pictitle').html(title)
}
function mycarousel_initCallback(carousel,size) {
	$('.picControls span.pages').html($('#gallery li').length);
}

//tell a friend
function overHeight(){
	if(($.browser.msie) && ($.browser.version <=6)) {
		var H = $('body').outerHeight();
		$('#bigOverlay').height(H);
	}
}

function scrollME(){
	var windowH = $.browser.msie ? document.documentElement.scrollTop : window.pageYOffset;
	var windowW = $.browser.msie ? document.documentElement.scrollLeft : window.pageXOffset;
	var fwH = $('#tipafriendlayout').height();
	var fwW = $('#tipafriendlayout').width();
	var docH = parseInt($(window).height())/2;
	var docW = parseInt($(window).width())/2;
	var top=$('#tipafriendlayout').css('top');
	var newTop = docH-(fwH/2);
	var newLeft = docW-(fwW/2) ;
	$('#tipafriendlayout').css({top:newTop+windowH,left:newLeft+windowW});
	$(window).scroll(function(){
		windowH=$.browser.msie ? document.documentElement.scrollTop : window.pageYOffset;
		$('#tipafriendlayout').animate({top:parseInt(newTop)+parseInt(windowH)},{ duration:'normal', queue: false });
	});
}

function populateSelect(year) {
	var year=year,yearStart=parseInt(year)-80, yearEnd=yearStart+70, cArr=[1,0,yearStart], arr=[31,11,yearEnd], months=['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie','Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'], $sel='', $optBeg, selects='';
	for(n=0;n<=2;n++) {   
		var $sel="<select class='bdate sel"+n+"'>"
		if(n==0) for(z=cArr[n];z<=arr[n];z++) $sel+="<option>"+z+"</option>"
		else if (n==2) for(z=arr[n];z>cArr[n];z--) $sel+="<option>"+z+"</option>"
		else for(z=cArr[n];z<=arr[n];z++) $sel+="<option label="+parseInt(z+1)+">"+months[z]+"</option>"
		$sel+="</select>"
		selects+=$sel
	}
	$('#tx-srfeuserregister-pi1-date_of_birth').before(selects);
	$('#tx-srfeuserregister-pi1-date_of_birth').val('1-1-'+(yearStart));
	
	$('#tx-srfeuserregister-pi1-fe_users_form').jNice();
	$('#selectOnFly .jNiceWrapper ul li').click(function() { 
		var optVal=[],$changed=$(this);
		$('#selectOnFly .jNiceWrapper').each(function(sel) {
			var optTxt=$('.jNiceSelectText',this).text() 
			if(sel==1) { 
				var sInd=$('select',this).attr("selectedIndex")	
				optTxt=$('select option:eq('+sInd+')',this).attr('label');
			}	
			optVal.push(optTxt);
		});
		optVal=optVal.join('-');
		$('#tx-srfeuserregister-pi1-date_of_birth').val(optVal);
	})
}

function printLink(url) {
	var base=document.getElementsByTagName('base')[0].href,print = window.open(base+url,'PrintPage','scrollbars=1,width=810,height=500');
	print.focus();
	print.print();
}
function counting() {
	var ta=$('#userDescr').find('textarea'),taVal=ta.val().substring(0,500),taNr=ta.val().length,count=500-parseInt(taNr)
	ta.attr('id','tArea');
	var domEl=document.getElementById('tArea');
	if(taNr>500) { count=0; ta.val(taVal); domEl.scrollTop=domEl.scrollHeight   }
	$('#counter').find('span').text(count)
}

