$(document).ready(function(){
	$(document).pngFix();
	
	/* make logo clickable */
	$("#logo").click(
	function()
	{
	    window.location = $(this).attr("url");
	    return false;
	});
	
	// rounded corners
	//$('.rounded_box').corners("transparent");
	//$('.button').corners();
	//$('.rounded').corners();
	//$('.error').corners();
	//$('.message').corners();
	//$('.inputtext').corners();
	
	// lightbox
	$('a.lightbox').lightBox({
		imageLoading: '../../system/application/assets/images/lightbox/lightbox-ico-loading.gif',
		imageBtnClose: '../../system/application/assets/images/lightbox/lightbox-btn-close.gif',
		imageBtnPrev: '../../system/application/assets/images/lightbox/lightbox-btn-prev.gif',
		imageBtnNext: '../../system/application/assets/images/lightbox/lightbox-btn-next.gif'
	});
	
	// hidden forms
	$("span#enq").click(function(){
		//$("#enquire").animate({ opacity: "expand" }, "slow");
		$("#enquire").slideToggle("slow");
	});
	
	
	$(".message").animate({top: "0px"}, 1000 ).show('fast').fadeIn(200).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100);
	
	$(".message .close").click(function(){
		//$(this).parents(".message").animate({ opacity: "hide" }, "slow");
		$(this).parents(".message").slideUp("slow");
	});
	
	$(".error").animate({top: "0px"}, 1000 ).show('fast').fadeIn(200).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100);
	
	$(".error .close").click(function(){
		//$(this).parents(".error").animate({ opacity: "hide" }, "slow");
		$(this).parents(".error").slideUp("slow");
	});
});

$(function() {
	// Use this example, or...
	//$('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel
	// This, or...
	//$('#gallery a').lightBox(); // Select all links in object with gallery ID
	// This, or...
	//$('a.lightbox').lightBox(); // Select all links with lightbox class
	// This, or...
	//$('a').lightBox(); // Select all links in the page
	// ... The possibility are many. Use your creative or choose one in the examples above
});
