home_slide = {
	a:null,
	n:null,
	o:null,
	t:null,
	next:function(){
		home_slide.a = home_slide.o.filter('.active');
		if (home_slide.a.length == 0 ){ home_slide.a = home_slide.o.filter(':last'); }
		home_slide.n =  home_slide.a.next().length ? home_slide.a.next() : home_slide.o.filter(':first');
		home_slide.a.addClass('last-active').animate({opacity:0}, 400, function() {
			home_slide.n.css({opacity: 0.0}).addClass('active').animate({opacity:1}, 400, function() { home_slide.a.removeClass('active last-active'); });
		});
	},
	start:function(){
		var $o = $("#testimonial > ul li");
		home_slide.o = $o;
		//$("#news").hover(function(){ window.clearInterval(home_slide.t); },function(){ home_slide.t = window.setInterval("home_slide.next()", 4000 ); });
		home_slide.t = window.setInterval("home_slide.next()", 4000 );
	}
};




$(function() {
 	$("body").addClass("js")
	
	if($.browser.msie && $.browser.version<7){
		var $pngs = $("img[src^='.png']");
		if($pngs.length>0){ $pngs.ifixpng(); }
	}
 	home_slide.start();
	
 	
	if($("#container").hasClass("contact_us")){
		$("#content > h2").prepend("<div id=\"map_canvas\">&nbsp;</div>");
		var latlng = new google.maps.LatLng(-32.727885, 151.551232);
	    var myOptions = {
	      zoom:16,
	      mapTypeControl: true,
	      mapTypeControlOptions:{style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
	      navigationControl:true,
	      navigationControlOptions:{style:google.maps.NavigationControlStyle.SMALL},
	      center:latlng,
	      mapTypeId:google.maps.MapTypeId.ROADMAP
	    };
	    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
	    var marker = new google.maps.Marker({
	        position: latlng, 
	        map: map, 
	        title:"Traks Group - Industry Recruitment Solutions"
	    });  
	}
 	
	swfobject.embedSWF("images.swf", "banner_img", 815, 170, "9.0.0", null, {max:6,imgDir:encodeURIComponent("images/"),imgName:"slide_",imgSufx:"",imgStart:0,fadeTime:2,fadeDelay:4000,imgNamePad:1},{wmode:"transparent"});
	
	$("#navigation > ul").superfish({delay: 500, speed: 'fast', dropShadows: false });
	
	$("a[title^='New Window: ']").each(function(){
		var newtitle = String($(this).attr('title')).substring(String("New Window: ").length);
		$(this).attr('title',newtitle);
		$(this).click(function(){ var newwin = window.open($(this).attr('href')); newwin.focus(); return false; });
	});
	
 })
