/* Author: Sinyaya Dynya

*/


/**
 * Cufon fonts definitions
 */

Cufon.replace('nav li', { fontFamily: 'League Gothic', hover: true });
Cufon.replace('h3, .submit', { fontFamily: 'Rockwell MT', hover: true });


/**
 * TipTip
 */
 
$(function(){
	$(".tip").tipTip();
});


/**
 * Work viewport effect
 */

$(document).ready(function() {
    $('.viewport').mouseenter(function(e) {
        $(this).children('a').children('img').animate({ height: '200', left: '0', top: '0', width: '290'}, 100);
        $(this).children('a').children('span').fadeIn(200);
    }).mouseleave(function(e) {
        $(this).children('a').children('img').animate({ height: '228', left: '-20', top: '0', width: '330'}, 100);
        $(this).children('a').children('span').fadeOut(200);
    });
});


/**
 * Adobe Helium: symbol definitions
 */
window.symbols = {
"stage": {
   version: "0.1.2",
   baseState: "Base State",
   initialState: "Base State",
   parameters: {

   },
   content: {
      dom: [
        {
            id:'Pack-Back',
            className:'Pack-Back_id',
            type:'image',
            tag:'div',
            rect:[0,0,293,125],
            fill:['rgba(0,0,0,0)','img/pack%2Dback.png']
        },
        {
            id:'Starter-Icon',
            className:'Starter-Icon_id',
            type:'image',
            tag:'div',
            rect:[0,0,89,100],
            fill:['rgba(0,0,0,0)','img/icon%2Dstarter.svg']
        },
        {
            id:'Starter-Text',
            className:'Starter-Text_id',
            type:'image',
            tag:'div',
            rect:[0,0,179,96],
            fill:['rgba(0,0,0,0)','img/txt%2Dstarter1.svg']
        },
        {
            id:'Business-Icon',
            className:'Business-Icon_id',
            type:'image',
            tag:'div',
            rect:[0,0,100,82],
            fill:['rgba(0,0,0,0)','img/icon%2Dbusiness.svg']
        },
        {
            id:'Business-Text',
            className:'Business-Text_id',
            type:'image',
            tag:'div',
            rect:[0,0,179,96],
            fill:['rgba(0,0,0,0)','img/txt%2Dbusiness1.svg']
        },
        {
            id:'Snack-Icon',
            className:'Snack-Icon_id',
            type:'image',
            tag:'div',
            rect:[0,0,76,100],
            fill:['rgba(0,0,0,0)','img/icon%2Dsnack.svg']
        },
        {
            id:'Snack-Text',
            className:'Snack-Text_id',
            type:'image',
            tag:'div',
            rect:[0,0,179,96],
            fill:['rgba(0,0,0,0)','img/txt%2Dsnack.svg']
        },
        {
            id:'eStore-Icon',
            className:'eStore-Icon_id',
            type:'image',
            tag:'div',
            rect:[0,0,100,64],
            fill:['rgba(0,0,0,0)','img/icon%2Destore.svg']
        },
        {
            id:'eStore-Text',
            className:'eStore-Text_id',
            type:'image',
            tag:'div',
            rect:[0,0,179,96],
            fill:['rgba(0,0,0,0)','img/txt%2Destore.svg']
        },
        {
            id:'Pack-Front',
            className:'Pack-Front_id',
            type:'image',
            tag:'div',
            rect:[0,0,303,232],
            fill:['rgba(0,0,0,0)','img/pack%2Dfront.png']
        }      ],
      symbolInstances: [
      ],
   },
   states: {
      "Base State": {
         "#stage": [
            ["style", "height", '400px'],
            ["color", "background-color", 'transparent'],
            ["style", "width", '550px']
         ],
         "#Business-Icon": [
            ["style", "opacity", '1'],
            ["transform", "translateY", '224px'],
            ["transform", "translateX", '218px']
         ],
         "#Snack-Text": [
            ["transform", "translateX", '184px'],
            ["transform", "scaleX", '1'],
            ["style", "opacity", '1'],
            ["transform", "translateY", '204px'],
            ["transform", "scaleY", '1']
         ],
         "#Starter-Text": [
            ["transform", "translateX", '178px'],
            ["transform", "scaleX", '1'],
            ["style", "opacity", '1'],
            ["transform", "translateY", '226px'],
            ["transform", "scaleY", '1']
         ],
         "#Pack-Back": [
            ["transform", "translateX", '120px'],
            ["transform", "translateY", '94px']
         ],
         "#eStore-Icon": [
            ["style", "opacity", '1'],
            ["transform", "translateY", '224px'],
            ["transform", "translateX", '220px']
         ],
         "#Business-Text": [
            ["transform", "scaleY", '1'],
            ["transform", "translateX", '183px'],
            ["transform", "scaleX", '1'],
            ["style", "height", '111.5530726257px'],
            ["style", "opacity", '1'],
            ["transform", "translateY", '208px'],
            ["style", "width", '208px']
         ],
         "#eStore-Text": [
            ["transform", "translateX", '182px'],
            ["transform", "scaleX", '1'],
            ["style", "opacity", '1'],
            ["transform", "translateY", '203px'],
            ["transform", "scaleY", '1']
         ],
         "#Starter-Icon": [
            ["transform", "translateX", '222px'],
            ["transform", "scaleX", '0.9'],
            ["style", "opacity", '1'],
            ["transform", "translateY", '227px'],
            ["transform", "scaleY", '0.9']
         ],
         "#Pack-Front": [
            ["transform", "translateX", '117px'],
            ["transform", "translateY", '167px']
         ],
         "#Snack-Icon": [
            ["transform", "translateX", '231px'],
            ["style", "opacity", '1'],
            ["transform", "translateY", '231px'],
            ["transform", "rotateZ", '-45deg']
         ],
         "#Text1": [
            ["style", "font-family", '']
         ]
      }
   },
   actions: {

   },
   bindings: [

   ],
   timelines: {
      "Default Timeline": {
         fromState: "Base State",
         toState: "",
         duration: 15250,
         timeline: [
            { id: "eid59", tween: [ "transform", "#Business-Icon", "translateX", '218px', { valueTemplate: undefined, fromValue: '218px'}], position: 3500, duration: 0, easing: "linear" },
            { id: "eid69", tween: [ "transform", "#Business-Icon", "translateX", '90px', { valueTemplate: undefined, fromValue: '218px'}], position: 5000, duration: 1000, easing: "linear" },
            { id: "eid145", tween: [ "transform", "#Business-Icon", "translateX", '162px', { valueTemplate: undefined, fromValue: '90px'}], position: 7250, duration: 7000, easing: "linear" },
            { id: "eid75", tween: [ "transform", "#Business-Text", "translateY", '-2px', { valueTemplate: undefined, fromValue: '208px'}], position: 5000, duration: 1000, easing: "linear" },
            { id: "eid101", tween: [ "transform", "#Snack-Icon", "translateY", '11px', { valueTemplate: undefined, fromValue: '231px'}], position: 7000, duration: 1500, easing: "linear" },
            { id: "eid99", tween: [ "transform", "#Snack-Icon", "translateX", '231px', { valueTemplate: undefined, fromValue: '231px'}], position: 7000, duration: 0, easing: "linear" },
            { id: "eid103", tween: [ "transform", "#Snack-Icon", "translateX", '100px', { valueTemplate: undefined, fromValue: '231px'}], position: 8500, duration: 1000, easing: "linear" },
            { id: "eid150", tween: [ "transform", "#Snack-Icon", "translateX", '292px', { valueTemplate: undefined, fromValue: '100px'}], position: 10750, duration: 3500, easing: "linear" },
            { id: "eid41", tween: [ "transform", "#Starter-Text", "translateY", '-2px', { valueTemplate: undefined, fromValue: '226px'}], position: 1500, duration: 1000, easing: "linear" },
            { id: "eid127", tween: [ "transform", "#eStore-Text", "translateY", '-2px', { valueTemplate: undefined, fromValue: '203px'}], position: 12000, duration: 1000, easing: "linear" },
            { id: "eid112", tween: [ "transform", "#Snack-Text", "scaleY", '1.2', { valueTemplate: undefined, fromValue: '1'}], position: 9500, duration: 250, easing: "linear" },
            { id: "eid34", tween: [ "style", "#Text1", "font-family", '', { valueTemplate: undefined, fromValue: ''}], position: 2000, duration: 0, easing: "linear" },
            { id: "eid78", tween: [ "style", "#Business-Text", "height", '111.5530726257px', { valueTemplate: undefined, fromValue: '111.5530726257px'}], position: 6250, duration: 0, easing: "linear" },
            { id: "eid86", tween: [ "transform", "#Business-Text", "scaleY", '1.2', { valueTemplate: undefined, fromValue: '1'}], position: 6000, duration: 250, easing: "linear" },
            { id: "eid77", tween: [ "transform", "#Starter-Text", "scaleY", '1.2', { valueTemplate: undefined, fromValue: '1'}], position: 2500, duration: 250, easing: "linear" },
            { id: "eid58", tween: [ "style", "#Starter-Icon", "opacity", '0', { valueTemplate: undefined, fromValue: '1'}], position: 3500, duration: 250, easing: "linear" },
            { id: "eid165", tween: [ "style", "#Starter-Icon", "opacity", '1', { valueTemplate: undefined, fromValue: '0'}], position: 14250, duration: 250, easing: "linear" },
            { id: "eid164", tween: [ "style", "#Starter-Icon", "opacity", '1', { valueTemplate: undefined, fromValue: '1'}], position: 14500, duration: 750, easing: "linear" },
            { id: "eid131", tween: [ "transform", "#eStore-Text", "scaleX", '1.2', { valueTemplate: undefined, fromValue: '1'}], position: 13000, duration: 250, easing: "linear" },
            { id: "eid67", tween: [ "transform", "#Business-Icon", "translateY", '3px', { valueTemplate: undefined, fromValue: '224px'}], position: 3500, duration: 1500, easing: "linear" },
            { id: "eid1", tween: [ "color", "#stage", "background-color", 'transparent', { animationColorSpace: 'RGB', valueTemplate: undefined, fromValue: 'transparent'}], position: 0, duration: 0, easing: "linear" },
            { id: "eid9", tween: [ "transform", "#Pack-Front", "translateX", '117px', { valueTemplate: undefined, fromValue: '117px'}], position: 0, duration: 0, easing: "linear" },
            { id: "eid30", tween: [ "transform", "#Starter-Icon", "translateX", '222px', { valueTemplate: undefined, fromValue: '222px'}], position: 0, duration: 0, easing: "linear" },
            { id: "eid33", tween: [ "transform", "#Starter-Icon", "translateX", '90px', { valueTemplate: undefined, fromValue: '222px'}], position: 1500, duration: 1000, easing: "linear" },
            { id: "eid156", tween: [ "transform", "#Starter-Icon", "translateX", '62px', { valueTemplate: undefined, fromValue: '90px'}], position: 14000, duration: 250, easing: "linear" },
            { id: "eid119", tween: [ "transform", "#eStore-Icon", "translateX", '220px', { valueTemplate: undefined, fromValue: '220px'}], position: 10500, duration: 0, easing: "linear" },
            { id: "eid126", tween: [ "transform", "#eStore-Icon", "translateX", '80px', { valueTemplate: undefined, fromValue: '220px'}], position: 12000, duration: 1000, easing: "linear" },
            { id: "eid161", tween: [ "transform", "#eStore-Icon", "translateX", '370px', { valueTemplate: undefined, fromValue: '80px'}], position: 14250, duration: 250, easing: "linear" },
            { id: "eid55", tween: [ "style", "#Starter-Text", "opacity", '0', { valueTemplate: undefined, fromValue: '1'}], position: 3500, duration: 250, easing: "linear" },
            { id: "eid73", tween: [ "transform", "#Business-Text", "translateX", '183px', { valueTemplate: undefined, fromValue: '183px'}], position: 5000, duration: 0, easing: "linear" },
            { id: "eid82", tween: [ "transform", "#Business-Text", "translateX", '203px', { valueTemplate: undefined, fromValue: '183px'}], position: 6000, duration: 250, easing: "linear" },
            { id: "eid76", tween: [ "transform", "#Starter-Text", "scaleX", '1.2', { valueTemplate: undefined, fromValue: '1'}], position: 2500, duration: 250, easing: "linear" },
            { id: "eid11", tween: [ "transform", "#Pack-Back", "translateX", '120px', { valueTemplate: undefined, fromValue: '120px'}], position: 0, duration: 0, easing: "linear" },
            { id: "eid133", tween: [ "transform", "#eStore-Text", "scaleY", '1.2', { valueTemplate: undefined, fromValue: '1'}], position: 13000, duration: 250, easing: "linear" },
            { id: "eid121", tween: [ "transform", "#eStore-Icon", "translateY", '13px', { valueTemplate: undefined, fromValue: '224px'}], position: 10500, duration: 1500, easing: "linear" },
            { id: "eid118", tween: [ "style", "#Snack-Icon", "opacity", '0', { valueTemplate: undefined, fromValue: '1'}], position: 10500, duration: 250, easing: "linear" },
            { id: "eid169", tween: [ "style", "#Snack-Icon", "opacity", '1', { valueTemplate: undefined, fromValue: '0'}], position: 14750, duration: 250, easing: "linear" },
            { id: "eid106", tween: [ "transform", "#Snack-Text", "translateY", '-2px', { valueTemplate: undefined, fromValue: '204px'}], position: 8500, duration: 1000, easing: "linear" },
            { id: "eid135", tween: [ "transform", "#Starter-Icon", "scaleY", '0.9', { valueTemplate: undefined, fromValue: '0.9'}], position: 0, duration: 0, easing: "linear" },
            { id: "eid115", tween: [ "style", "#Snack-Text", "opacity", '0', { valueTemplate: undefined, fromValue: '1'}], position: 10500, duration: 250, easing: "linear" },
            { id: "eid110", tween: [ "transform", "#Snack-Text", "scaleX", '1.2', { valueTemplate: undefined, fromValue: '1'}], position: 9500, duration: 250, easing: "linear" },
            { id: "eid79", tween: [ "style", "#Business-Text", "width", '208px', { valueTemplate: undefined, fromValue: '208px'}], position: 6250, duration: 0, easing: "linear" },
            { id: "eid104", tween: [ "transform", "#Snack-Text", "translateX", '184px', { valueTemplate: undefined, fromValue: '184px'}], position: 8500, duration: 0, easing: "linear" },
            { id: "eid141", tween: [ "style", "#eStore-Icon", "opacity", '0', { valueTemplate: undefined, fromValue: '1'}], position: 14000, duration: 250, easing: "linear" },
            { id: "eid158", tween: [ "style", "#eStore-Icon", "opacity", '0', { valueTemplate: undefined, fromValue: '0'}], position: 14500, duration: 500, easing: "linear" },
            { id: "eid171", tween: [ "style", "#eStore-Icon", "opacity", '1', { valueTemplate: undefined, fromValue: '0'}], position: 15000, duration: 250, easing: "linear" },
            { id: "eid134", tween: [ "transform", "#Starter-Icon", "scaleX", '0.9', { valueTemplate: undefined, fromValue: '0.9'}], position: 0, duration: 0, easing: "linear" },
            { id: "eid84", tween: [ "transform", "#Business-Text", "scaleX", '1.2', { valueTemplate: undefined, fromValue: '1'}], position: 6000, duration: 250, easing: "linear" },
            { id: "eid122", tween: [ "transform", "#eStore-Text", "translateX", '182px', { valueTemplate: undefined, fromValue: '182px'}], position: 12000, duration: 0, easing: "linear" },
            { id: "eid39", tween: [ "transform", "#Starter-Text", "translateX", '178px', { valueTemplate: undefined, fromValue: '178px'}], position: 2000, duration: 0, easing: "linear" },
            { id: "eid92", tween: [ "style", "#Business-Icon", "opacity", '0', { valueTemplate: undefined, fromValue: '1'}], position: 7000, duration: 250, easing: "linear" },
            { id: "eid167", tween: [ "style", "#Business-Icon", "opacity", '1', { valueTemplate: undefined, fromValue: '0'}], position: 14500, duration: 250, easing: "linear" },
            { id: "eid32", tween: [ "transform", "#Starter-Icon", "translateY", '-5px', { valueTemplate: undefined, fromValue: '227px'}], position: 0, duration: 1500, easing: "linear" },
            { id: "eid98", tween: [ "transform", "#Snack-Icon", "rotateZ", '-45deg', { valueTemplate: undefined, fromValue: '-45deg'}], position: 7000, duration: 0, easing: "linear" },
            { id: "eid24", tween: [ "transform", "#Pack-Back", "translateY", '94px', { valueTemplate: undefined, fromValue: '94px'}], position: 0, duration: 0, easing: "linear" },
            { id: "eid25", tween: [ "transform", "#Pack-Front", "translateY", '167px', { valueTemplate: undefined, fromValue: '167px'}], position: 0, duration: 0, easing: "linear" },
            { id: "eid138", tween: [ "style", "#eStore-Text", "opacity", '0', { valueTemplate: undefined, fromValue: '1'}], position: 14000, duration: 250, easing: "linear" },
            { id: "eid89", tween: [ "style", "#Business-Text", "opacity", '0', { valueTemplate: undefined, fromValue: '1'}], position: 7000, duration: 250, easing: "linear" }]
      }
   }
}};

/**
 * Adobe Edge DOM Ready Event Handler
 */
$(window).ready(function() {
     $.Edge.initialize(symbols);
});
/**
 * Adobe Edge Timeline Launch
 */
$.Edge.ready(function() {
    $.Edge.play();
});


/**
 * Services Click Timeline Launch
 */
$('a#launchservices').click(function () {
    $.Edge.play();
});


/**
 * Tumblr RSS Blog
 */


$(function(){
    $("#myUserPosts").tumblrRss({username: "sinyayadynya", limit: 1, offset: 2});
});

$(function(){
    $("#myUserPosts2").tumblrRss({username: "sinyayadynya", limit: 1, offset: 3});
});
$(function(){
    $("#myUserPosts3").tumblrRss({username: "sinyayadynya", limit: 1, offset: 4});
});


/**
 * Latest Tweets
 */


$(document).ready(function() {
	$("#twitter").getTwitter({
		userName: "sinyayadynya",
		numTweets: 3,
		loaderText: "Loading tweets...",
		slideIn: true,
		slideDuration: 750,
		showHeading: true,
		headingText: "from @sinyayadynya",
		showProfileLink: false,
		showTimestamp: true
	});
});



