	$(document).ready(function() {
		    jQuery('#slideshow').fadeSlideShow({
        width: 980,
        height: 450
    });				
  });

/* Script for Media Page Video*/
function callplayer(playurl)
{ 	
	var win_h = $(window).height();
	var win_w = $(window).width();
	$("#player").css('visibility','visible');
	//$("#overlay").css('visibility','visible');
	$('#modal_overlay').css('display','block');
		
		
	$f("player", {src:"http://releases.flowplayer.org/swf/flowplayer-3.2.6.swf", wmode:'transparent'}, {
		  clip: {
			// our song
			url: playurl,   	
			coverImage: 'http://chilloncomau.corewebdna.net.au/template_images/subpage-banner.jpg'				
		  },
		plugins:  {		
			controls: {
				backgroundColor:'#00BDF2',
				height: 30,
				fullscreen: false,
				autoHide: false			
			}
			
		}		
	  }).onLoad(function(){
							$('#player').append('<span id="close"></span>');
							$('#close').click(function(){
								$("#player").css('visibility','hidden').html('loading');
								//$("#overlay").css('visibility','hidden');
								$('#modal_overlay').css('display','none');
								$f('player').close();
							});
							
							
							
						});
	  
	  //$('#overlay').show().css({'background':'#000', 'opacity':'.7'}).width(win_w).height(win_h);	  
		  
		  
}

function checkQuantity(form){	
		var q = $(form).find("input[name='cart_quantity']").val();
		if(q=="" || q=="Enter quantity"){
			alert("Please enter a valid Quantity");
			return false;
		}
		
		return true;
	
}

function termscheck() {
	//if ($('#terms').attr('checked')==true) {
	if (document.getElementById("terms").checked==true) {
		return true;
	}
	else {
		alert ("Please agree to the terms and conditions");
		return false;
	}
};

$(document).ready(function(){
	$(".images p img").each(function(){
		var container = $(this).parent();		
		$(container).css('position', 'relative').css('height','140px').css('overflow','hidden');
		$(container).append("<span class='icon_overlay'></span>");		
	});
});

