function slideSwitch() {
	var $active = $('.partnerBox div.active');
	var $activeWork = $('.partnerBox div.active');

    if ( $active.length == 0 ) $active = $('.partnerBox div:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('.partnerBox div:first');


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}


function slideSwitch1() {
	var $active = $('.workSampleTop div.active');
	var $activeWork = $('.workSampleTop div.active');

    if ( $active.length == 0 ) $active = $('.workSampleTop div:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('.workSampleTop div:first');


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}



function ourWorkRight() {
	var $active = $('.rightModule .ourWork img.active');

    if ( $active.length == 0 ) $active = $('.rightModule .ourWork img:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('.rightModule .ourWork img:first');

     var $sibs  = $active.siblings();
     var rndNum = Math.floor(Math.random() * $sibs.length );
     var $next  = $( $sibs[ rndNum ] );



    $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 );
	setInterval( "slideSwitch1()", 5000 );
	setInterval( "ourWorkRight()", 3000 );
	
	$('input[placeholder], textarea[placeholder]').placeholder();
	 
	$("#enqBoxForm").validate({
		  rules: {
			phone: {
			  required: false,
			  number: true
			}
		  }
		});
	
	
});



