$(document).ready(function(){
$(".album:last").addClass("last");
//$(".galList li:odd").addClass("odd");
$('.footerIcons img').animate({ 
opacity: 0.3
}, 5 );			   
$(".footerIcons img").hover(
function () {
$(this).animate({ 
opacity: 1
}, 200 );
}, 
function () {
$(this).animate({ 
opacity: 0.3
}, 200 );
}
);
});

function slideSwitch() {
var $active = $('#slideshow IMG.active');
if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
var $next =  $active.next().length ? $active.next()
: $('#slideshow IMG:first');
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
});
}
$(function() {
setInterval( "slideSwitch()", 5000 );
});


function d(id){

return document.getElementById(id);
}

function IsNumeric(strString) //  check for valid numeric strings	
    {
    	if(!/\D/.test(strString)) return false;//IF NUMBER
    	else return true;
    }


function validateform()
	{
	if(d('name').value=="")
		{
		alert("Please Fill Up Name")
		d('name').focus();
		return false;
		}
	if(d('email').value=="")
		{
		alert("Please Fill Up Email");
		d('email').focus();
		return false;
		}
	else if(!isEmail(d('email').value))
		{
		alert("Please Enter Valid Email");
		d('email').focus();
		return false; 
		}
	if(d('message').value=="")
		{
		alert("Please Fill Up Message")
		d('message').focus();
		return false;
		}

	}
function isEmail(str) {
    
    var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
    if (!str.match(re)) {
        return false;
    } else {
        return true;
    }
}

   /* $(function() {
        $('.galList a').lightBox();
    });
*/
$(function() {
	// Select all links whose attribute rel starts with lightbox
	$('a[rel^=lightbox]').lightBox();
});
