/**
 * @project: Di-Jet
 * @location: Wax Interactive - www.wax.be
 * @date: 14.06.2010
 * @author: Jan De Wilde
 * @description: Core logic
 */ 

if(typeof $.DIJET == "undefined") {
	$.DIJET = Object;
}

$.DIJET.initialise = {
	construct		:		function() {
		this.navigation();
		this.slideshow();
		this.gallery();
	},
	
	navigation		:		function() {
		$("ul.sf-menu").superfish(); 
	},
	
	slideshow		:		function() {
		if($('#animatedHeader').length){
			$('#animatedHeader') 
			.cycle({ 
				fx:     'fade', 
				speed:  1000, 
				timeout: 2500
			});
		}
		
		if($('#slideshow').length) {
			$('#slideshow') 
			.after('<div id="nav" class="clearfix">')
			.cycle({ 
				fx:     'fade', 
				speed:  1000, 
				timeout: 4000, 
				pager:  '#nav'
			});
			$('#nav').css('width',$('#slideshow img').size() * 17);
		}
	},
	
	gallery			:		function() {
		$('.lightbox').lightBox({
			overlayBgColor: "#000",
			overlayOpacity: 0.6,
			imageLoading: "/public/images/lightbox/loading.gif",
			imageBtnClose: "/public/images/lightbox/close.gif",
			imageBtnPrev: "/public/images/lightbox/prev.gif",
			imageBtnNext: "/public/images/lightbox/next.gif",
			imageBlank: "/public/images/lightbox/blank.gif", 
			containerResizeSpeed: 350,
			txtImage: "",
			txtOf: " - "
		});
	}
}

$(document).ready(function(){
	$.DIJET.initialise.construct();
});
