/*
 * script.css
 * Author: Puck Simons, Exentro Inc.
 * Copyright (c) 2011 Puck Simons, Exentro Inc. - http://exentro.nl
 */
$(document).ready(function(){ 
// SLIDER 						   
	$('#slider').cycle({
        fx:     'fade',
        speed:  'slow',
        timeout: 5000,
        pager:  '#slider_nav',
				prev: '#prev',
				next: '#next',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#slider_nav li:eq(' + (idx) + ') a';
        }
    });

// FANCYBOX 
	$("a[rel=producten], a[rel=afbeeldingen]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
			'onComplete'	:	function() {
			$("#fancybox-wrap").hover(function() {
				$("#fancybox-title").show();
			}, function() {
				$("#fancybox-title").hide();
			});
		},
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over"> ' + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});

//Img Hover	
  var image_e = $(".thumb");
  image_e.mouseover(function () {
    $(this).stop().animate({
      opacity: 0.6
    }, 400);
  }).mouseout(function () {
    image_e.stop().animate({
      opacity: 1
    }, 400);
  });

// TO TOP SCROLL 
  $('a[href=#top]').click(function () {
    $('html, body').animate({
      scrollTop: 0
    }, 'slow');
    return false;
  });
	
// JQUERY TOOLS
	// TABS
		$("ul.tabs").tabs("div.panes > div", {
			effect: 'default',
		});	
	
});	
