$(function() {
	
	window.is_touch_device = (/iPhone|iPod|iPad/i).test(navigator.userAgent);
	
	$.easing['easeOutCubic'] = function(p, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	};
	
	$('html').removeClass('no-js');
	
	if( $.support.placeholder == undefined )
	{
		$.support.placeholder = false;
		var test = document.createElement('input');
		if( 'placeholder' in test ) $.support.placeholder = true;
	}
	
	if( !$.support.placeholder )
	{

		$('input[placeholder]:text').val(function() {
			if( $.trim( $( this ).val() ) == '' )
				return $( this ).attr('placeholder');
			else
				return $( this ).val();

		}).click(function() {

			var self = $( this );
			if( self.val() == self.attr('placeholder') ) self.val('');

		}).blur(function() {

			var self = $( this );
			if( self.val() == '') self.val( self.attr('placeholder') );

		});
	}
	if( /Chrome|Safari/.test( navigator.userAgent ) )
	{
		$('#searchbox').css('top', 7);	
	}
	if( window.is_touch_device )
	{
		setTimeout(function(){
			window.scrollTo(0, 1);
		}, 1000);
	}
	
	
});
