$(document).ready(function() {
$('#container').ascensor({
AscensorName: 'wrapper',
WindowsFocus: true,
WindowsOn: 0,
NavigationDirection: 'xy',
Direction: 'y',
Navig: true,
Link: false,
ReturnURL: true,
PrevNext: false,
CSSstyles: true,
KeyArrow: true,
keySwitch: true,
ReturnCode: false,
ChocolateAscensor: true,
AscensorMap: '3|1',
ContentCoord: '1|1 & 1|2 & 1|3'
});
});
$(document).ready(function() {
var theInt = null;
var $crosslink, $navthumb;
var curclicked = 0;
theInterval = function(cur) {
clearInterval(theInt);
if (typeof cur != 'undefined') curclicked = cur;
$crosslink.removeClass("active-thumb");
$navthumb.eq(curclicked).parent().addClass("active-thumb");
$(".stripNav ul li a").eq(curclicked).trigger('click');
theInt = setInterval(function() {
$crosslink.removeClass("active-thumb");
$navthumb.eq(curclicked).parent().addClass("active-thumb");
$(".stripNav ul li a").eq(curclicked).trigger('click');
curclicked++;
if (6 == curclicked) curclicked = 0;
}, 3000);
};
$(function() {
//Rzuca error, skip
//$("#main-photo-slider").codaSlider();
$navthumb = $(".nav-thumb");
$crosslink = $(".cross-link");
$navthumb.click(function() {
var $this = $(this);
theInterval($this.parent().attr('href').slice(1) - 1);
return false;
});
theInterval();
});
});
var meh = (function() {
return {
vcenter: function() {
var t = ($(window).height() - $('.about_me').height()) / 2;
if (t < 0) t = 0;
$('.about_me').css({
'top': t
});
}
}
})();
$(function() {
meh.vcenter();
});
$(window).resize(function() {
meh.vcenter();
});
$(document).ready(function() {
$('ul#categories a').click(function() {
$(this).css('outline', 'none');
$('ul#categories .active').removeClass('active');
$(this).parent().addClass('active');
var categoriesVal = $(this).text().toLowerCase().replace(' ', '-');
if (categoriesVal == 'all') {
$('ul#projects li.hidden').fadeIn('slow').removeClass('hidden');
} else {
$('ul#projects li').each(function() {
if (!$(this).hasClass(categoriesVal)) {
$(this).fadeOut('normal').addClass('hidden');
} else {
$(this).fadeIn('slow').removeClass('hidden');
}
});
}
return false;
});
});
$(document).ready(function() {
$("a.ajax").click(function(e) {
e.preventDefault();
var a = $("#result").length;
if (a) {
$("#result").remove();
$("a.close").remove();
}
var x = $(this).attr("href"); // + " #content";
$('body').append('<iframe id="result"></iframe>');
$('#result').hide();
$("iframe#result").attr('src', x);
$('iframe#result').load(function() {
$('body').append('<a href="#" class="close t_h">Close</a>');
$('body > .t_h').hide();
$h = $('#result').height();
$('body > .t_h, #result').show();
$w = $($("#result")[0].contentWindow);
$i = $($("#result")[0].contentWindow.document);
if ($i.find('#project').length > 0) $("#result")[0].contentWindow.parentCall();
$i.find('body > div > div').css({
'top': -$w.height(),
'position': 'absolute'
}).animate({
'top': '+=' + $w.height()
}, {
duration: 750,
specialEasing: {
width: 'none',
height: 'easeOutElastic'
}
});
$i.find('a').attr('target', '_blank');
$('body').find('a.close').click(function(e) {
e.preventDefault();
$i.find('body > div > div').animate({
'top': '-=' + $w.height()
}, {
duration: 550,
specialEasing: {
width: 'none',
height: 'easeOutElastic'
},
complete: function() {
$("#result").remove();
$("a.close").remove();
}
});
// var y = $(this).parent().hide();
});
});
});
});
$(document).ready(function() {
$('#container').ascensor({
AscensorName:'wrapper',
WindowsFocus:true,
WindowsOn:0,
NavigationDirection:'xy',
Direction: 'y',
Navig:true,
Link:false,
ReturnURL:true,
PrevNext:false,
CSSstyles:true,
KeyArrow:true,
keySwitch:true,
ReturnCode:false,
ChocolateAscensor:true,
AscensorMap: '3|1',
ContentCoord: '1|1 & 1|2 & 1|3'
});
});
$(document).ready(function() {
var theInt = null;
var $crosslink, $navthumb;
var curclicked = 0;
theInterval = function(cur){
clearInterval(theInt);
if( typeof cur != 'undefined' )
curclicked = cur;
$crosslink.removeClass("active-thumb");
$navthumb.eq(curclicked).parent().addClass("active-thumb");
$(".stripNav ul li a").eq(curclicked).trigger('click');
theInt = setInterval(function(){
$crosslink.removeClass("active-thumb");
$navthumb.eq(curclicked).parent().addClass("active-thumb");
$(".stripNav ul li a").eq(curclicked).trigger('click');
curclicked++;
if( 6 == curclicked )
curclicked = 0;
}, 3000);
};
$(function(){
//Rzuca error, skip
//$("#main-photo-slider").codaSlider();
$navthumb = $(".nav-thumb");
$crosslink = $(".cross-link");
$navthumb
.click(function() {
var $this = $(this);
theInterval($this.parent().attr('href').slice(1) - 1);
return false;
});
theInterval();
});
});
var meh = (function(){
return {
vcenter: function(){
var t = ($(window).height() - $('.about_me').height()) /2;
if(t < 0) t = 0;
$('.about_me').css({'top': t});
}
}
})();
$(function(){meh.vcenter();});
$(window).resize(function(){
meh.vcenter();
});
$(document).ready(function() {
$('ul#categories a').click(function() {
$(this).css('outline','none');
$('ul#categories .active').removeClass('active');
$(this).parent().addClass('active');
var categoriesVal = $(this).text().toLowerCase().replace(' ','-');
if(categoriesVal == 'all') {
$('ul#projects li.hidden').fadeIn('slow').removeClass('hidden');
} else {
$('ul#projects li').each(function() {
if(!$(this).hasClass(categoriesVal)) {
$(this).fadeOut('normal').addClass('hidden');
} else {
$(this).fadeIn('slow').removeClass('hidden');
}
});
}
return false;
});
});
$(document).ready(function(){
$("a.ajax").click(function(e){
e.preventDefault();
var a = $("#result").length;
if (a) {
$("#result").remove();
$("a.close").remove();
}
var x = $(this).attr("href"); // + " #content";
$('body').append('<iframe id="result"></iframe>');
$('#result').hide();
$("iframe#result").attr('src',x);
$('iframe#result').load(function(){
$('body').append('<a href="#" class="close t_h">Close</a>');
$('body > .t_h').hide();
$h = $('#result').height();
$('body > .t_h, #result').show();
$w = $($("#result")[0].contentWindow);
$i = $($("#result")[0].contentWindow.document);
if($i.find('#project').length > 0) $("#result")[0].contentWindow.parentCall();
$i.find('body > div > div').css({
'top': -$w.height(),
'position': 'absolute'
}).animate({
'top': '+='+$w.height()
}, {
duration: 750,
specialEasing: {
width: 'none',
height: 'easeOutElastic'
}
});
$i.find('a').attr('target', '_blank');
$('body').find('a.close').click(function(e){
e.preventDefault();
$i.find('body > div > div').animate({
'top': '-='+$w.height()
}, {
duration: 550,
specialEasing: {
width: 'none',
height: 'easeOutElastic'
},
complete: function(){
$("#result").remove();
$("a.close").remove();
}
});
// var y = $(this).parent().hide();
});
});
});
});