/*  
Plugin Options
*/


/*** jQuery Cycle Plugin Options ***/

$(document).ready(function() {
	$('.slideshow div:first').fadeIn(1000, function() {
    $('.slideshow').cycle({
                pause:	true,
                speed:	1000,  
		fastOnEvent:	500,
		timeout: 	6000,
   		next:   '#nextSlide', 
    		prev:   '#prevSlide', 
		fx: 'scrollHorz' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
  });
});

/*** Colorbox options ***/
		$(document).ready(function(){
			//Examples of how to assign the ColorBox event to elements
			$("a[rel='openColorbox']").colorbox();
		});
			

/*** Add the current year to copyright ***/

$(document).ready(function() {
if ($('span#currentYear').length) {
var theDate = new Date();
var myDate = theDate.getFullYear();
$('span#currentYear').replaceWith('<span id="currentYear"> ' + myDate + '  </span>');
}
});

/*** write email address ***/
$(document).ready(function() {
if ($('span.emailAddress').length) {
var name1 = "des";
var name2 = "ign";
var name3 = '@sk';
var name4 = "matic";
var name5 = '.com';
$('span.emailAddress').replaceWith('<span class="emailAddress"><a href="mailto:'+ name1 + name2 + name3 + name4 + name5 +'" onclick="_gaq.push([\'_trackEvent\', \'MailTo_Design_Link\', \'clicked\'])">'+ name1 + name2 + name3 + name4 + name5 +'</a></span>');
}
});

/*** Add autofocus to username input on resume for browsers that don't recognize the autofocus attribute in html5 ***/
$(document).ready(function() {
if ($('input#username').length) {
	if (!("autofocus" in document.createElement("input"))) {
		$("#username").focus();
	}
}
});

/*** Print my resume ***/

$(document).ready(function(){
	$("#printLink").click(function()
	{
	var content = $("#resume-container").html();
	var pwin = window.open("","print_content","scrollbars=yes,menubar=yes");

	pwin.document.open();
 	pwin.document.write('<html><head><link rel=\"stylesheet\" href=\".\/css\/fonts.css\"><link rel=\"stylesheet\" href=\".\/css\/print.css\"><\/head><body onload=\"window.print()\"><div id=\"resume-container\"><img src="../img/resume-cube.png" id="cubeImage" />'+content+'<\/div><\/body><\/html>');
	pwin.document.close();
					 
	setTimeout(function(){pwin.close();},30000);
	});
});














