
$(document).ready(function(){

var image1 = $('<img />').attr('src', 'http://www.twopointdesign.com/images/bg-box.png');
var image2 = $('<img />').attr('src', 'http://www.twopointdesign.com/client/theme/TwoPointDesign/images/client-login.gif');

/** ---------------------------------------------------------------------------- Fade In Content */
if($(window).width() > 749) {
	$('#transition').hide().fadeIn(500);
}


/** ---------------------------------------------------------------------------- Scoll to Top & Bottom */
$('a.top').click(function(){
$('html, body').animate({scrollTop:0}, 'slow');
return false;
});
$('a.bottom').click(function(){
$('html, body').animate({scrollTop:$(document).height()}, 'slow');
return false;
});


/** ---------------------------------------------------------------------------- Landing Page Thumbnails */
$(function(){
	$('.index-thumbnails a').hover(function(){
		$(this).children("span").stop(true, true).fadeOut();
	}, function(){
		
		$(this).children("span").fadeIn();
	})		
	$('.index-thumbnails a').click(function(){
		$(this).children("span").fadeIn();
	})
});

/** ---------------------------------------------------------------------------- Landing Page References */
var myQuotes = new Array();
myQuotes[0] = "&ldquo;Ting is very creative and she captures details and translates them into actual designs very well. This has made the entire communication, planning and creative process highly pleasant and satisfying.&rdquo;";
myQuotes[1] = "&ldquo;Although Ting was based in Hong Kong and me in Singapore, her ability to work with cross border clients with her fast and prompt follow ups, made the whole process very easy and seamless.&rdquo;";
myQuotes[2] = "&ldquo;Ting has done an excellent job with coming up with creative designs, meeting strict deadlines, and of course keeping the communication process smooth. It has been a pleasure working with her.&rdquo;";
myQuotes[3] = "&ldquo;Ting was a delight to work with, exhibiting deep knowledge on design matters. I have worked with many designers before and what I experienced with Ting ranks among the very best.&rdquo;";
var myRandom = Math.floor(Math.random()*myQuotes.length);
$('#references').html(myQuotes[myRandom]);


/** ---------------------------------------------------------------------------- Overides Chrome Yellow Form */
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0)
{
    var _interval = window.setInterval(function ()
    {
        var autofills = $('input:-webkit-autofill');
        if (autofills.length > 0)
        {
            window.clearInterval(_interval); // stop polling
            autofills.each(function()
            {
                var clone = $(this).clone(true, true);
                $(this).after(clone).remove();
            });
        }
    }, 10);
}

/** ---------------------------------------------------------------------------- jQuery End Tag */
});

