


	/*
		Author:		J. Kok
		Date:		Tuesday 8th of December
		File:		Jquery Plugins file to load all the "minor" basic plugins
	*/



	
	
	/* ================================================================================
										COLORBOX MAIN PLUGIN 
	   ============================================================================== */
	   
	   
		$(document).ready(function(){
			//Examples of how to assign the ColorBox event to elements
			$("a[rel='masgallery']").colorbox({slideshow:true});
		});	   

		
		
		
		
	/* ========================================================================================
   							CODA SLIDER PACK [REQUIRED FOR HOMEPAGE SLIDER]
       ======================================================================================== */

		var theInt = null;
		var $crosslink, $navthumb;
		var curclicked = 0;
			
		theInterval = function(cur){
			clearInterval(theInt);		
			if( typeof cur != 'undefined' )
				curclicked = cur;
				
				$crosslink.removeClass("active-thumb");
				$navthumb.eq(curclicked).parent().addClass("active-thumb");
				$(".stripNav ul li a").eq(curclicked).trigger('click');
				
				theInt = setInterval(function(){
					$crosslink.removeClass("active-thumb");
					$navthumb.eq(curclicked).parent().addClass("active-thumb");
					$(".stripNav ul li a").eq(curclicked).trigger('click');
					curclicked++;
					if( 6 == curclicked )
						curclicked = 0;
					
				}, 9000);		
		};
		
		
		
		
		
	/* ========================================================================================
							HOMEPAGESLIDER, USED FOR SLIDING THE LATEST NEWS
   	   ======================================================================================== */

			var $$ = $.fn;
			
			$$.extend({
			  SplitID : function()
			  {
			    return this.attr('id').split('-').pop();
			  },
			
			  Slideshow : {
			    Ready : function()
			    {
			      $('div.tmpSlideshowControl')
			        .hover(
			          function() {
			            $(this).addClass('tmpSlideshowControlOn');
			          },
			          function() {
			            $(this).removeClass('tmpSlideshowControlOn');
			          }
			        )
			        .click(
			          function() {
			            $$.Slideshow.Interrupted = true;
			
			            $('div.tmpSlide').hide();
			            $('div.tmpSlideshowControl').removeClass('tmpSlideshowControlActive');
			
			            $('div#tmpSlide-' + $(this).SplitID()).show()
			            $(this).addClass('tmpSlideshowControlActive');
			          }
			        );
			
			      this.Counter = 1;
			      this.Interrupted = false;
			
			      this.Transition();
			    },
			
			    Transition : function()
			    {
			      if (this.Interrupted) {
			        return;
			      }
			
			      this.Last = this.Counter - 1;
			
			      if (this.Last < 1) {
			        this.Last = 4;
			      }
			
			      $('div#tmpSlide-' + this.Last).fadeOut(
			        'slow',
			        function() {
			          $('div#tmpSlideshowControl-' + $$.Slideshow.Last).removeClass('tmpSlideshowControlActive');
			          $('div#tmpSlideshowControl-' + $$.Slideshow.Counter).addClass('tmpSlideshowControlActive');
			          $('div#tmpSlide-' + $$.Slideshow.Counter).fadeIn('slow');
			
			          $$.Slideshow.Counter++;
			
			          if ($$.Slideshow.Counter > 4) {
			            $$.Slideshow.Counter = 1;
			          }
			
			          setTimeout('$$.Slideshow.Transition();', 10000);
			        }
			      );
			    }
			  }
			});
			
			$(document).ready(
			  function() {
			    $$.Slideshow.Ready();
			  }
			);				
						
			
			
			
			
			
			
			
			
			
			
			
			
			
	/* at the moment unstable, when working properly it selects the first element within a form and gives it a :focus property through the DOM 
	 $(document).ready( function() {
	     $('input:first').focus(); // choose first just in case
	     $('input:first').addClass('focusField'); // choose first just in case

	     $('select:first').focus(); // choose first just in case
	     $('select:first').addClass('focusField'); // choose first just in case
	  });		  
	*/
			

		
			
		$(document).ready(function() {
		    $('a[class="external_url"]').click( function() {
		        window.open( $(this).attr('href') );
		        return false;
		    });
		});
			
	
	

		$(document).ready(function() {
	    	$(".tabular_data tbody tr:odd").addClass("striped");		
	    	$(".tabular_data tfoot tr:even").addClass("striped");		
		});

/*	
		$(document).ready(function() { 
			$('input[type="text"]').addClass("idleField");
			$('input[type="text"]').focus(function() {
				$(this).removeClass("idleField").addClass("focusField");
				if (this.value == this.defaultValue){ 
				}
			
				if(this.value != this.defaultValue){
					this.select();
				}
			});
			
			$('input[type="text"]').blur(function() {
				$(this).removeClass("focusField").addClass("idleField");
				if ($.trim(this.value) == ''){
					this.value = (this.defaultValue ? this.defaultValue : '');
				}
			});
		});
		
		
		
		
		
		$(document).ready(function() { 
			$('input[type="password"]').addClass("idleField");
			$('input[type="password"]').focus(function() {
				$(this).removeClass("idleField").addClass("focusField");
				if (this.value == this.defaultValue){ 
				}
			
				if(this.value != this.defaultValue){
					this.select();
				}
			});
			
			$('input[type="password"]').blur(function() {
				$(this).removeClass("focusField").addClass("idleField");
				if ($.trim(this.value) == ''){
					this.value = (this.defaultValue ? this.defaultValue : '');
				}
			});
		});	
		
		
		

		
		
		
		
		
	
		$(document).ready(function() { 
			$('textarea').addClass("idleField");
			$('textarea').focus(function() {
				$(this).removeClass("idleField").addClass("focusField");
				if (this.value == this.defaultValue){ 
				}
			
				if(this.value != this.defaultValue){
					this.select();
				}
			});
	*/		
	/*	JAN UITGEZET OMDAT default value anders in een leeg veld gezet wordt.
		$('textarea').blur(function() {
				$(this).removeClass("focusField").addClass("idleField");
				if ($.trim(this.value) == ''){
					this.value = (this.defaultValue ? this.defaultValue : '');
				}
			});
		});		*/
			
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
			$(document).ready(function() {						  
				  // override some default options
				  $('div.vacancies_details p').expander({
				    slicePoint:       230,  // default is 100
				    expandText:         '', // default is 'read more...'
				    collapseTimer:    5000, // re-collapses after 5 seconds; default is 0, so no re-collapsing
				    userCollapseText: ''   // default is '[collapse expanded text]'
				  });		  
			});		
