
if(!window.console)console={};if(!console.log)console.log=function(){};(function(){jQuery.extend({siblingsWhile:function(elem,dir,fn,args){var matched=[];for(var n=elem[dir];n&&n!=document;n=n[dir]){if(n.nodeType==1){if(!fn.call(n,elem,args))break;matched.push(n);}}
return matched;}});jQuery.fn.extend({nextAllWhile:function(selector){var ret=jQuery.map(this,function(elem,i){return jQuery.siblingsWhile(elem,'nextSibling',(jQuery.isFunction(selector)?selector:function(elem){return $(this).is(selector)}));});return this.pushStack(jQuery.unique(ret));},prevAllWhile:function(selector){var ret=jQuery.map(this,function(elem,i){return jQuery.siblingsWhile(elem,'previousSibling',(jQuery.isFunction(selector)?selector:function(elem){return $(this).is(selector)}));});return this.pushStack(jQuery.unique(ret));}});})();(function(){var TWITTER_URL='http://twitter.com/';var TWITTER_SEARCH_PATH='search?q=';String.tweetify||(String.prototype.tweetify=function(){return this.linkify().hashify().userify();});String.linkify||(String.prototype.linkify=function(){return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+/gi,'<a href="$&">$&</a>');});String.hashify||(String.prototype.hashify=function(){return this.replace(/\B#([\w_]\w[-=~+.:*^\w]+\b(?![-a-z0-9+&@#\/%=~_ ]*?">?))/gi,'<a href="'+TWITTER_URL+TWITTER_SEARCH_PATH+'%23$1">$&</a>');});String.userify||(String.prototype.userify=function(){return this.replace(/\B@([-=~+.:*^\w]+\b)/gi,'<a href="'+TWITTER_URL+'$1">$&</a>');});if(window.jQuery){jQuery.extend({tweetify:function(s){return s.tweetify()},linkify:function(s){return s.linkify()},hashify:function(s){return s.hashify()},userify:function(s){return s.userify()}});jQuery.fn.extend({tweetify:function(){this.html(this.html().tweetify());return this;}});}})();var VoBa={page:'',init:function(o){var page=o.page||'';var typ=o.typ||'';var aktuelles=o.aktuelles||[];var pop_infotour=null;var pop_ebanking=null;$(document).ready(function(){switch(page){case'home':$('#schaubild').hide();$('#schaubild').fadeIn('slow');$('#boersencharts dl dd:gt(0)').hide();$('#boersencharts dl dt a').hover(function(){var foo=$('+ dd',this.parentNode);if(foo.is(':hidden'))foo.show();$('dd',foo.parentNode).not(foo.get(0)).hide();},function(){});$('#service02 select').bind('change',function(){if(this.value&&this.value!==''){var cl=this.options[this.selectedIndex].className||this.className||'sbox_open';document.open(this.value,cl,'dependent=no,toolbar=yes,titlebar=yes,menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes');}});try{$('#box01').flash({id:'icon_aktuell',src:'/gfx/home/icon_aktuell.swf',width:50,height:50,wmode:'transparent',quality:'high'},{update:false,version:6});$('.clippy-blz').flash({id:'clippy_blz',src:'/gfx/flash/clippy.swf',width:10,height:10,bgcolor:'#ffc266',name:'clippy_blz',allowScriptAccess:'always',quality:'high',flashvars:{text:'61191310',fnc:'VoBa.clippy'}},{update:false,version:9});$('.clippy-bic').flash({id:'clippy_bic',src:'/gfx/flash/clippy.swf',width:10,height:10,bgcolor:'#ffc266',name:'clippy_bic',allowScriptAccess:'always',quality:'high',flashvars:{text:'GENODES1VBP',fnc:'VoBa.clippy'}},{update:false,version:9});}catch(e){console.log(e)}
$('#service03').show();try{var tweets=$('#service03 ul.tweets');tweets.show();$.getJSON('http://twitter.com/status/user_timeline/vobaplo.json?count=2&callback=?',function(json){tweets.empty();$.each(json,function(i,tweet){tweets.append('<li id="tweet_'+tweet.id+'" class="tweet">'+tweet.text.tweetify()+'</li>').hide().fadeIn();tweets.find('a').each(function(){this.setAttribute('target','_blank')})});});}catch(e){console.log(e)}
try{var wall=$('#service03 ul.wall');$.getJSON('http://www.volksbank-plochingen.de/fb/wall.json',function(json){wall.empty();$.each(json,function(i,post){wall.append('<li id="post_'+post.id+'" class="wall-post"><a href="http://www.facebook.com/Volksbank.Plochingen">'+post.message+'</a></li>');wall.find('a').each(function(){this.setAttribute('target','_blank')})});});}catch(e){console.log(e)}
$('body#home div.servicebox div.social h3 a').hover(function(){if($(this).hasClass('tab-facebook')){$('div.social h3').removeClass('twitter').addClass('facebook');$('div.social ul.tweets').hide();$('div.social ul.wall').fadeIn();}else{$('div.social h3').removeClass('facebook').addClass('twitter');$('div.social ul.wall').hide();$('div.social ul.tweets').fadeIn();}});$('#box01 ul').aktuelles(aktuelles);$('#vr-infotour').click(function(e){var url='https://ssl.kundenserver.de/vr-medienservice.de/vr-networld/vr-infotour-001/flash/vr-infotour_start_001.php?id=61191310';var width=700;var height=440;var x_pos=(screen.width-width)/2;var y_pos=(screen.height-height)/2;var opt='location=no,dependent=no,hotkeys=no,resizable=yes,scrollbars=no,width='+width+',height='+height;if(pop_infotour===null||pop_infotour.closed==true){pop_infotour=window.open(url,'pop_infotour',opt);}
else{pop_infotour.document.location=url;}
try{pop_infotour.window.resizeTo(width,height+60);pop_infotour.window.moveTo(x_pos,y_pos);pop_infotour.window.focus();}
catch(err){}
e.preventDefault();return false;});setTimeout(VoBa.adjust_layout,50);break;case'kreditkarten':$('#kreditkartenbox').tabs(0);break;case'termine':$('#wrapper_filter').append('<form><select id="filter_ort" name="filter_ort"><option value="*">alle Orte</select></form>');var filter_ort=$('#filter_ort');if(filter_ort){$('#wrapper_filter').show();var orte=new Array();$('span.ort').each(function(){var txt=$(this).text();if(txt.length&&$.inArray(txt,orte)==-1){orte[orte.length]=txt}});$.each(orte.sort(),function(){filter_ort.append('<option>'+this+'</option>')});filter_ort.change(function(){var r_month=/\bmonth-\d{4}-\d{2}\b/;var ort=$(this).val();$('dl.termine dt.first-in-list').removeClass('first-in-list');$('dl.termine dt[month]').each(function(i){$(this).removeAttr('month').removeClass('new-month')});if(ort=='*'){$('dl.termine dt, dl.termine dd').show();$('dl.termine dt:first').addClass('first-in-list');}else{$('dl.termine dt, dl.termine dd').hide();var last_month='';$('dl.termine dt').each(function(){if($('span.ort',this).text()==ort){var month=($(this).attr('class').match(r_month)||[''])[0];if(last_month!=month){if(!$(this).hasClass('new-month'))
$(this).attr('month','foo').addClass('new-month');last_month=month;}
$(this).show();$(this).nextAllWhile('dd').each(function(n){$(this).show()});}});$('dl.termine dt.new-month:visible:first').addClass('first-in-list');}})}
break;case'error404':{var i=0;$('ol.counted/li').each(function(){$(this).html('<div class="steps"><div class="s'+(++i)+'"></div></div><div>'+$(this).html())+'</div>';});break;}
default:break}
if($.jGrowl){$.jGrowl.defaults.position='top-right';$.jGrowl.defaults.closerTemplate='<div>[ alle schlie&szlig;en ]</div>';$.jGrowl.defaults.beforeOpen=function(e,m){$(e).appendTo('#doc')}}
var re=new RegExp("^https?:\/\/","i");$('a.blank,a.link').each(function(){if(re.test(this.getAttribute('href'))){this.setAttribute('target','_blank');}});$('a.pdf,a.formular').each(function(){this.setAttribute('target','_blank')});$('a.inline-pic').each(function(){$(this).slimbox()});$('a.inline-pics').slimbox();if((parseInt($('#content').get(0).offsetHeight)+$('#content').get(0).offsetTop)>(window.innerHeight||(document.documentElement&&document.documentElement.clientHeight)||document.body.offsetHeight))
$('a.jump2pagetop').click(function(){$.scrollTo('#pagetop',200);return false;});else $('a.jump2pagetop').hide();$('a.lupe').click(function(){return false});$('a.mp3').each(function(){$(this).flash({src:'/gfx/flash/player.swf',width:300,height:24},{version:7},function(o){o.flashvars.soundFile=$(this).attr('href');o.flashvars.rightbg='FF6600';o.flashvars.rightbghover='32327A';o.flashvars.righticon='32327A';o.flashvars.righticonhover='FFFFFF';o.flashvars.loader='32327A';if((title=$(this).attr('title'))!==''){o.flashvars.titles=title}
$(this).before($.fn.flash.transform(o));$(this).css('display','block');});});$('a.flv').each(function(){var flv_w=$(this).attr('flv-width')||320;var flv_h=$(this).attr('flv-height')||240;$(this).flash({src:'/gfx/flash/flvscrubber.swf',width:flv_w,height:flv_h},{version:9},function(o){o.flashvars.file=$(this).attr('href');o.flashvars.secondsToHide='3';if((flv_link=$(this).attr('flv-link'))!==undefined&&flv_link!==''){o.flashvars.link=flv_link;}
if((title=$(this).attr('title'))!==undefined&&title!==''){o.flashvars.credit=title;}
if((prvimg=$(this).attr('prv'))!=undefined&&prvimg!==''){o.flashvars.previewImage=prvimg;}
$(this).before($.fn.flash.transform(o));$(this).css('display','none');});});$('ul.accord li:gt(0) div').hide();$('ul.accord li h2 a').click(function(e){var p=$('div',$(this).parent().parent());if(p.is(':hidden')){p.slideDown();$('ul.accord li div:visible').not(p.get(0)).slideUp();}
return false;});$('.toggle-details').expandCollapse({updateText:true,startHidden:true,expandDuration:'fast',collapseDuration:'fast',expandClass:'toggle-open',collapseClass:'toggle-close',expandText:'Details einblenden',collapseText:'Details ausblenden',expandFunction:function(a,d){this.animate(a,d).effect('highlight',{},3000)}});var fontsize=readCookie('fontsize');(fontsize=='small'&&$('body').css('font-size','11px').css('line-height','1em'))||(fontsize=='big'&&$('body').css('font-size','15px').css('line-height','1.44em'));$('a.sfs').click(function(){$('body').css('font-size','11px').css('line-height','1em');createCookie('fontsize','small',365);});$('a.sfn').click(function(){$('body').css('font-size','13px').css('line-height','1.22em');eraseCookie('fontsize');});$('a.sfb').click(function(){$('body').css('font-size','15px').css('line-height','1.44em');createCookie('fontsize','big',365);});(readCookie('layout')=='liquid'&&$('#doc').css('width','auto').css('margin','auto 2%'));$('a.sl1').click(function(){$('#doc').css('width','69.69em').css('*width','69.3em').css('margin','auto');eraseCookie('layout');});$('a.sl2').click(function(){$('#doc').css('width','auto').css('margin','auto 2%');createCookie('layout','liquid',365);});});},adjust_layout:function(){var e1=parseInt($('div.servicebox').offset().top)+$('div.servicebox').outerHeight();var e2=parseInt($('#box03').offset().top)+$('#box03').outerHeight();var d=(e1-8)-e2;if(d&&d>-68&&d<24){var e3=parseInt($('#box02').css('margin-bottom'));$('#box02').css('margin-bottom',(e3+d)+'px');}},clippy:function(o){var logger=window['console']&&console.log||function(){};switch(o.action){case'click':$.jGrowl('&raquo;'+o.text+'&laquo; befindet sich nun in der Zwischenablage.');break;default:logger(o);break;}}};function immosuche_reload(){try{var foo=$('#container_immosuche').get(0);if(foo){var h=location.hash;if(h.charAt(0)=='#'){h=h.substring(1);}
h=parseInt(h);$('#container_immosuche').css('height',h+'px');}}catch(e){}}
function iframe_reload(id){try{var foo=$('#'+id).get(0);if(foo){var h=location.hash;if(h.charAt(0)=='#'){h=h.substring(1);}
h=parseInt(h);$('#'+id).css('height',h+'px');}}catch(e){}}
function createCookie(name,value,days){var expires='';if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires='; expires='+date.toGMTString();}
document.cookie=name+"="+value+expires+'; path=/';}
function readCookie(name){var nameEQ=name+'=';var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)===0)return c.substring(nameEQ.length,c.length);}
return null;}
function eraseCookie(name){createCookie(name,'',-1);}
jQuery.getPos=function(e){var l=0;var t=0;var w=jQuery.intval(jQuery.css(e,'width'));var h=jQuery.intval(jQuery.css(e,'height'));var wb=e.offsetWidth;var hb=e.offsetHeight;while(e.offsetParent){l+=e.offsetLeft+(e.currentStyle?jQuery.intval(e.currentStyle.borderLeftWidth):0);t+=e.offsetTop+(e.currentStyle?jQuery.intval(e.currentStyle.borderTopWidth):0);e=e.offsetParent;}
l+=e.offsetLeft+(e.currentStyle?jQuery.intval(e.currentStyle.borderLeftWidth):0);t+=e.offsetTop+(e.currentStyle?jQuery.intval(e.currentStyle.borderTopWidth):0);return{x:l,y:t,w:w,h:h,wb:wb,hb:hb};};jQuery.getScroll=function(e){if(e){t=e.scrollTop;l=e.scrollLeft;w=e.scrollWidth;h=e.scrollHeight;}else{if(document.documentElement&&document.documentElement.scrollTop){t=document.documentElement.scrollTop;l=document.documentElement.scrollLeft;w=document.documentElement.scrollWidth;h=document.documentElement.scrollHeight;}else if(document.body){t=document.body.scrollTop;l=document.body.scrollLeft;w=document.body.scrollWidth;h=document.body.scrollHeight;}}
return{t:t,l:l,w:w,h:h};};jQuery.intval=function(v)
{v=parseInt(v);return isNaN(v)?0:v;};(function(){var Ticker=function(){};Ticker.prototype.loader=function(){var self=this;$.ajax({type:"GET",url:self.aktuelles.options.url,dataType:'html',success:function(data){$(self).fadeOut('normal',function(){$(self).html(data).fadeIn('slow');});self.aktuelles.timer=setTimeout(function(){self.aktuelles_loader()},self.aktuelles.options.delay);}});};Ticker.prototype.switcher=function(){var self=this;var cnt=self.aktuelles.options.url.length;var num=self.aktuelles.options.count;if(cnt>num){var i;var n=new Array();for(i=0;i<cnt;i++){n[i]=i;}
var data='';for(i=0;i<num;i++){var rand=Math.round(Math.random()*(n.length-1));data+='<li>'+self.aktuelles.options.url[n.splice(rand,1).pop()]+'</li>';}
$(self).fadeOut('normal',function(){$(self).html(data).fadeIn('slow');});self.aktuelles.timer=setTimeout(function(){self.aktuelles_loader()},self.aktuelles.options.delay);}};jQuery.fn.aktuelles=function(url,o){o=jQuery.extend({url:url,delay:15000,count:5},o);return this.each(function(){this.aktuelles=this.aktuelles||new Ticker();this.aktuelles.options=o;this.aktuelles_loader=(typeof o.url=="string")?this.aktuelles.loader:this.aktuelles.switcher;if(this.aktuelles.timer){clearTimeout(this.aktuelles.timer);}
$(this).css({height:'165px',overflow:'hidden'});var self=this;this.aktuelles.timer=setTimeout(function(){self.aktuelles_loader()},o.delay);});};})();;(function($){var $scrollTo=$.scrollTo=function(target,duration,settings){$(window).scrollTo(target,duration,settings);};$scrollTo.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1};$scrollTo.window=function(scope){return $(window)._scrollable();};$.fn._scrollable=function(){return this.map(function(){var elem=this,isWin=!elem.nodeName||$.inArray(elem.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)
return elem;var doc=(elem.contentWindow||elem).document||elem.ownerDocument||elem;return $.browser.safari||doc.compatMode=='BackCompat'?doc.body:doc.documentElement;});};$.fn.scrollTo=function(target,duration,settings){if(typeof duration=='object'){settings=duration;duration=0;}
if(typeof settings=='function')
settings={onAfter:settings};if(target=='max')
target=9e9;settings=$.extend({},$scrollTo.defaults,settings);duration=duration||settings.speed||settings.duration;settings.queue=settings.queue&&settings.axis.length>1;if(settings.queue)
duration/=2;settings.offset=both(settings.offset);settings.over=both(settings.over);return this._scrollable().each(function(){var elem=this,$elem=$(elem),targ=target,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break;}
targ=$(targ,this);case'object':if(targ.is||targ.style)
toff=(targ=$(targ)).offset();}
$.each(settings.axis.split(''),function(i,axis){var Pos=axis=='x'?'Left':'Top',pos=Pos.toLowerCase(),key='scroll'+Pos,old=elem[key],max=$scrollTo.max(elem,axis);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(settings.margin){attr[key]-=parseInt(targ.css('margin'+Pos))||0;attr[key]-=parseInt(targ.css('border'+Pos+'Width'))||0;}
attr[key]+=settings.offset[pos]||0;if(settings.over[pos])
attr[key]+=targ[axis=='x'?'width':'height']()*settings.over[pos];}else{var val=targ[pos];attr[key]=val.slice&&val.slice(-1)=='%'?parseFloat(val)/100*max:val;}
if(/^\d+$/.test(attr[key]))
attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&settings.queue){if(old!=attr[key])
animate(settings.onAfterFirst);delete attr[key];}});animate(settings.onAfter);function animate(callback){$elem.animate(attr,duration,settings.easing,callback&&function(){callback.call(this,target,settings);});};}).end();};$scrollTo.max=function(elem,axis){var Dim=axis=='x'?'Width':'Height',scroll='scroll'+Dim;if(!$(elem).is('html,body'))
return elem[scroll]-$(elem)[Dim.toLowerCase()]();var size='client'+Dim,html=elem.ownerDocument.documentElement,body=elem.ownerDocument.body;return Math.max(html[scroll],body[scroll])
-Math.min(html[size],body[size]);};function both(val){return typeof val=='object'?val:{top:val,left:val};};})(jQuery);(function($){$.fn.expandCollapse=function(options){options=$.extend({},$.fn.expandCollapse.defaults,options);$.fn.expandCollapse.doClick=function(event)
{text=event.data.text;target=event.data.target;trigger=event.data.trigger;options=event.data.options;hidden=(target.is(":hidden")?true:false);tText=(hidden?options.collapseText:options.expandText);tAddClass=(hidden?options.collapseClass:options.expandClass);tRemoveClass=(hidden?options.expandClass:options.collapseClass);tAnimation=(hidden?options.expandAnimation:options.collapseAnimation);tDuration=(hidden?options.expandDuration:options.collapseDuration);target.toggleClass('open');(hidden?options.expandFunction:options.collapseFunction).call(target,tAnimation,tDuration);if(options.updateClass){trigger.removeClass(tRemoveClass).addClass(tAddClass);}
if(options.updateText){text.text(tText);}
return false;};return this.each(function()
{if(options.startHidden)$(this).hide();(hidden=$(this).is(":hidden"))?$(this).removeClass('open'):$(this).addClass('open');tText=(hidden?options.expandText:options.collapseText);tClass=(hidden?options.expandClass:options.collapseClass);if(!options.triggerElement.length)
{triggerElement=$(options.triggerTag).append($("<a/>").attr({"href":"#","title":tText}));if(options.updateText){triggerElement.children().text(tText);}
if(options.updateClass){triggerElement.addClass(tClass);}
triggerElement.bind('click',{options:options,trigger:triggerElement,text:triggerElement.children(),target:$(this)},function(event){return $.fn.expandCollapse.doClick(event);});$(this).after(triggerElement);}
else
{textElement=((options.textElement.length)?options.textElement:options.triggerElement);if(options.updateText){textElement.text(tText);}
if(options.updateClass){options.triggerElement.addClass(tClass);}
options.triggerElement.bind('click',{options:options,trigger:options.triggerElement,text:textElement,target:$(this)},function(event){return $.fn.expandCollapse.doClick(event);});}});};$.fn.expandCollapse.defaults={updateText:true,updateClass:true,startHidden:false,triggerTag:"<span/>",triggerElement:"",expandClass:"expand",collapseClass:"collapse",textElement:"",expandText:"more",collapseText:"less",expandFunction:function(a,d){this.animate(a,d)},collapseFunction:function(a,d){this.animate(a,d)},expandAnimation:{height:"show"},collapseAnimation:{height:"hide"},expandDuration:0,collapseDuration:0};})(jQuery);