function nameempty()
{ 
    if ( document.form.name.value == '' )
    {
        alert('No name was entered!')
        return false;
    }
	if ( document.form.email.value == '' )
    {
        alert('No email was entered!')
        return false;
    }
	if ( document.form.message.value == '' )
    {
        alert('No message was entered!')
        return false;
    }
}
        
        $(document).ready(function(){ 
        $(document).pngFix(); 
        }); 


$(document).ready(function() {

	//Custom settings
	var style_in = 'easeOutBounce';
	var style_out = 'jswing';
	var speed_in = 1000;
	var speed_out = 300;	

	//Calculation for corners
	var neg = Math.round($('.qitem').width() / 2) * (-1);	
	var pos = neg * (-1);	
	var out = pos * 2;
	
	$('.qitem').each(function () {
	
		url = $(this).find('a').attr('href');
		img = $(this).find('img').attr('src');
		alt = $(this).find('img').attr('img');
		
		$('img', this).remove();
		$(this).append('<div class="topLeft"></div><div class="topRight"></div><div class="bottomLeft"></div><div class="bottomRight"></div>');
		$(this).children('div').css('background-image','url('+ img + ')');

		$(this).find('div.topLeft').css({top:0, left:0, width:pos , height:pos});	
		$(this).find('div.topRight').css({top:0, left:pos, width:pos , height:pos});	
		$(this).find('div.bottomLeft').css({bottom:0, left:0, width:pos , height:pos});	
		$(this).find('div.bottomRight').css({bottom:0, left:pos, width:pos , height:pos});	

	}).hover(function () {
	
		$(this).find('div.topLeft').stop(false, true).animate({top:neg, left:neg}, {duration:speed_out, easing:style_out});	
		$(this).find('div.topRight').stop(false, true).animate({top:neg, left:out}, {duration:speed_out, easing:style_out});	
		$(this).find('div.bottomLeft').stop(false, true).animate({bottom:neg, left:neg}, {duration:speed_out, easing:style_out});	
		$(this).find('div.bottomRight').stop(false, true).animate({bottom:neg, left:out}, {duration:speed_out, easing:style_out});	
				
	},
	
	function () {

		$(this).find('div.topLeft').stop(false, true).animate({top:0, left:0}, {duration:speed_in, easing:style_in});	
		$(this).find('div.topRight').stop(false, true).animate({top:0, left:pos}, {duration:speed_in, easing:style_in});	
		$(this).find('div.bottomLeft').stop(false, true).animate({bottom:0, left:0}, {duration:speed_in, easing:style_in});	
		$(this).find('div.bottomRight').stop(false, true).animate({bottom:0, left:pos}, {duration:speed_in, easing:style_in});	
	
	}).click (function () {
		window.location = $(this).find('a').attr('href');	
	});
	

});

$(document).ready(function(){
    $("input, textarea").addClass("idle");
        $("input, textarea").focus(function(){
            $(this).addClass("activeField").removeClass("idle");
    }).blur(function(){
            $(this).removeClass("activeField").addClass("idle");
    });
});

function showmail(){
$("#blopper").slideUp(500);
}
function hidemail(){
$("#topster").slideUp(500);
}
		// In case you don't have firebug...
		if (!window.console || !console.firebug) {
			var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
			window.console = {};
			for (var i = 0; i < names.length; ++i) window.console[names[i]] = function() {};
		}

		(function($){

			$(document).ready(function(){

				// This value can be true, false or a function to be used as a callback when the closer is clciked
				$.jGrowl.defaults.closer = function() {
					console.log("Closing everything!", this);
				};
				
				// A callback for logging notifications.
				$.jGrowl.defaults.log = function(e,m,o) {
					$('#logs').append("<div><strong>#" + $(e).attr('id') + "</strong> <em>" + (new Date()).getTime() + "</em>: " + m + " (" + o.theme + ")</div>")
				}				
				
				
				$.jGrowl("Welcome to my website its in beta mode right now so please report any bugs thanks..<br />Version: 0.1 ..<hr />This site does not work in i.e6 100% but what does!", { 
						 header: 'Hello,', 
						 sticky: true, 
						 glue: 'before',
						 closer: false,
					speed: 2000,
					easing: 'easeInOutExpo',
					animateOpen: { 
						height: "show",
						width: "show"
					},
					animateClose: { 
						height: "hide",
						width: "show"
					},
					beforeOpen: function(e,m,o) {
						console.log("I am going to be opened!", this);
					},
					open: function(e,m,o) {
						console.log("I have been opened!", this);
					},
					beforeClose: function(e,m,o) {
						console.log("I am going to be closed!", this);
					},
					close: function(e,m,o) {
						console.log("I have been closed!", this);
						topboxer();
					}
						 
						 });
				/*$.jGrowl("Custom theme, and a whole bunch of callbacks...<div class=''></div>", { 
					header: 'A Header',
					sticky: true,
					theme:  'manilla',
					speed:  'slow',
					beforeOpen: function(e,m,o) {
						console.log("I am going to be opened!", this);
					},
					open: function(e,m,o) {
						console.log("I have been opened!", this);
					},
					beforeClose: function(e,m,o) {
						console.log("I am going to be closed!", this);
					},
					close: function(e,m,o) {
						console.log("I have been closed!", this);
					}
				}); */
				
				$.jGrowl.defaults.closerTemplate = '<div>hide all notifications</div>';
				
				
			
			});
		
		
		$.jTweet = function( username , total ) {
				$.getJSON("http://twitter.com/status/user_timeline/" + username + ".json?count=" + total + "&callback=?", function(response) { 
					$.each(response, function(i, tweet) {
						$.jGrowl( (tweet.text.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+/, function(m) {
							return m.link(m);
						})) + ' [' + tweet.source + ']' , { header: tweet.created_at , sticky: true } );
					});
				});
			};
		})(jQuery);

		//	Setup a twitter interface with jGrowl
		function tweetme(){
		$(document).ready(function() {
			$.jTweet('swipedstudio', 5);
		});
		}
		
		function topboxer(){
		$.jGrowl("Welcome to my website its in beta mode right now so please report any bugs thanks..<br />Version: 0.1 ..<hr />This site does not work 100% in i.e6 but what does!", { 
					header: 'A Header', 
					sticky: true, 
					glue: 'before',
					closer: false,
					speed: 2000,
					easing: 'easeInOutExpo',
					animateOpen: { 
						height: "show",
						width: "show"
					},
					animateClose: { 
						height: "hide",
						width: "show"
					}
						 
						 });	
		}