/**
 *	JavaScript | jQuery
 *	apsbb
 *  Author: Dion Snoeijen
 * 	Date: 17/02/2011
 */
$(document).ready(function () {					
	// -----------------------
	//	Header slides
	// -----------------------
	$('.slides').cycle({
		timeout: 3000,
        pager:  '#slides_nav',
		slideExpr: 'img'
	});
	
	// -----------------------
	//	Dropdown menu
	// -----------------------
	$('ul#main_menu li ul').hide();
	$('ul#main_menu li ul').hover(function () {
		$(this).prev().addClass('active');
		$(this).show();
	}).mouseleave(function () {
		$(this).prev().removeClass('active');
		$(this).hide();
	});
	$('ul#main_menu li a').hover(function () {
		$(this).next().show();
	}).mouseleave(function () {
		$(this).next().hide();
	});
	
	// ------------------------
	//	Fix png for IE6
	// ------------------------
	$('body').pngfix({shim: 'images/images_style/x.gif'});
	
	// ------------------------
	//	Clear input
	// ------------------------
	$('input.destination').focus(function () {
		$(this).val('');
	});
	
	$('input#newsletterName').focus(function () {
		$(this).val('');
	});
	$('input#newsletterEmail').focus(function () {
		$(this).val('');
	});


	$('a.fancy').fancybox();

	// All external links new page
	$("#content a[href^='http://']").attr("target","_blank");
	
});



/*
$(document).ready(function () {					
	// -----------------------
	//	Header slides
	// -----------------------
	$('.slides').cycle({
		timeout: 3000,
        pager:  '#slides_nav',
		slideExpr: 'img'
	});
	
	// -----------------------
	//	Dropdown menu
	// -----------------------
	$('ul#main_menu li ul').hide();
	$('ul#main_menu li ul').hover(function () {
		$(this).show();										
	}).mouseleave(function () {
		$(this).hide();
	});
	$('ul#main_menu li a').hover(function () {
		$(this).next().show();
	}).mouseleave(function () {
		$(this).next().hide();	
	});
	
	// ------------------------
	//	Fix png for IE6
	// ------------------------
	$('body').pngfix({shim: 'images/images_style/x.gif'});
	
	// ------------------------
	//	Clear input
	// ------------------------
	$('input.destination').focus(function () {
		$(this).val('');
	});
	
	$('a.fancy').fancybox();
});
*/
