$(document).ready(function(){

	$('a.admintheme_th').click(function (e) {		
		$('#admintheme_details').modal({opacity:100,overlayClose: 'true', onOpen: function (dialog) {
					dialog.overlay.fadeIn('slow', function () {dialog.data.hide();dialog.container.fadeIn('slow', function () {dialog.data.slideDown('slow');});});}});});
	$('a.purecorpwp_th').click(function (e) {		
			$('#purecorpwp_details').modal({opacity:100,overlayClose: 'true', onOpen: function (dialog) {
						dialog.overlay.fadeIn('slow', function () {dialog.data.hide();dialog.container.fadeIn('slow', function () {dialog.data.slideDown('slow');});});}});});							
	$('a.example_th').click(function (e) {		
			$('#example_details').modal({opacity:100,overlayClose: 'true', onOpen: function (dialog) {
						dialog.overlay.fadeIn('slow', function () {dialog.data.hide();dialog.container.fadeIn('slow', function () {dialog.data.slideDown('slow');});});}});});							
							
													
	$(".pf_img").hover(function() { //On hover...
		var thumbOver = $(this).find("img").attr("src");
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});
		$(this).find("span").stop().animate({opacity: 0}, 300);
	} , function() { 
		$(this).find("span").stop().animate({opacity: 1}, 300);
	});


	$('#social a').each(function () {
	    $('<div class="fader" />').css('opacity', 0).prependTo(this);
	  }).hover(function () {
	    $('img', this).stop().animate({
		marginLeft : 5
	    }, 250);
	    $('.fader', this).stop().animate({
	      opacity : 0.15
	    });
	  }, function () {
	    $('img', this).stop().animate({
	      marginLeft : 10
	    }, 250);
	    
	    $('.fader', this).stop().animate({
	      opacity : 0
	    });
	  }).find('img').css('marginLeft', 10);
	  
  	$('#about a').each(function () {
	    $('<div class="fader" />').css('opacity', 0).prependTo(this);
	  }).hover(function () {
	    $('img', this).stop().animate({
	      marginLeft : 5
	    }, 250);
	    $('.fader', this).stop().animate({
	      opacity : 0.15
	    });
	  }, function () {
	    $('img', this).stop().animate({
	      marginLeft : 10
	    }, 250);
	    
	    $('.fader', this).stop().animate({
	      opacity : 0
	    });
	  }).find('img').css('marginLeft', 10);
	});

Cufon.replace('#hello', {textShadow: '#fff 1px 1px'});
Cufon.replace('#textaboutme h4', {textShadow: '#fff 1px 1px'});
Cufon.replace('#social p', {textShadow: '#fff 1px 1px'});
Cufon.replace('.pf_desc h3', {textShadow: '#fff 1px 1px'});
Cufon.replace('.pf_desc p', {textShadow: '#fff 1px 1px'});
Cufon.replace('h2', {textShadow: '#fff 1px 1px',color: '-linear-gradient( #000, #696969)'});
Cufon.replace('#menu li', {textShadow: '#fff 1px 1px',hover: {color: '#e63232'}});
Cufon.replace('#contact legend', {textShadow: '#fff 1px 1px'});

