').wrapInner('
');
}
var theClass = jQuery('img',this).attr('class');
jQuery('img',this).removeClass(theClass);
jQuery('.imgHentry',this).addClass(theClass);
var a = jQuery('.linkIcon',this);
var i = jQuery('img',this).css('display','block');
if (jQuery('.imgHentry',this).hasClass('aligncenter')){
var wI = i.outerWidth();
jQuery('.imgHentry',this).css({width:wI});
}
a.show().animate({'opacity':0},0);
jQuery(this).hover(function(){
i.stop(true,false).animate({'opacity':0.2},300);
a.stop(true,false).animate({'opacity':1},300);
},function(){
i.stop(true,false).animate({'opacity':1},300);
a.stop(true,false).animate({'opacity':0},300);
});
});
});
/******************************************************
*
* Ajax form
*
******************************************************/
jQuery(document).ready(function() {
jQuery('.contactForm').each(function () {
var t = jQuery(this);
var hT = t.height();
var wT = t.width();
jQuery('.success, .unsuccess', t).height(hT).width(wT);
jQuery('input[type=checkbox]',t).after('
').hide();
jQuery('.off-on').each(function(){
if(!jQuery(this).prev('input[type=checkbox]').is(':checked')){
jQuery('.switcher',this).addClass('off');
}
jQuery('.off-on').live('click',function(){
if(jQuery('.switcher',this).hasClass('off')){
jQuery(this).prev('input[type=checkbox]').attr('checked', true);
jQuery('.switcher',this).fadeIn(200,function(){
jQuery(this).removeClass('off');
});
} else {
jQuery(this).prev('input[type=checkbox]').attr('checked', false);
jQuery('.switcher',this).fadeOut(200,function(){
jQuery(this).addClass('off');
});
}
});
});
jQuery('input[type=radio]',t).after('
').hide().click(function(){
jQuery('input[type=radio]',t).each(function(){
if(jQuery(this).is(':checked')){
jQuery(this).next('.radio-fake').find('.radio-on').fadeIn(200,function(){
jQuery(this).removeClass('off');
});
} else {
jQuery(this).next('.radio-fake').find('.radio-on').fadeOut(200,function(){
jQuery(this).addClass('off');
});
}
});
});
jQuery('.radio-fake').each(function(){
if(!jQuery(this).prev('input[type=radio]').is(':checked')){
jQuery('.radio-on',this).addClass('off');
}
jQuery('.radio-fake').live('click',function(){
jQuery(this).prev('input[type=radio]').click();
});
});
jQuery('input[type=submit]',t).click(function () {
var data = 'captcha='+jQuery('input[name="captcha"]',t).val()+'&form='+t.attr('id');
var allRequired = [];
var allFields = [];
var allValues = [];
jQuery('input[type="checkbox"]').each(function(){
if(!jQuery(this).is(':checked')){
jQuery(this).val('');
} else {
jQuery(this).val('on');
}
})
jQuery('input[type="radio"]').each(function(){
var pV = jQuery(this).attr('data-value');
if(!jQuery(this).is(':checked')){
jQuery(this).val('');
} else {
jQuery(this).val(pV);
}
})
jQuery('.required', t).each(function() {
allRequired.push(jQuery(this).val());
});
var req = 0;
var tag;
var name;
jQuery.each(allRequired, function(key, value) {
tag = jQuery('.required:eq('+key+')', t).attr('type');
if(tag!='radio'){
if(allRequired[key]==''){
jQuery('.required:eq('+key+')', t).css({'border-color':'#f00'});
req = 1;
} else {
jQuery('.required:eq('+key+')', t).css({'border-color':'#eee'});
}
} else {
name = jQuery('.required:eq('+key+')', t).attr('name');
var radioVal;
jQuery('input[type=radio][name="'+name+'"]', t).each(function(){
radioVal = jQuery('input[type=radio][name="'+name+'"]:checked', t).val();
jQuery(this).val(radioVal);
});
}
});
jQuery('.off-on').each(function(){
if(jQuery(this).prev('input[type="checkbox"]').hasClass('required')){
if(!jQuery(this).prev('input[type="checkbox"]').is(':checked')){
jQuery(this).css({'border-color':'#f00'});
} else {
jQuery(this).css({'border-color':'#ccc'});
}
}
});
jQuery('.radio-fake').each(function(){
name = jQuery('input[type=radio].required', t).attr('name');
if(jQuery('input[type=radio].required', t).val()==''){
jQuery('input[type=radio][name="'+name+'"]',t).next('.radio-fake').css({'border-color':'#f00'});
} else {
jQuery('input[type=radio][name="'+name+'"]',t).next('.radio-fake').css({'border-color':'#ccc'});
}
});
var emailReq = jQuery('.required.email',t).val();
var emailCheck = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
if(!emailCheck.test(emailReq)) {
jQuery('.required.email',t).css({'border-color':'#f00'});
req = 1;
}
jQuery('input').not('.email').bind('change keyup blur',function(){
if(jQuery(this).val()!=''){
jQuery(this).css({'border-color':'#eee'});
}
})
jQuery('select').bind('change',function(){
if(jQuery(this).val()!=''){
jQuery(this).css({'border-color':'#eee'});
}
})
jQuery('input.email').bind('keyup blur',function(){
if(!emailCheck.test(jQuery(this).val())) {
jQuery(this).css({'border-color':'#eee'});
}
})
jQuery('textarea').bind('keyup blur',function(){
if(jQuery(this).val()!=''){
jQuery(this).css({'border-color':'#eee'});
}
})
if(req == 1){
return false;
}
jQuery('input, textarea, select', t).each(function() {
allFields.push(jQuery(this).attr('data-name'));
});
jQuery('input, textarea, select', t).each(function() {
allValues.push(jQuery(this).val());
});
jQuery.each(allFields, function(key, value) {
if(allFields[key]){
data = data+'&'+allFields[key] + '=value_'+key;
}
});
jQuery.each(allValues, function(key, value) {
data = data.replace('value_'+key, allValues[key]);
});
jQuery('.loading').show();
jQuery.ajax({
url: "https://roncada3d.com/wp-content/themes/delight/scripts/mailer/mailer.php",
type: "GET",
data: data,
cache: false,
success: function (html) {
if (html==1) {
jQuery('form',t).animate({'opacity':'0'},500);
jQuery('.success',t).fadeIn('500');
_gaq.push(['_trackPageview', '/sent-email-from-'+ t.attr('id')]);
pageTracker = _gat._getTracker('/sent-email-from-'+ t.attr('id'));
pageTracker._trackPageview();
} else if (html=='noCaptcha') {
jQuery('input[name="captcha"]',t).css({'border-color':'#f00'});
jQuery('.recaptcha',t).click();
} else {
jQuery('form',t).animate({'opacity':'0'},500);
jQuery('.unsuccess',t).fadeIn('500');
}
}
});
return false;
});
if(jQuery('#to',t).length!=0 && jQuery('#from',t).length!=0) {
jQuery('#from',t).css({'width':'75%'}).after('
');
jQuery('#to',t).css({'width':'75%'}).after('
');
jQuery('#to',t).prev('label').prependTo(jQuery('#to',t).next(".wrapPeriod"));
jQuery('#to',t).appendTo(jQuery('#to',t).next(".wrapPeriod"));
jQuery('#from',t).prev('label').prependTo(jQuery('#from',t).next(".wrapPeriod"));
jQuery('#from',t).appendTo(jQuery('#from',t).next(".wrapPeriod"));
}
});
});
jQuery(window).one('load',function(){
jQuery('aside .contactForm').each(function () {
if(jQuery('.captchaCont', this).length!=0){
var cS = jQuery('.captchaCont img#cryptogram', this).width();
var rCs = jQuery('.recaptcha', this).width();
var dS = jQuery('.captchaCont', this).width();
jQuery('input[name="captcha"]', this).css('width',dS-(cS+rCs+12));
}
});
jQuery('article .contactForm').each(function () {
if(jQuery('.captchaCont', this).length!=0){
var cS = jQuery('.captchaCont img#cryptogram', this).width();
jQuery('input[name="captcha"]', this).css({'width':cS,'float':'left','margin':'3px 0 0 10px'});
}
});
});
/******************************************************
*
* Date picker
*
******************************************************/
jQuery(function() {
jQuery('.contactForm').each(function () {
var t = jQuery(this);
if(jQuery.isFunction(jQuery.fn.datepicker)){
var dates = jQuery( "#from, #to", t ).datepicker({
defaultDate: "+1w",
changeMonth: false,
numberOfMonths: 1,
showOn: "both",
buttonImage: "https://roncada3d.com/wp-content/themes/delight/images/calendar.png",
buttonImageOnly: true,
onSelect: function( selectedDate ) {
var option = this.id == "from" ? "minDate" : "maxDate",
instance = jQuery( this ).data( "datepicker" ),
date = jQuery.datepicker.parseDate(
instance.settings.dateFormat ||
jQuery.datepicker._defaults.dateFormat,
selectedDate, instance.settings );
dates.not( this ).datepicker( "option", option, date );
}
});
}
});
});
/******************************************************
*
* Tooltip
*
******************************************************/
jQuery(window).one('load',function(){
jQuery('a.pix_clue_credits').each(function(){
var t = jQuery(this);
var api = jQuery(this).qtip('api');
t.qtip({
style: {
tip: {
corner: "bottomRight"
},
classes: "ui-tooltip-tipsy",
height: 'auto'
},
position: {
target: "mouse",
adjust: {
mouse: false,
y: -10
},
my: "bottom right",
at: "bottom right"
},
show: {
delay: 500,
solo: true
},
content: jQuery('#pix_credits_pictures').html(),
hide: {
event: 'unfocus'
},
events: {
show: function(event, api) {
if ( jQuery('#pix_credits_pictures').text()!='' ) {
jQuery('.ui-tooltip, .qtip').css({'width':150});
api.set('content.text', jQuery('#pix_credits_pictures').html());
} else {
return false;
}
}
}
});
});
});
jQuery(document).ready(function() {
jQuery('.pix_after_tips').each(function(){
var t = jQuery(this);
var i = jQuery('body .pix_after_tips').index(t);
t.attr('id','pix_after_tips'+i);
t.prevAll('a').attr('data-rel','#pix_after_tips'+i).attr('href','#pix_after_tips'+i);
});
jQuery('a.pix_tips, .pix_share a').each(function(){
var t = jQuery(this);
var w = t.attr('data-width');
if(w==''){
w = 280;
}
var h = t.attr('data-height');
if(h==''){
h = 'auto';
}
t.qtip({
style: {
tip: {
corner: "bottomLeft"
},
classes: "ui-tooltip-tipsy",
height: h
},
position: {
target: "mouse",
adjust: {
mouse: false,
x: 10,
y: -10
},
my: "bottom left",
at: "bottom left"
},
show: {
delay: 500,
solo: true
},
content: t.attr('title'),
events: {
show: function(event, api) {
jQuery('.ui-tooltip, .qtip').css({'width':w});
}
}
});
});
jQuery('a.pix_tips_TR').each(function(){
var t = jQuery(this);
t.qtip({
style: {
tip: {
corner: "topRight"
},
classes: "ui-tooltip-tipsy"
},
position: {
target: "mouse",
adjust: {
mouse: false,
x: 10,
y: 10
},
my: "top right",
at: "top right"
},
show: {
delay: 500,
solo: true
},
content: t.attr('title')
});
});
jQuery('a.pix_tips_ajax').each(function(){
var t = jQuery(this);
var w = t.attr('data-width');
if(w==''){
w = 280;
}
var h = t.attr('data-height');
if(h==''){
h = 'auto';
}
t.qtip({
content: {
text: '
',
ajax: {
url: t.attr('data-rel')
}
},
style: {
tip: {
corner: "bottomLeft"
},
classes: "ui-tooltip-tipsy",
height: h
},
position: {
target: "mouse",
adjust: {
mouse: false,
x: 10,
y: -10
},
my: "bottom left",
at: "bottom left"
},
show: {
delay: 500,
solo: true
},
hide: {
event: 'unfocus'
},
events: {
show: function(event, api) {
jQuery('.ui-tooltip, .qtip').css({'width':w});
}
}
});
});
});
/******************************************************
*
* Wide Google map
*
******************************************************/
jQuery(window).one('load',function(){
if(jQuery('#pix_map_canvas').length !=0) {
var map,
mapEl = jQuery('#pix_map_canvas'),
lat = jQuery('#pix_map_canvas').attr('data-coord1'),
lng = jQuery('#pix_map_canvas').attr('data-coord2'),
pix_zoom = parseFloat(jQuery('#pix_map_canvas').attr('data-zoom')),
pix_type = jQuery('#pix_map_canvas').attr('data-type'),
pix_indications = jQuery('#pix_map_canvas').attr('data-indications'),
the_type;
if (pix_type=='HYBRID'){
the_type = google.maps.MapTypeId.HYBRID;
} else if (pix_type=='TERRAIN'){
the_type = google.maps.MapTypeId.TERRAIN;
} else if (pix_type=='SATELLITE'){
the_type = google.maps.MapTypeId.SATELLITE;
} else if (pix_type=='ROADMAP'){
the_type = google.maps.MapTypeId.ROADMAP;
}
var point = new google.maps.LatLng(lat,lng),
mapOptions = {
zoom : pix_zoom,
center : point,
mapTypeId : the_type,
mapTypeControl : false,
panControl : true,
panControlOptions : {
position : google.maps.ControlPosition.TOP_RIGHT
},
zoomControl : true,
zoomControlOptions : {
style : google.maps.ZoomControlStyle.SMALL,
position : google.maps.ControlPosition.TOP_RIGHT
},
streetViewControl : true,
streetViewControlOptions : {
position : google.maps.ControlPosition.TOP_RIGHT
}
};
map = new google.maps.Map(document.getElementById("pix_map_canvas"), mapOptions);
map.setTilt(45);
var coordInfoWindow = new google.maps.InfoWindow({maxWidth : 1024}),
latlngStr = pix_indications;
if(latlngStr!=''){
coordInfoWindow.setContent('
'+latlngStr+'
');
coordInfoWindow.setPosition(point);
coordInfoWindow.open(map);
}
}
});
jQuery(window).bind('resize load',function(){
/* solution to undefined msie */
jQuery.browser = {};
jQuery.browser.msie = false;
jQuery.browser.version = 0;
if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
jQuery.browser.msie = true;
jQuery.browser.version = RegExp.$1;
}
/* solution to undefined msie */
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-tipsy"
},
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
*
******************************************************/
/*!
* imagesLoaded PACKAGED v4.1.4
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o
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()));
});
}
if(jQuery('section.widepagePortfolio').length){
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() {
/* solution to undefined msie */
jQuery.browser = {};
jQuery.browser.msie = false;
jQuery.browser.version = 0;
if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
jQuery.browser.msie = true;
jQuery.browser.version = RegExp.$1;
}
/* solution to undefined msie */
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 = '';
}
}
});
jQuery(function() {
projekktor(".projekktor");
jQuery('audio').mediaelementplayer();
});