$(document).ready(function(){ 
	
	/*
	*
	* SLIDE
	*
	* 	
	* Tutorials: http://www.webdesignerwall.com/tutorials/jquery-tutorials-for-designers/
	* 	
	* 	Slidefunction i.e. login, sitemap, etc.
	*  
	*	<div id="panel">
	*		<!-- you can put content here -->
	*		</div>
	*		
	*		<p class="slide"><a href="#" class="btn-slide">Slide Panel</a></p>
	*  #panel {
	*	display: none;
	*  }
	*
	*
	$(".btn-slide").click(function(){
		$("#panel").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});
	
	
	/*
	*
	* PANELIST
	*
	* 	
	* Tutorials: http://www.webdesignerwall.com/tutorials/jquery-tutorials-for-designers/
	* 	
	*  Make an entire block element clickable 
	* 
	* 
	* 
	*/

	$(".news-list li").click(function(){
		window.location=$(this).find("a").attr("href"); return false;
	});

	/*
	*
	* SLIDESHOWS
	*
	* 	
	* Tutorials: http://malsup.com/jquery/cycle/
	* 	
	*  Choose from any of the following named effects (fx:):  
	* 
	*  blindX, blindY, blindZ, cover,  curtainX, curtainY, fade, fadeZoom, growX, growY, 
	*  scrollUp, scrollDown,  scrollLeft, scrollRight, scrollHorz, scrollVert ,shuffle, 
	*  slideX, slideY, toss, turnUp, turnDown, turnLeft, turnRight, uncover, wipe, zoom
	* 
	*  
	*
	$('#header').cycle({ 
		fx: 'fade',
		timeout: 3000
	});
	*/
	
	$('#slideshow').before('<ul id="nav">').cycle({
        fx:     'fade',
        speed:  'fast',
        timeout: 0,
        pager:  '#nav',
        pagerAnchorBuilder: function(idx, slide) {
            return '<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>';
        }
    });
	
	/*
	*
	*
	* PNG FIX
	*
	*
	*  apply to all png images
	*  $('img[@src$=.png]').ifixpng(); 		 
	* 
	*  apply to all png images and to div#logo 
	*  $('img[@src$=.png], div#logo').ifixpng(); 		 	 
	* 
	*  apply to div#logo, undo fix, then apply the fix again 
	*  $('img[@src$=.png], div#logo').ifixpng().iunfixpng().ifixpng(); 
	* 
	*  apply to div#logo2, modify css property and add click event 
	*  $('div#logo2').ifixpng().css({cursor:'pointer'}).click(function(){ alert('ifixpng is cool!'); });; 
	* 
	*
	*
	
	$.ifixpng('js/images/pixel.gif');
  	$('img[@src$=.png]').ifixpng();
	
	
	
	/*
	*
	*
	* TABS
	*
	*
	*  Tutorial: http://jqueryfordesigners.com/jquery-tabs/
	*  
	*
	*
	
	
	var tabContainers = $('div.tabs > div');
	tabContainers.hide().filter(':first').show();
	
	$('div.tabs ul.tabNavigation a').click(function () {
		tabContainers.hide();
		tabContainers.filter(this.hash).show();
		$('div.tabs ul.tabNavigation a').removeClass('selected');
		$(this).addClass('selected');
		return false;
	}).filter(':first').click();
	
	
	
	/*
	*
	*
	* ACCORDION
	*
	*
	*  Tutorial: http://www.webdesignerwall.com/demo/jquery/accordion2.html
	*  
	*
	*
	
	$(".accordion2 h3").eq(2).addClass("active");
	$(".accordion2 p").eq(2).show();

	$(".accordion2 h3").click(function(){
		$(this).next("p").slideToggle("fast")
		.siblings("p:visible").slideUp("fast");
		$(this).toggleClass("active");
		$(this).siblings("h3").removeClass("active");
	});
	
	
	
	
	/*
	 *
	 *	POP-UP BOX
	 *
	 *
	 * SimpleModal Basic Modal Dialog
	 * http://www.ericmmartin.com/projects/simplemodal/
	 * http://code.google.com/p/simplemodal/
	 *
	 * Copyright (c) 2008 Eric Martin - http://ericmmartin.com
	 *
	 * Licensed under the MIT license:
	 *   http://www.opensource.org/licenses/mit-license.php
	 *
	 * Revision: $Id: basic.js 132 2008-05-23 16:05:17Z emartin24 $
	 *
	 *
	
	
	$('#basicModal input:eq(0)').click(function (e) {
		e.preventDefault();
		$('#basicModalContent').modal();
	});
	
	
	/*
	 *
	 *	DROP DOWN
	 *
	 *
	 * Tutorial: http://users.tpg.com.au/j_birch/plugins/superfish/#getting-started
	 * 
	 *
	 *
	 *
	 * $.fn.superfish.defaults = { 
	 *     hoverClass:    'sfHover',          // the class applied to hovered list items 
	 *     pathClass:     'overideThisToUse', // the class you have applied to list items that lead to the current page 
	 *     pathLevels:    1,                  // the number of levels of submenus that remain open or are restored using pathClass 
	 *     delay:         800,                // the delay in milliseconds that the mouse can remain outside a submenu without it closing 
	 *     animation:     {opacity:'show'},   // an object equivalent to first parameter of jQuery’s .animate() method 
	 *     speed:         'normal',           // speed of the animation. Equivalent to second parameter of jQuery’s .animate() method 
	 *     autoArrows:    true,               // if true, arrow mark-up generated automatically = cleaner source code at expense of initialisation performance 
	 *     dropShadows:   true,               // completely disable drop shadows by setting this to false 
	 *     disableHI:     false,              // set to true to disable hoverIntent detection 
	 *     onInit:        function(){},       // callback function fires once Superfish is initialised – 'this' is the containing ul 
	 *     onBeforeShow:  function(){},       // callback function fires just before reveal animation begins – 'this' is the ul about to open 
	 *     onShow:        function(){},       // callback function fires once reveal animation completed – 'this' is the opened ul 
	 *     onHide:        function(){}        // callback function fires after a sub-menu has closed – 'this' is the ul that just closed 
	 * };
	 * 
	 *
	 *
	 *	IMPORTANT: When a selectbox is right beneath the menu, you'll have to include the bgiframe into the head-section: http://brandonaaron.net/jquery/plugins/bgiframe/docs/
	 *
	 *		 
	 *		 
	 *		$(document).ready(function(){ 
	 *	        $("ul.sf-menu").superfish().find('ul').bgIframe({opacity:false}); 
	 *	    }); 
	 *		 
	 *		$(document).ready(function(){ 
	 *	        $("ul.sf-menu").superfish({ 
	 *	            animation: {height:'show'},   // slide-down effect without fade-in 
	 *	            delay:     1200               // 1.2 second delay on mouseout 
	 *	        }); 
 	 *	   }); 
	 *		   
	 *		$(document).ready(function(){ 
 	 *	       $("ul.sf-menu").superfish({ 
 	 *	           pathClass:  'current' 
 	 *	       }); 
	 *	    }); 
	 *	   
	 *	   $("ul.sf-menu").supersubs({ 
 	 *           minWidth:    12,   // minimum width of sub-menus in em units 
 	 *           maxWidth:    27,   // maximum width of sub-menus in em units 
 	 *           extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
 	 *                              // due to slight rounding differences and font-family 
	 *       }).superfish();  // call supersubs first, then superfish, so that subs are 
	 *                         // not display:none when measuring. Call before initialising 
 	 *                        // containing tabs for same reason. 
	 *
	 *	 $('ul.sf-menu').superfish({ 
	 *		delay:       1000,                            // one second delay on mouseout 
	 *		animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
	 *		speed:       'fast',                          // faster animation speed 
	 *		autoArrows:  false,                           // disable generation of arrow mark-up 
	 *		dropShadows: false                            // disable drop shadows 
	 *	}); 
	 *
	
	
	
	
	$("ul.sf-menu").supersubs({ 
            minWidth:    12,   // minimum width of sub-menus in em units 
            maxWidth:    27,   // maximum width of sub-menus in em units 
            extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
                               // due to slight rounding differences and font-family 
        }).superfish();  // call supersubs first, then superfish, so that subs are 
                         // not display:none when measuring. Call before initialising 
                         // containing tabs for same reason.



		
	 *
	 *	FOTOGALLERY
	 *
	 *
	 * Tutorial: http://www.twospy.com/galleriffic
	 * 
	 *View the source of this page to see a full-featured example setup. All container selectors are optional, so you may choose to not include an area 
	 *(such as the download link, description, etc.). Here is an example of the essential elements needed for a full-featured setup: 
	 *<div id="{controlsContainerSel}"></div>
	 *<div id="{imageContainerSel}"></div>
	 *<div id="{titleContainerSel}"></div>
	 *<div id="{descContainerSel}"></div>
	 *<a id="{downloadLinkSel}">Download Original</a>
	 *<div id="{thumbsContainerSel}">
	 *	... graceful degrading list of thumbnails (specific format specified below) ...
	 *</div>
	 *							
	 *Setup the script references in your html page: 
	 *<head>
	 *	...
	 *	<script type="text/javascript" src="jquery-1.2.6.min.js"></script>
	 *	<script type="text/javascript" src="jquery.galleriffic.min.js"></script>
	 *	...
	 *</head>
	 *							
	 *Within the thumbnails container {thumbsContainerSel}, build your graceful degrading list of thumbnails linking to the image slides as such: 
	 *<ul class="noscript">
	 *	<li>
	 *		<a href="{imageSlideUrl}" original="{imageOriginalUrl}" title="{imageTitle}" description="{imageDescription}">
	 *			<img src="{imageThumbUrl}" alt="{imageTitle (again for graceful degradation)}" />
	 *		</a>
	 *	</li>
	 *	... (repeat for every image in the gallery)
	 *</ul>
	 *							
	 *Initialize the gallery by calling the galleriffic init function, passing in the thumbnails container selector and an options. The following example shows the 				     *default options: 
	 *$(document).ready(function() {
	 *	var gallery = $('#gallery').galleriffic('{thumbsContainerSel}', {
	 *		delay:                3000,
	 *		numThumbs:            20,
	 *		preloadAhead:         40, // Set to -1 to preload all images
	 *		enableTopPager:       true,
	 *		enableBottomPager:    true,
	 *		imageContainerSel:    '',
	 *		controlsContainerSel: '',
	 *		titleContainerSel:    '',
	 *		descContainerSel:     '',
	 *		downloadLinkSel:      '',
	 *		renderSSControls:     true,
	 *		renderNavControls:    true,
	 *		playLinkText:         'Play',
	 *		pauseLinkText:        'Pause',
	 *		prevLinkText:         'Previous',
	 *		nextLinkText:         'Next',
	 *		nextPageLinkText:     'Next &rsaquo;',
	 *		prevPageLinkText:     '&lsaquo; Prev'
	 *	});
	 *});
	 *
	 *
	 *
	 *
	 */	
	 
	 
	var gallery = $('#gallery').galleriffic('#navigation', {
			delay:                2000,
			numThumbs:            20,
			imageContainerSel:    '#slideshow',
			controlsContainerSel: '#controls',
			titleContainerSel:    '#image-title',
			descContainerSel:     '#image-desc',
			downloadLinkSel:      '#download-link'
		});
		
		gallery.onFadeOut = function() {
			$('#details').fadeOut('fast');
		};
		
		gallery.onFadeIn = function() {
			$('#details').fadeIn('fast');
		};
	 
	 
});


		/*
		
		FUNCTIE: MOUSEOVER
		
		Is geen jQuery functie maar het is wel het beste als deze niet in de head staat (staat slordig!)
		*/

		<!--
		function MM_swapImgRestore() { //v3.0
		  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
		}
		function MM_preloadImages() { //v3.0
		  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
			var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
			if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
		}
		
		function MM_findObj(n, d) { //v4.01
		  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
			d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
		  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
		  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
		  if(!x && d.getElementById) x=d.getElementById(n); return x;
		}
		
		function MM_swapImage() { //v3.0
		  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
		   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
		}
		//-->
