/* - ++resource++hgointernet.plonetheme.javascripts/main.js - */
// http://webshop.hetgeldersorkest.nl/portal_javascripts/++resource++hgointernet.plonetheme.javascripts/main.js?original=1
;(function($){$(function(){Cufon.replace('h1',{fontFamily:'Sol Heavy'});Cufon.replace('h2',{fontFamily:'Sol Heavy'});Cufon.replace('h3',{fontFamily:'Sol Heavy'});Cufon.replace('.navTreeItem',{fontFamily:'Sol Heavy'});Cufon.replace('.navig li',{fontFamily:'Sol Heavy'});Cufon.replace('.concertDate',{fontFamily:'Sol Heavy'});Cufon.replace('.calendarTabLink',{fontFamily:'Sol Heavy'})});var intervalHeader;
function theRotator(){var counter=1;$('div#header ul li').each(function(){$('#header-navigation-pages').append($('<span class="headerNavigationPage'+(counter==1?' selected':'')+'">'+counter+'</span>'));counter++})
$('#header-navigation-prev').click(function(){window.clearInterval(intervalHeader);var current=($('div#header ul li.show')?$('div#header ul li.show'):$('div#header ul li:first'));var next=((current.prev().length)?((current.prev().hasClass('show'))?$('div#rotator ul li:last'):current.prev()):$('div#header ul li:last'));headerAnim(current,next)});$('#header-navigation-next').click(function(){window.clearInterval(intervalHeader);var current=($('div#header ul li.show')?$('div#header ul li.show'):$('div#header ul li:first'));var next=((current.next().length)?((current.next().hasClass('show'))?$('div#rotator ul li:first'):current.next()):$('div#header ul li:first'));headerAnim(current,next)});$('.headerNavigationPage').click(function(){window.clearInterval(intervalHeader);var current=($('div#header ul li.show')?$('div#header ul li.show'):$('div#header ul li:first'));var next=(($('div#header ul li').eq(parseInt($(this).html())-1)));headerAnim(current,next)});intervalHeader=window.setInterval(rotate,6000)}
function rotate(){var current=($('div#header ul li.show')?$('div#header ul li.show'):$('div#header ul li:first'));var next=((current.next().length)?((current.next().hasClass('show'))?$('div#rotator ul li:first'):current.next()):$('div#header ul li:first'));headerAnim(current,next)}
function headerAnim(current,next){$('#header-navigation-pages').children().removeClass('selected');var counter=0;var index=0;$('div#header ul li').each(function(){if($(this).html()==next.html()){index=counter}
counter++});$('#header-navigation-pages span').eq(index).addClass('selected');$('div#header li').css({opacity:0.0});current.css({opacity:1.0});next.addClass('show').animate({opacity:1.0},1000);current.removeClass('show')}
$(function(){theRotator()})}(jQuery));(function($){$(function(){$("a[href$='.pdf']").addClass("pdf").attr({target:"_blank"}).addClass("external");$(".external-link").attr({target:"_blank"})});$(document).ready(function(){$('.calendarTab').hide();$('.calendarTab').css('overflow','hidden');$('#alldays').show();$('.portletCalendar .portletHeader a').click(function(){$('.portletCalendar .portletHeader a').removeClass('current');$(this).addClass('current');$('.calendarTab table').css('top','0px');$('.calendarTab').hide();$($(this).attr('href')).show();return false});$('a.current.calendarTabLink').click();$('.calendarTab').css('overflow','hidden');$('.scrollUp').click(function(){var table=$('.calendarTab:visible table');var cur=-1 *(parseInt(table.css('top'))/74);var len=table.find("tbody tr").length;if(len<5){return false};cur-=5;if(cur<0){cur=0}
table.css('top',(cur *-74)+'px');return false});$('.scrollDown').click(function(){var table=$('.calendarTab:visible table');var cur=-1 *(parseInt(table.css('top'))/74);var len=table.find("tbody tr").length;if(len<5){return false};cur+=5;if(cur>len-5){cur=len-5}
table.css('top',(cur *-74)+'px');return false})})}(jQuery));(function($){$(function(){$('.event').hover(function(){$('.event_popup',$(this)).css('display','block')}, function(){$('.event_popup',$(this)).css('display','none')});if($("#orkest_schema").length>0){txtOff=new Image();txtOff.src="standaard.gif"
txtaOn=new Image();txtaOn.src="tweede_viool.gif"
txtbOn=new Image();txtbOn.src="eerste_viool.gif"
txtcOn=new Image();txtcOn.src="celli.gif"
txtdOn=new Image();txtdOn.src="altviool.gif"
txteOn=new Image();txteOn.src="contrabassen.gif"
txtfOn=new Image();txtfOn.src="slagwerk.gif"
txtgOn=new Image();txtgOn.src="koperblazers.gif"
txthOn=new Image();txthOn.src="houtblazers.gif"}
$("#orkest_schema area").bind("mouseover", function(e){title=$(this).attr("title")
if(title=='Tweede viool'){source=txtaOn.src}
if(title=='Eerste viool'){source=txtbOn.src}
if(title=='Celli'){source=txtcOn.src}
if(title=='Alt viool'){source=txtdOn.src}
if(title=='Contrabas'){source=txteOn.src}
if(title=='Slagwerk'){source=txtfOn.src}
if(title=='Koperblazers'){source=txtgOn.src}
if(title=='Houtblazers'){source=txthOn.src}
$("#orkest_schema_image").attr('src',source)});$("#orkest_schema").bind("mouseout", function(e){$("#orkest_schema_image").attr('src',txtOff.src)})})}(jQuery));(function(d){d.tools=d.tools||{};d.tools.tabs={version:"1.0.4",conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",api:false,rotate:false},addEffect:function(e,f){c[e]=f}};var c={"default":function(f,e){this.getPanes().hide().eq(f).show();e.call()},fade:function(g,e){var f=this.getConf(),j=f.fadeOutSpeed,h=this.getPanes();if(j){h.fadeOut(j)}else{h.hide()}h.eq(g).fadeIn(f.fadeInSpeed,e)},slide:function(f,e){this.getPanes().slideUp(200);this.getPanes().eq(f).slideDown(400,e)},ajax:function(f,e){this.getPanes().eq(0).load(this.getTabs().eq(f).attr("href"),e)}};var b;d.tools.tabs.addEffect("horizontal",function(f,e){if(!b){b=this.getPanes().eq(0).width()}this.getCurrentPane().animate({width:0},function(){d(this).hide()});this.getPanes().eq(f).animate({width:b},function(){d(this).show();e.call()})});function a(g,h,f){var e=this,j=d(this),i;d.each(f,function(k,l){if(d.isFunction(l)){j.bind(k,l)}});d.extend(this,{click:function(k,n){var o=e.getCurrentPane();var l=g.eq(k);if(typeof k=="string"&&k.replace("#","")){l=g.filter("[href*="+k.replace("#","")+"]");k=Math.max(g.index(l),0)}if(f.rotate){var m=g.length-1;if(k<0){return e.click(m,n)}if(k>m){return e.click(0,n)}}if(!l.length){if(i>=0){return e}k=f.initialIndex;l=g.eq(k)}if(k===i){return e}n=n||d.Event();n.type="onBeforeClick";j.trigger(n,[k]);if(n.isDefaultPrevented()){return}c[f.effect].call(e,k,function(){n.type="onClick";j.trigger(n,[k])});n.type="onStart";j.trigger(n,[k]);if(n.isDefaultPrevented()){return}i=k;g.removeClass(f.current);l.addClass(f.current);return e},getConf:function(){return f},getTabs:function(){return g},getPanes:function(){return h},getCurrentPane:function(){return h.eq(i)},getCurrentTab:function(){return g.eq(i)},getIndex:function(){return i},next:function(){return e.click(i+1)},prev:function(){return e.click(i-1)},bind:function(k,l){j.bind(k,l);return e},onBeforeClick:function(k){return this.bind("onBeforeClick",k)},onClick:function(k){return this.bind("onClick",k)},unbind:function(k){j.unbind(k);return e}});g.each(function(k){d(this).bind(f.event,function(l){e.click(k,l);return false})});if(location.hash){e.click(location.hash)}else{if(f.initialIndex===0||f.initialIndex>0){e.click(f.initialIndex)}}h.find("a[href^=#]").click(function(k){e.click(d(this).attr("href"),k)})}d.fn.tabs=function(i,f){var g=this.eq(typeof f=="number"?f:0).data("tabs");if(g){return g}if(d.isFunction(f)){f={onBeforeClick:f}}var h=d.extend({},d.tools.tabs.conf),e=this.length;f=d.extend(h,f);this.each(function(l){var j=d(this);var k=j.find(f.tabs);if(!k.length){k=j.children()}var m=i.jquery?i:j.children(i);if(!m.length){m=e==1?d(i):j.parent().find(i)}g=new a(k,m,f);j.data("tabs",g)});return f.api?g:this}})(jQuery);(function($){$(function(){$.fn.outerHTML=function(s){return(s)?this.before(s).remove():$('<div>').append(this.eq(0).clone()).html()}
$.fn.tabbedportlets=function(){var parent=$(this);$('body').addClass('tabbedportlets');var portlets=$('.portlet',parent);var tabheaders='<'+'ul class="tabs">';var tabs='';$(portlets).each(function(i){var p=$(this);var t='';$('dd',p).each(function(){t=t+$(this).outerHTML()});t='<dl>'+t+'</dl>'||'';if(t){var data='<'+'div class="portlet tab">'+t+'<'+'/div>';tabs=tabs+data;var title=$('dt:eq(0)',p).text().trim();title=title||'Tab'+i;var selected='';var tab='<'+'li '+selected+'>'+title+'<'+'/li>';tabheaders=tabheaders+tab}});tabheaders=tabheaders+'<'+'/ul>';parent.html(tabheaders+tabs);$("ul:eq(0)",parent).tabs($("div.tab",parent))}
$('.portletNieuwsAlles dd:eq(0)').each(function(){$(this).append('<div class="portlet_nieuwsitem">'+$('.portletNieuwsRecensies dd:eq(0) div:eq(0)').html()+'</div>')
$(this).append('<div class="portlet_nieuwsitem">'+$('.portletTwitterPortlet dd:eq(0)').html()+'</div>')
$(this).append('<div class="portlet_nieuwsitem">'+$('.portletTwitterPortlet dd:eq(1)').html()+'</div>')
$(this).append('<div class="portlet_nieuwsitem">'+$('.portletGastenboek dd:eq(0)').html()+'</div>')})
$('.portletGastenboek').append('<dd class="portletFooter"><a href="'+portal_url+'/gastenboek">Alle reacties ></a></dd>');$('#nieuws').tabbedportlets();$('#nieuws ul li').eq(4).css('line-height','18px').html('<img src="++resource++hgointernet.plonetheme.images/twitter_ico.png" alt="Twitter" />')
$('#nieuws ul li').eq(5).css('line-height','18px').html('<img src="++resource++hgointernet.plonetheme.images/facebook_ico.png" alt="Facebook" />')})}(jQuery));

