');
coordInfoWindow.setPosition(point);
coordInfoWindow.open(map);
}
}
});
jQuery(window).bind('resize load',function(){
if (jQuery.browser.msie) {
var h = jQuery(window).height();
} else {
var h = window.innerHeight;
}
var w = jQuery(window).width();
jQuery('#outer_canvas').width(w+14).height(h);
jQuery('#pix_map_canvas').width(w+14).height(h);
});
/******************************************************
*
* Refresh Cufon
*
******************************************************/
jQuery(window).one('load',function() {
Cufon.refresh();
});
/******************************************************
*
* Wide flash
*
******************************************************/
function thisMovie(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName]
}
else {
return document[movieName]
}
}
function playVideo() {
thisMovie("wide_flash").playVideo();
}
function pauseVideo() {
thisMovie("wide_flash").pauseVideo();
}
function resumeVideo() {
thisMovie("wide_flash").resumeVideo();
}
function muteVideo() {
thisMovie("wide_flash").muteVideo();
}
function unMuteVideo() {
thisMovie("wide_flash").unMuteVideo();
}
function rePlayVideo() {
if(jQuery('#pix_pause_slide').is(':visible')){
jQuery('#pix_pause_slide').hide();
}
if(jQuery('#pix_resume_slide').is(':visible')){
jQuery('#pix_resume_slide').hide();
}
if(!jQuery('#pix_play_slide').is(':visible')){
jQuery('#pix_play_slide').fadeIn(200);
}
}
function showPause() {
jQuery('#pix_pause_slide').show();
jQuery('#pix_resume_slide').hide();
jQuery('#pix_play_slide').hide();
}
function showPlay() {
jQuery('#pix_play_slide').show();
jQuery('#pix_pause_slide').hide();
jQuery('#pix_resume_slide').hide();
}
jQuery(window).one('load',function(){
jQuery('#pix_play_slide').live('click',function(){
playVideo();
jQuery(this).fadeOut(100,function(){
jQuery('#pix_pause_slide').fadeIn(200);
});
});
jQuery('#pix_pause_slide').live('click',function(){
pauseVideo();
jQuery(this).fadeOut(100,function(){
jQuery('#pix_resume_slide').fadeIn(200);
});
});
jQuery('#pix_resume_slide').live('click',function(){
resumeVideo();
jQuery(this).fadeOut(100,function(){
jQuery('#pix_pause_slide').fadeIn(200);
});
});
jQuery('#pix_mute_slide').live('click',function(){
muteVideo();
jQuery(this).fadeOut(100,function(){
jQuery('#pix_unmute_slide').fadeIn(200);
});
});
jQuery('#pix_unmute_slide').live('click',function(){
unMuteVideo();
jQuery(this).fadeOut(100,function(){
jQuery('#pix_mute_slide').fadeIn(200);
});
});
});
/******************************************************
*
* Portfolio images
*
******************************************************/
function portfolioImages(){
jQuery('.imgHentry').each(function(){
var t = jQuery(this);
var i = jQuery('img',t);
var a = jQuery('.linkIcon',t);
a.show().find('a').animate({'opacity':0},0);
jQuery('a',t).each(function(){
var ti;
var ex;
var ac;
if(jQuery(this).attr('data-title')){
ti = '
'+jQuery(this).attr('data-title')+'';
} else {
ti = '';
}
if(jQuery(this).attr('data-excerpt')){
ex = jQuery(this).attr('data-excerpt')+'
';
} else {
ex = '';
}
if(jQuery(this).attr('data-action')){
ac = '
'+jQuery(this).attr('data-action')+'';
} else {
ac = '';
}
if(jQuery(this).attr('data-hide')!='hide'){
jQuery(this).qtip({
style: {
tip: {
corner: "bottomLeft"
},
classes: "ui-tooltip-youtube"
},
position: {
target: "mouse",
adjust: {
mouse: false,
x: 10,
y: -10
},
my: "bottom left",
at: "bottom left"
},
show: {
delay: 500,
solo: true
},
content: ti+ex+ac
});
}
});
t.hover(function(){
i.stop(true,false).animate({'opacity':0.2},300);
a.find('a').stop(true,false).animate({'opacity':1},300);
},function(){
i.stop(true,false).animate({'opacity':1},300);
a.find('a').stop(true,false).animate({'opacity':0},300);
});
});
}
jQuery(function(){
portfolioImages();
});
/******************************************************
*
* Filter tag
*
******************************************************/
function filterTag() {
if(jQuery('#filtering-nav').length!=0){
jQuery('#filtering-nav a').each(function(){
var t = jQuery(this);
var dF = t.attr('data-filter');
var l = jQuery(dF).length;
if(dF!='*'&&l==0){
t.hide();
} else {
t.show();
}
});
}
}
jQuery(function(){
filterTag();
});
/******************************************************
*
* Portfolio layout
*
******************************************************/
jQuery(function(){
var ha = 0;
if(jQuery('aside').length!=0){
ha = jQuery('aside').height();
}
if(jQuery('section.widepagePortfolio').length!=0){
var w = jQuery(window).width();
if(w > 1050){
w = jQuery(window).width()-300;
} else {
w = 1050 - 300;
}
jQuery('section.widepagePortfolio').css({'width':w,'float':'left','margin-left':'270px'})
jQuery(window).resize(function(){
w = jQuery(window).width();
if(w > 1050){
w = jQuery(window).width()-300;
} else {
w = 1050 - 300;
}
jQuery('section.widepagePortfolio').css({'width':w,'float':'left','margin-left':'270px'})
});
}
if(jQuery('div.isoFilter').length!=0){
var
speed = 400,
the_mode,
the_difference,
wall;
if(jQuery('section.widepagePortfolio').length!=0){
wall = jQuery('section div.isoFilter');
the_mode = 'masonry';
} else if(jQuery('section.pagePortfolio').length!=0) {
wall = jQuery('article div.isoFilter');
the_mode = 'fitRows';
jQuery(window).one('load',function(){
the_difference = 100+(jQuery('article > div').height() - (jQuery('.isoFilter').height() + jQuery('#filtering-nav').height()));
});
}
wall.imagesLoaded( function(){
wall.isotope({
masonry : {
columnWidth : '1'
},
itemSelector : '.hentry',
layoutMode : the_mode,
animationEngine : 'jquery',
animationOptions: {
duration: 400,
easing: 'linear',
queue: false
}
});
});
var colorClass = '.all';
jQuery('#filtering-nav a').click(function(){
colorClass = '.' + jQuery(this).attr('data-filter');
var selector = jQuery(this).attr('data-filter');
wall.isotope({ filter: selector });
setTimeout(function(){
var newH = jQuery('.isoFilter').height();
if(jQuery('#filtering-nav').length!=0){
var fH = jQuery('#filtering-nav').height();
} else {
var fH = 0;
}
if(jQuery('.pix_pagenavi').length!=0){
var bC = jQuery('.pix_pagenavi > ul').height();
} else {
var bC = 0;
}
jQuery('article').css({'height':(newH+the_difference+fH)});
var hs = 0;
if(jQuery('article').length!=0){
hs = jQuery('article').height()+(fH+bC);
}
articleAsideOpen(hs, ha);
jQuery(window).resize();
}, speed);
if ( !jQuery(this).hasClass('selected') ) {
jQuery(this).parents('#filtering-nav').find('.selected').removeClass('selected');
jQuery(this).addClass('selected');
}
return false;
});
if(jQuery.isFunction(jQuery.fn.infinitescroll)) {
wall.infinitescroll({
navSelector : 'a#page_nav:last',
nextSelector : 'a#page_nav:last',
itemSelector : '.hentry:not(.invis)',
loadingImg : pix_theme_dir+'/images/loader.gif',
loadingText : pix_loadingText,
donetext : pix_donetext,
debug: false,
errorCallback: function() {
jQuery('#infscr-loading').animate({opacity: .8},2000).fadeOut('normal');
}
},
function( newElements ) {
wall.isotope( 'appended', jQuery( newElements ),
function(){
setTimeout(function(){
var thisClass = jQuery('#filtering-nav a.selected').attr('data-filter');
if(thisClass!='*') {
jQuery('#filtering-nav a[data-filter="'+thisClass+'"]').click();
}
var newH = jQuery('.isoFilter').height();
filterTag();
if(jQuery('#filtering-nav').length!=0){
var fH = jQuery('#filtering-nav').height();
} else {
var fH = 0;
}
jQuery('article').css({'height':(newH+the_difference+fH+50)});
var hs = 0;
if(jQuery('article').length!=0){
hs = jQuery('article').height();
}
articleAsideOpen(hs, ha);
jQuery(window).resize();
portfolioImages();
}, speed+speed);
jQuery("a[href$='.jpg']", newElements).not('.noColorBox').each(function(){
var dataRel = jQuery(this).attr('data-rel');
var dataTitle = jQuery(this).attr('data-description')!='' ? jQuery(this).attr('data-description') : jQuery(this).attr('data-title');
jQuery(this).colorbox({maxWidth:"98%", maxHeight:"98%", scrolling:false, rel:dataRel, current:"{current} / {total}", onComplete: function(){ jQuery('#cboxLoadedContent').prepend('
'); jQuery('#cboxTitle').html(dataTitle); if(!jQuery('.pix_slide').hasClass('stopped') && jQuery('.pix_slide').length ){ jQuery('.pix_slide').pixwall_delightStop(); } else { jQuery('.pix_slide').addClass('alreadyStopped'); } }, onClosed: function(){ jQuery('.cboxPrevent').remove(); jQuery('#cboxTitle').text(''); if(!jQuery('.pix_slide').hasClass('alreadyStopped') && jQuery('.pix_slide').length ){ jQuery('.pix_slide').pixwall_delightPlay(); } else { jQuery('.pix_slide').removeClass('alreadyStopped'); } } });
});
jQuery("a[href$='.jpeg']", newElements).not('.noColorBox').each(function(){
var dataRel = jQuery(this).attr('data-rel');
var dataTitle = jQuery(this).attr('data-description')!='' ? jQuery(this).attr('data-description') : jQuery(this).attr('data-title');
jQuery(this).colorbox({maxWidth:"98%", maxHeight:"98%", scrolling:false, rel:dataRel, current:"{current} / {total}", onComplete: function(){ jQuery('#cboxLoadedContent').prepend('
'); jQuery('#cboxTitle').html(dataTitle); if(!jQuery('.pix_slide').hasClass('stopped') && jQuery('.pix_slide').length ){ jQuery('.pix_slide').pixwall_delightStop(); } else { jQuery('.pix_slide').addClass('alreadyStopped'); } }, onClosed: function(){ jQuery('.cboxPrevent').remove(); jQuery('#cboxTitle').text(''); if(!jQuery('.pix_slide').hasClass('alreadyStopped') && jQuery('.pix_slide').length ){ jQuery('.pix_slide').pixwall_delightPlay(); } else { jQuery('.pix_slide').removeClass('alreadyStopped'); } } });
});
jQuery("a[href$='.png']", newElements).not('.noColorBox').each(function(){
var dataRel = jQuery(this).attr('data-rel');
var dataTitle = jQuery(this).attr('data-description')!='' ? jQuery(this).attr('data-description') : jQuery(this).attr('data-title');
jQuery(this).colorbox({maxWidth:"98%", maxHeight:"98%", scrolling:false, rel:dataRel, current:"{current} / {total}", onComplete: function(){ jQuery('#cboxLoadedContent').prepend('
'); jQuery('#cboxTitle').html(dataTitle); if(!jQuery('.pix_slide').hasClass('stopped') && jQuery('.pix_slide').length ){ jQuery('.pix_slide').pixwall_delightStop(); } else { jQuery('.pix_slide').addClass('alreadyStopped'); } }, onClosed: function(){ jQuery('.cboxPrevent').remove(); jQuery('#cboxTitle').text(''); if(!jQuery('.pix_slide').hasClass('alreadyStopped') && jQuery('.pix_slide').length ){ jQuery('.pix_slide').pixwall_delightPlay(); } else { jQuery('.pix_slide').removeClass('alreadyStopped'); } } });
});
jQuery("a[href$='.gif']", newElements).not('.noColorBox').each(function(){
var dataRel = jQuery(this).attr('data-rel');
var dataTitle = jQuery(this).attr('data-description')!='' ? jQuery(this).attr('data-description') : jQuery(this).attr('data-title');
jQuery(this).colorbox({maxWidth:"98%", maxHeight:"98%", scrolling:false, rel:dataRel, current:"{current} / {total}", onComplete: function(){ jQuery('#cboxLoadedContent').prepend('
'); jQuery('#cboxTitle').html(dataTitle); if(!jQuery('.pix_slide').hasClass('stopped') && jQuery('.pix_slide').length ){ jQuery('.pix_slide').pixwall_delightStop(); } else { jQuery('.pix_slide').addClass('alreadyStopped'); } }, onClosed: function(){ jQuery('.cboxPrevent').remove(); jQuery('#cboxTitle').text(''); if(!jQuery('.pix_slide').hasClass('alreadyStopped') && jQuery('.pix_slide').length ){ jQuery('.pix_slide').pixwall_delightPlay(); } else { jQuery('.pix_slide').removeClass('alreadyStopped'); } } });
});
jQuery("a.play-icon", newElements).not('.noColorBox').each(function(){
var dataRel = jQuery(this).attr('data-rel');
var dataTitle = jQuery(this).attr('data-description')!='' ? jQuery(this).attr('data-description') : jQuery(this).attr('data-title');
jQuery(this).colorbox({iframe:true, innerWidth:800, innerHeight:450, scrolling:false, rel:dataRel, current:"{current} / {total}", onComplete: function(){ jQuery('#cboxTitle').html(dataTitle); if(!jQuery('.pix_slide').hasClass('stopped') && jQuery('.pix_slide').length ){ jQuery('.pix_slide').pixwall_delightStop(); } else { jQuery('.pix_slide').addClass('alreadyStopped'); } }, onClosed: function(){ jQuery('#cboxTitle').text(''); if(!jQuery('.pix_slide').hasClass('alreadyStopped') && jQuery('.pix_slide').length ){ jQuery('.pix_slide').pixwall_delightPlay(); } else { jQuery('.pix_slide').removeClass('alreadyStopped'); } } });
});
jQuery("a.iframe").not('.noColorBox').each(function(){
var dataRel = jQuery(this).attr('data-rel');
var dataTitle = jQuery(this).attr('data-description')!='' ? jQuery(this).attr('data-description') : jQuery(this).attr('data-title');
jQuery(this).colorbox({iframe:true, width:"85%", height:"95%", rel:dataRel, current:"{current} / {total}", onComplete: function(){ if(!jQuery('.pix_slide').hasClass('stopped') && jQuery('.pix_slide').length ){ jQuery('.pix_slide').pixwall_delightStop(); } else { jQuery('.pix_slide').addClass('alreadyStopped'); } jQuery('#cboxTitle').html(dataTitle); }, onClosed: function(){ if(!jQuery('.pix_slide').hasClass('alreadyStopped') && jQuery('.pix_slide').length ){ jQuery('.pix_slide').pixwall_delightPlay(); } else { jQuery('.pix_slide').removeClass('alreadyStopped'); } } });
});
}
);
}
);
}
jQuery(window).unbind('.infscr');
jQuery('a#page_nav').click(function(){
jQuery(document).trigger('retrieve.infscr');
return false;
});
jQuery(document).ajaxError(function(e,xhr,opt){
if (xhr.status == 404) {
jQuery('a#page_nav').remove();
}
});
}
});
/******************************************************
*
* Accordions
*
******************************************************/
jQuery(function() {
if(jQuery('.pix_accordion').length!=0){
jQuery( '.pix_accordion' ).each(function(){
var aA = parseFloat(jQuery(this).attr('data-active'));
if(aA==0){
aA = 100000;
}
jQuery( this ).accordion({
heightStyle: 'content',
navigation: false,
collapsible: true,
icons: false,
header: 'a.header_accordion',
activate: function(event, ui) {
jQuery('.ui-state-active .icons',this).html('_');
jQuery('.ui-state-default .icons',this).html('>');
jQuery('article, aside').css({'height':'auto'});
jQuery('article .entry-title:first, aside h3:first').unbind('click');
var hs = jQuery('article').height();
var ha = jQuery('aside').height();
articleAsideOpen(hs, ha);
jQuery(window).resize();
Cufon.refresh();
},
change: function(event, ui) {
jQuery('.ui-state-active .icons',this).html('_');
jQuery('.ui-state-default .icons',this).html('>');
jQuery('article, aside').css({'height':'auto'});
jQuery('article .entry-title:first, aside h3:first').unbind('click');
var hs = jQuery('article').height();
var ha = jQuery('aside').height();
articleAsideOpen(hs, ha);
jQuery(window).resize();
Cufon.refresh();
},
create: function(event, ui) {
jQuery('.ui-state-default .icons',this).html('>');
jQuery('.ui-state-active .icons',this).html('_');
jQuery(window).resize();
Cufon.refresh();
},
active: aA-1
});
});
}
});
/******************************************************
*
* Tabs
*
******************************************************/
jQuery(window).one('load',function() {
if(jQuery('.pix_tabs').length!=0){
jQuery( '.pix_tabs' ).each(function(){
var aA = parseFloat(jQuery(this).attr('data-active'));
jQuery( this ).tabs({
icons: false,
show: function(event, ui) {
jQuery('article, aside').css({'height':'auto'});
jQuery('article .entry-title:first, aside h3:first').unbind('click');
var hs = jQuery('article').height();
var ha = jQuery('aside').height();
articleAsideOpen(hs, ha);
jQuery(window).resize();
Cufon.refresh();
},
fx: { opacity: 'toggle' },
selected: aA-1
});
});
}
});
/******************************************************
*
* Columns IE7 workaround
*
******************************************************/
jQuery(function() {
if ((jQuery.browser.msie && jQuery.browser.version < 9) && jQuery('.pix_columns').length != 0) {
var w = jQuery('article > div').width();
jQuery('.pix_columns .col_two').css({'width':Math.floor(w*0.47)});
jQuery('.pix_columns .col_two').not('.last_column').css({'margin-right':Math.floor(w*0.06)});
jQuery('.pix_columns .col_three').css({'width':Math.floor(w*0.30)});
jQuery('.pix_columns .col_three').not('.last_column').css({'margin-right':Math.floor(w*0.05)});
jQuery('.pix_columns .col_two_three').css({'width':Math.floor(w*0.65)});
jQuery('.pix_columns .col_two_three').not('.last_column').css({'margin-right':Math.floor(w*0.05)});
jQuery('.pix_columns .col_four').css({'width':Math.floor(w*0.22)});
jQuery('.pix_columns .col_four').not('.last_column').css({'margin-right':Math.floor(w*0.04)});
jQuery('.pix_columns .col_two_four').css({'width':Math.floor(w*0.48)});
jQuery('.pix_columns .col_two_four').not('.last_column').css({'margin-right':Math.floor(w*0.04)});
jQuery('.pix_columns .col_three_four').css({'width':Math.floor(w*0.74)});
jQuery('.pix_columns .col_three_four').not('.last_column').css({'margin-right':Math.floor(w*0.04)});
jQuery('.pix_columns .col_five').css({'width':Math.floor(w*0.18)});
jQuery('.pix_columns .col_five').not('.last_column').css({'margin-right':Math.floor(w*0.025)});
jQuery('.pix_columns .col_two_five').css({'width':Math.floor(w*0.385)});
jQuery('.pix_columns .col_two_five').not('.last_column').css({'margin-right':Math.floor(w*0.025)});
jQuery('.pix_columns .col_three_five').css({'width':Math.floor(w*0.59)});
jQuery('.pix_columns .col_three_five').not('.last_column').css({'margin-right':Math.floor(w*0.025)});
}
});
/******************************************************
*
* Smoothscroll
*
******************************************************/
jQuery(function(){
jQuery('a[href*=#]').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
&& location.hostname == this.hostname) {
var target = jQuery(this.hash);
target = target.length && target
|| jQuery('[name=' + this.hash.slice(1) +']');
if (target.length) {
var targetOffset = target.offset().top;
jQuery('body')
.animate({scrollTop: targetOffset}, 1000);
jQuery('html')
.animate({scrollTop: targetOffset}, 1000);
return false;
}
}
});
});
/******************************************************
*
* Hover nav effect
*
******************************************************/
jQuery(window).one('load',function(){
jQuery('nav > ul > li').has('ul').each(function(){
var w = parseFloat(jQuery(this).find('a:first').actual('width'));
var p = parseFloat(jQuery(this).find('a:first').css('padding-left').replace('px',''));
jQuery('a:first',this).after(' ');
});
jQuery('nav > ul > li li').has('ul').each(function(){
var w = parseFloat(jQuery(this).find('a:first').actual('width'));
var p = parseFloat(jQuery(this).find('a:first').css('padding-left').replace('px',''));
jQuery('a:first',this).after(' ');
});
jQuery('nav li li ul').addClass('third_level_menu');
var le = jQuery('nav > ul > li').length;
jQuery('nav > ul > li').each(function(){
var Mw = jQuery(this).actual('width');
jQuery(this).css({'margin-left':'-'+(Mw+100)+'px'})
});
var i = 0;
while(i < le){
jQuery('nav > ul > li').eq(i).delay((i*100)+500).animate({'margin-left':0},1000,'easeOutQuint');
i++;
}
var hH = jQuery('header').height();
jQuery('header').css({'top':'-'+hH+'px'}).css({'visibility':'visible'}).animate({'top':0},1000);
var cI = jQuery('.click.icons').height();
jQuery('.click.icons').css({'top':'-'+cI+'px'}).css({'visibility':'visible'}).animate({'top':0},1000);
var hF = 0;
if(jQuery('footer').length!=0){
hF = jQuery('footer').height();
jQuery('footer').css({'bottom':'-'+hH+'px'}).css({'visibility':'visible'}).animate({'bottom':0},500);
}
if(jQuery('article').length!=0){
var aT = parseFloat(jQuery('article').css('top').replace('px',''));
var aH = jQuery('article').height();
jQuery('article').not('.open_toggle').css({'top':aT+aH+hF,'visibility':'visible'}).delay(250).animate({'top':aT},1000);
}
if(jQuery('aside').length!=0){
var sT = parseFloat(jQuery('aside').css('top').replace('px',''));
var sH = jQuery('aside').height();
jQuery('aside').not('.open_toggle').css({'top':sT+sH+hF,'visibility':'visible'}).delay(250).animate({'top':aT},1000);
}
});
jQuery(window).one('load',function(){
jQuery('nav > ul > li').not(':has(ul)').each(function(){
var a = jQuery(this).find('a:first');
a.hoverIntent({
over: function(){jQuery(this).stop(true,false).animate({'border-right-width':'5px','padding-right':'15px'},100);},
out: function(){jQuery(this).stop(true,false).animate({'border-right-width':'0','padding-right':'20px'},100);},
timeout: 250
});
});
jQuery('nav > ul > li').has('ul').each(function(){
var a = jQuery(this).find('a:first');
var sub = jQuery(this).find('.submenu:first');
var w = 30+(a.actual('width'));
var u = jQuery(this).find('ul:first');
var sto;
u.find('li').not(':first').before('
/');
jQuery('.third_level_menu .slash_li:first-child').remove();
var uW = u.actual('width');
u.each(function(){
jQuery(this).css({'left':'-'+(30+(uW-w))+'px','width':uW+'px'});
});
jQuery('nav ul.third_level_menu').hide();
uW = 2;
jQuery('> ul > li',this).each(function(){
var allLi = [];
allLi.push(jQuery(this).actual('width'));
jQuery.each(allLi, function(key, value) {
uW = uW + (allLi[key]);
});
});
jQuery('> ul',this).css({'left':'-'+(30+uW)+'px','width':uW});
jQuery('nav ul.third_level_menu').show();
function seThide(){
a.stop(true,false).animate({'padding-right':'20px'},100);
sub.stop(true,false).animate({'opacity':1,'right':'12px'},100);
u.stop(true,false).animate({'left':'-'+(uW+30)+'px'},200);
}
function seTout(){
sto = setTimeout(seThide,250);
}
jQuery(this).hoverIntent({
over: function(){
w = 30+(a.actual('width'));
clearTimeout(sto);
a.stop(true,false).animate({'padding-right':'15px'},100);
sub.stop(true,false).animate({'opacity':0,'right':0},100);
u.stop(true,false).animate({'left':w-5},200);
},
out: seTout,
timeout: 250
});
});
jQuery('nav li').hover(function(){
jQuery(this).addClass('nav_li_hover');
},function(){
jQuery(this).removeClass('nav_li_hover');
});
jQuery('nav li li').has('ul').each(function(){
var ul = jQuery(this).find('ul:first');
var sub = jQuery(this).find('.submenu:first');
var ulW = 2;
var sto;
ul.find('> li').each(function(){
var allLi = [];
allLi.push(jQuery(this).actual('width'));
jQuery.each(allLi, function(key, value) {
ulW = ulW + (allLi[key]);
});
});
var thisH = jQuery(this).height();
ul.width(0).height(thisH-7);
function seThide(){
ul.css({'width':0,'margin-left':0}).hide();
sub.stop(true,false).animate({'top':'-2px','opacity':1},100);
jQuery('nav li').removeClass('nav_hover');
jQuery('nav li').css({'z-index':'1'});
}
function seTout(){
sto = setTimeout(seThide,250);
}
jQuery(this).hoverIntent({
over: function(){
clearTimeout(sto);
jQuery('nav li li ul').hide();
var offset = jQuery(this).offset();
if(offset.left+ulW>1050){
ul.css({'left':0,'top':thisH}).show().stop(true,false).animate({'width':ulW,'margin-left':(1050-offset.left)-ulW},200);
} else {
ul.css({'left':10,'top':thisH}).show().stop(true,false).animate({'width':ulW},200);
}
ul.parent().parent().parent().addClass('nav_hover');
jQuery('nav li').not('.nav_hover').css({'z-index':'-1'});
sub.stop(true,false).animate({'top':'15px','opacity':0},100);
},
out: seTout,
timeout: 250
});
});
Cufon.refresh();
});
/******************************************************
*
* Link with #
*
******************************************************/
jQuery(function(){
jQuery('nav a').click(function(){
if(jQuery(this).attr('href')=='#'){
return false;
}
});
});
/******************************************************
*
* Show thumbs & thmb scroller
*
******************************************************/
function navGhide(){
jQuery('#navgallery_wrap').fadeOut(200,function(){
jQuery('#credits_blog, #pix_controls').fadeIn(400);
});
}
var sto;
function seTout(){
sto = setTimeout(navGhide,1000);
}
function resizeThumbCont(){ //funzione per il resize del contenitore thumb
var w = jQuery(window).width();
jQuery('#navgallery_wrap, #scroll_wrapper').width(w-40); // 20+20 margine laterale
}
jQuery(window).bind('load resize',function(){
resizeThumbCont();
});
jQuery(window).one('load',function(){
jQuery('#navgallery_wrap').hide();
if(jQuery('#pix_show_thumbs').length!=0){
jQuery('#pix_show_thumbs').click(function(){
jQuery('#credits_blog, #pix_controls').fadeOut(200,function(){
jQuery('#navgallery_wrap').fadeIn(400);
});
});
jQuery('#navgallery_wrap').mouseout(function(){
seTout();
}).mouseover(function(){
clearTimeout(sto);
});
}
var wrapperW = (jQuery('.navgallery li').length)*(50+10+2);
jQuery('.navgallery').width(wrapperW);
var wrapW = jQuery('#navgallery_wrap').width();
if( wrapperW > wrapW ) {
jQuery("#navgallery_wrap").thumbnailScroller({
scrollerType:"hoverPrecise",
scrollerOrientation:"horizontal",
scrollSpeed:2,
scrollEasing:"easeOutCirc",
scrollEasingAmount:250,
acceleration:4,
scrollSpeed:300,
noScrollCenterSpace:10,
autoScrolling:0,
autoScrollingSpeed:2000,
autoScrollingEasing:"easeInOutQuad",
autoScrollingDelay:500
});
} else {
jQuery('.navgallery').css({'margin-left' : (wrapW - wrapperW) });
}
});
jQuery(window).bind('load resize',function(){
var h = parseFloat(jQuery(window).height()),
off = parseFloat(jQuery('nav').offset().top),
hNav = parseFloat(jQuery('nav').outerHeight());
if ( (off+hNav)>h ) {
jQuery('header[data-position="fixed"], nav[data-position="fixed"]').css({position: 'absolute'});
} else {
jQuery('header[data-position="fixed"], nav[data-position="fixed"]').css({position: 'fixed'});
}
});
jQuery(window).one('load',function(){
jQuery('#plusone').hide();
});
jQuery(function(){
var hash = window.location.hash;
if(typeof hash !== 'undefined' && hash !== false && hash !== ''){
if(!jQuery('article').hasClass('open_toggle')){
window.location.hash = '';
}
}
});