/*
*	Oconics jQuery scripts
*
*   Commenced 9 Dec 2009
*	
*	Copyright 2009 Oconics Pty Ltd
*
*   Author: Thomas Bland for Enabled Solutions www.enabled.com.au
*/


/* ============ HOMEPAGE IMAGE CYCLER ============ */

$(function(){
	$('div.cycle-container').cycle(); // for options see http://malsup.com/jquery/cycle/lite/
});

/* ============ IMAGES WITH OVERLAYS ============ */

// These scripts allow for dynamic text in the grey boxes overlaying images

// Homepage

$(function(){
	var overlayOffset = 370 - ($('div#hero div.overlay').height() + 40);  // gets the height of overlay box (plus 40px for padding)
	$('div#hero div.overlay').css('top',overlayOffset); // applies it as top offset
});

// Content page

$(function(){
	var overlayMargin = - ($('div.item-image div.overlay').height() + 58);  // gets the negative of height of overlay box (plus 40px for padding)
	$('div.item-image div.overlay').css('marginTop' , overlayMargin); // applies it as a negative margin
});

