// JavaScript Document


$(document).ready( function() {
	$('#content-main').wrap('<div id="content" />');
	$('#content').before('<div id="before-content"></div>');
	$('#content').after('<div id="after-content"></div>');
	
	$('blockquote').prepend('<img src="images/quote.png" />');
});


 $(document).ready( function() {
	 
	 var terms = ["<a href='whatwedo.php#webportals'>websites & applications</a>.", "<a href='whatwedo.php#digitalmarketing'>SEO friendly websites</a>.", "<a href='whatwedo.php#corporateidentity'>memorable logos</a>.", "<a href='whatwedo.php#otherservices'>your site usable</a>.", "<a href='whatwedo.php#webportals'>stunning interfaces</a>."]; //array of terms to rotate

function rotateTerm() {
  var ct = $("#slogan").data("term") || 0;
  $("#slogan").data("term", ct == terms.length -1 ? 0 : ct + 1).html(terms[ct])
              .slideDown().delay(3000).slideUp(300, rotateTerm);
}
$(rotateTerm); //start it on document.ready

		
		});
	

$(document).ready( function() {
$('#slideshowHolder').jqFancyTransitions({ position: 'bottom', strips: 10, stripDelay: 40, width: 371, height: 181, direction: 'left', navigation: 'false', delay: 4000 });
});




$(function () {

var alltabs = $('div.tab');         //selector for all the tabs
var tabs = $('#tabs');              //selector for the tab menu
alltabs.first().show();             //show the first tab
tabs.find('li:first').addClass('on');       //add class 'on' to the first li to set the item to active

tabs.find('a').live('click', function() {
alltabs.hide()
tabs.find('li').removeClass('on')
$(this).parent().toggleClass('on')
var tabref = $(this).attr('rel')
$(tabref).fadeIn(500)
this.blur()
return false;
})

}); //end domready



/****where we are********/

$(document).ready(function(){
 $('.kinfo').hide();
  $('.ninfo').hide();
   $('.founderkpic').hover(
     function(){
		  $('.foundernpic').hide();
       $('.kinfo').slideDown();
	   
     },
     function(){
       $('.kinfo').hide();
	      	    $('.foundernpic').show();
     }
   )
   
     $('.foundernpic').hover(
     function(){
		 	     $('.founderkpic').hide();
       $('.ninfo').slideDown();

     },
     function(){
       $('.ninfo').hide();
	   	    $('.founderkpic').show();
     }
   )
 })



jQuery(document).ready(function() {
		$('.fadebutton, .googlebutton, .diggbutton, .blogbutton, .twitterbutton, .facebookbutton, .get-involved, .directorybutton').append('<span class="hover"></span>').each(function () {
	  		var $span = $('> span.hover', this).css('opacity', 0);
	  		$(this).hover(function () {
	    		$span.stop().fadeTo(650, 1);
	 		}, function () {
	   	$span.stop().fadeTo(1200, 0);
	  		});
		});
	});
	
	
	
	$(document).ready(function() {

	$("ul.team-members li").hover(function() { //On hover...

		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'

		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});

		//Animate the image to 0 opacity (fade it out)
		$(this).find("span").stop().fadeTo('fast', 0 , function() {
			$(this).hide() //Hide the image after fade
		});
	} , function() { //on hover out...
		//Fade the image to full opacity 
		$(this).find("span").stop().fadeTo('fast', 1).show();
	});

});




 $(document).ready( function() {
	 
	 var terms = ["We minimise use of paper at our office.","We always switch off our computers before leaving the office.", "We use energy efficient electrical products."]; //array of terms to rotate

function rotateTerm() {
  var ct = $(".greentip").data("term") || 0;
  $(".greentip").data("term", ct == terms.length -1 ? 0 : ct + 1).html(terms[ct])
              .slideDown().delay(4500).slideUp(170, rotateTerm);
}
$(rotateTerm); //start it on document.ready

		
		});
