$(document).ready(function(){
	if(document.getElementById('nav')){
		$(".lavaLamp").lavaLamp({ fx: "backout", speed: 700 })
	}
	if(document.getElementById('cycle')){
		$('#cycle').cycle({
			fx:     'fade', 
			speed:   1000, 
			timeout: 5000,
			pause:   1,
			pager:  '#cycle-nav',
			pagerAnchorBuilder: function(i,el) {
				if(i == 0){return '<a href="#">Pop-Up Displays</a>';}
				if(i == 1){return '<a href="#">Exhibition &amp; Live Events</a>';}
				if(i == 2){return '<a href="#">Retail Graphics</a>';}
				if(i == 3){return '<a href="#">3D</a>';}
				if(i == 4){return '<a href="#">Hoarding</a>';}
				if(i == 5){return '<a href="#">Sign Making</a>';}
				if(i == 6){return '<a href="#">Slottz&trade;</a>';}
			}		
		});
	}	
	if(document.getElementById('pageflip')){
		$("#pageflip").hover(function() { //On hover...
			$("#pageflip img , .msg_block").stop()
				.animate({ //Animate and expand the image and the msg_block (Width + height)
					width: '307px',
					height: '319px'
				}, 500);
			} , function() {
			$("#pageflip img").stop() //On hover out, go back to original size 50x52
				.animate({
					width: '50px',
					height: '52px'
				}, 220);
			$(".msg_block").stop() //On hover out, go back to original size 50x50
				.animate({
					width: '50px',
					height: '50px'
				}, 200); //Note this one retracts a bit faster (to prevent glitching in IE)
		});
	}
	if(document.getElementById('archive')){
		$("#archive_btn").click(function () {
			$("#archive_slide").slideToggle("slow");
		});
	}
	if(document.getElementById('main')){
		$.swapImage(".swapImage"); 
		$.swapImage(".swapImageDisjoint"); 
	}
	if(document.getElementById('fancybox')){
		$("#fancybox a").fancybox({'titleShow': true});
	}
	if(document.getElementById('Home')){
		$("a.slottz").fancybox({'titleShow': true});
	}
}); 
