jQuery(document).ready(function(){
// Touch devices link behavior
jQuery('.touch .b-animate-go').click(function (event) {
if(jQuery(this).hasClass('hover')) {
//remove hovered and click
jQuery(this).removeClass('hover');
} else {
//remove other hovered class
jQuery('.touch .b-animate-go.hover').each(function() {
jQuery(this).removeClass('hover');
});
//set hovered class to this element and stop
jQuery(this).addClass('hover');
event.preventDefault();
event.stopPropagation();
}
});
/* Slide */
jQuery('#slide a').each(function(index, element) {
jQuery(this).hoverdir();
});
/* Stroke */
jQuery('.b-link-stroke').prepend('
');
jQuery('.b-link-stroke').prepend('');
/* Twist */
jQuery('.b-link-twist').prepend('
');
jQuery('.b-link-twist').prepend('
');
jQuery('.b-link-twist img').each(function(index, element) {
jQuery(this).css('visibility','hidden');
jQuery(this).parent().find('.b-top-line, .b-bottom-line').css('background-image','url('+jQuery(this).attr('src')+')');
});
/* Flip */
jQuery('.b-link-flip').prepend('
');
jQuery('.b-link-flip').prepend('
');
jQuery('.b-link-flip img').each(function(index, element) {
jQuery(this).css('visibility','hidden');
jQuery(this).parent().find('.b-top-line, .b-bottom-line').css('background-image','url('+jQuery(this).attr('src')+')');
});
/* Fade */
jQuery('.b-link-fade').each(function(index, element) {
jQuery(this).append('')
});
/* Flow */
jQuery('.b-link-flow').each(function(index, element) {
jQuery(this).append('')
});
/* Box */
jQuery('.b-link-box').prepend('');
jQuery('.b-link-box').prepend('');
/* Stripe */
jQuery('.b-link-stripe').each(function(index, element) {
jQuery(this).prepend('');
});
/* Apart */
jQuery('.b-link-apart-vertical, .b-link-apart-horisontal').each(function(index, element) {
jQuery(this).prepend('');
});
/* diagonal */
jQuery('.b-link-diagonal').each(function(index, element) {
jQuery(this).prepend('');
});
setTimeout("calculate_margin();", 100);
});
var count_calc_margin = 0;
function calculate_margin() {
// Vertical alignment
jQuery('.b-animate-go .b-wrapper').each(function(i, v){
var this_h = jQuery(v).height();
var el_h = 0;
var m_t = 0;
var m_b = 0;
var el_len = jQuery(v).children().length;
jQuery(v).children().each(function(ii, vv){
el_h += jQuery(vv).height();
if(ii > 0) {
m_t += parseInt(jQuery(vv).css('margin-top'));
}
if((ii+1) <= el_len-1) {
m_b += parseInt(jQuery(vv).css('margin-bottom'));
}
});
var set_mar = parseInt((this_h/2)-((m_t+m_b+el_h)/2));
if(set_mar > 0) {
jQuery(v).children().first().css('margin-top', set_mar);
} else {
if(count_calc_margin < 5) {
count_calc_margin++;
setTimeout("calculate_margin();", 100);
}
}
});
}
jQuery(window).resize(function(e) {
calculate_margin();
});
/*! head.core - v1.0.2 */
(function(n,t){"use strict";function r(n){a[a.length]=n}function k(n){var t=new RegExp(" ?\\b"+n+"\\b");c.className=c.className.replace(t,"")}function p(n,t){for(var i=0,r=n.length;in?(i.screensCss.gt&&r("gt-"+n),i.screensCss.gte&&r("gte-"+n)):tt);u.feature("landscape",fe?(i.browserCss.gt&&r("gt-"+f+e),i.browserCss.gte&&r("gte-"+f+e)):h2&&this[u+1]!==t)u&&r(this.slice(u,u+1).join("-").toLowerCase()+i.section);else{var f=n||"index",e=f.indexOf(".");e>0&&(f=f.substring(0,e));c.id=f.toLowerCase()+i.page;u||r("root"+i.section)}});u.screen={height:n.screen.height,width:n.screen.width};tt();b=0;n.addEventListener?n.addEventListener("resize",it,!1):n.attachEvent("onresize",it)})(window);
/*! head.css3 - v1.0.0 */
(function(n,t){"use strict";function a(n){for(var r in n)if(i[n[r]]!==t)return!0;return!1}function r(n){var t=n.charAt(0).toUpperCase()+n.substr(1),i=(n+" "+c.join(t+" ")+t).split(" ");return!!a(i)}var h=n.document,o=h.createElement("i"),i=o.style,s=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),c="Webkit Moz O ms Khtml".split(" "),l=n.head_conf&&n.head_conf.head||"head",u=n[l],f={gradient:function(){var n="background-image:";return i.cssText=(n+s.join("gradient(linear,left top,right bottom,from(#9f9),to(#fff));"+n)+s.join("linear-gradient(left top,#eee,#fff);"+n)).slice(0,-n.length),!!i.backgroundImage},rgba:function(){return i.cssText="background-color:rgba(0,0,0,0.5)",!!i.backgroundColor},opacity:function(){return o.style.opacity===""},textshadow:function(){return i.textShadow===""},multiplebgs:function(){i.cssText="background:url(https://),url(https://),red url(https://)";var n=(i.background||"").match(/url/g);return Object.prototype.toString.call(n)==="[object Array]"&&n.length===3},boxshadow:function(){return r("boxShadow")},borderimage:function(){return r("borderImage")},borderradius:function(){return r("borderRadius")},cssreflections:function(){return r("boxReflect")},csstransforms:function(){return r("transform")},csstransitions:function(){return r("transition")},touch:function(){return"ontouchstart"in n},retina:function(){return n.devicePixelRatio>1},fontface:function(){var t=u.browser.name,n=u.browser.version;switch(t){case"ie":return n>=9;case"chrome":return n>=13;case"ff":return n>=6;case"ios":return n>=5;case"android":return!1;case"webkit":return n>=5.1;case"opera":return n>=10;default:return!1}}};for(var e in f)f[e]&&u.feature(e,f[e].call(),!0);u.feature()})(window);
/*! head.load - v1.0.3 */
(function(n,t){"use strict";function w(){}function u(n,t){if(n){typeof n=="object"&&(n=[].slice.call(n));for(var i=0,r=n.length;i