Warning: Cannot modify header information - headers already sent by (output started at /clientdata/zeus-dynamic-1/s/m/smartstartforkids.org.au/www/wordpress/wp-content/themes/breath/backend/header.php:2) in /clientdata/zeus-dynamic-1/s/m/smartstartforkids.org.au/www/wordpress/wp-content/themes/breath/js/script.php on line 3
function EqualColumns(columns) {
var biggestHeight = 0;
jQuery(columns).each(function(){
if(jQuery(this).height() > biggestHeight){
biggestHeight = jQuery(this).height();
}
});
jQuery(columns).height(biggestHeight);
}
function vAlign(elements) {
jQuery(elements).each(function(){
jQuery(this).children().wrapAll('');
var div = jQuery(this).children('div.nitinh-vAlign');
var ph = jQuery(this).height();
var dh = div.height();
var mh = (ph - dh) / 2;
div.css('top', mh);
});
}
function ajaxContact(theForm) {
var $ = jQuery;
$(theForm).find('.loading').fadeIn();
var formData = $(theForm).serialize(),
note = $(theForm).prev('.Note');
$.ajax({
type: "POST",
url: "http://smartstartforkids.org.au/wordpress/wp-content/themes/breath/inc/contactsend.php",
data: formData,
success: function(response) {
if (response === 'success') {
$(theForm).animate({opacity: 0},'fast');
note.html('Your message has been sent. Thank you!').slideDown('fast');
setTimeout(function() {
note.html('').slideUp('fast');
$(theForm).find("input[type=text], textarea").val('');
$(theForm).find(".breath_button").removeAttr('disabled');
$(theForm).find(".breath_button span").html("Send");
$(theForm).find('.loading').hide();
$(theForm).animate({opacity: 100},'fast');
},3000);
c = 'success';
} else {
$(theForm).animate({opacity: 0},'fast');
note.html(response).slideDown('fast');
}
}
});
return false;
}
jQuery(function () {
jQuery('.loader img').hide();
});
var i = 0;
var int=0;
jQuery(window).bind("load", function() {
var int = setInterval("imgLoaderth(i)",300);
jQuery('.jcycle').each(function() {
(new Image).src = jQuery(this).attr("data-background");
});
});
function imgLoaderth() {
var images = jQuery('.loader img').length;
if (i >= images) {
clearInterval(int);
}
jQuery('.loader img:hidden').eq(0).fadeIn(300)
jQuery('.loader img').eq(0).css('display', 'block');
i++;
}
(function(a){function m(){if(!d){d=!0;for(var c in b)a(c).each(function(){var d,e;d=a(this),e=d.data(),(e.containerWidth!=d.innerWidth()||e.containerHeight!=d.innerHeight())&&f(d,b[c])});d=!1}}function l(a){b[a]&&(delete b[a],b.length||c&&(window.clearInterval(c),c=undefined))}function k(a,d){b[a]=d,c||(c=window.setInterval(function(){m()},200))}function j(){return this.nodeType===3}function i(b){if(b.contents().length){var c=b.contents().last();if(c.filter(j).length){var d=c.get(0).nodeValue;d=a.trim(d);if(d==""){c.remove();return!0}return!1}while(i(c));if(c.contents().length)return!1;c.remove();return!0}return!1}function h(a){if(a.contents().length){var b=a.contents().last();return b.filter(j).length?b:h(b)}a.append("");return a.contents().last()}function g(b){var c=h(b);if(c.length){var d=c.get(0).nodeValue,e=d.lastIndexOf(" ");e>-1?(d=a.trim(d.substring(0,e)),c.get(0).nodeValue=d):c.get(0).nodeValue="";return!0}return!1}function f(b,c){var d=b.data(),e=d.wrapperElement;e||(e=b.wrapInner("").find(">div"));var f=e.data(),j=f.originalContent;j?e=f.originalContent.clone(!0).data({originalContent:j}).replaceAll(e):e.data({originalContent:e.clone(!0)}),b.data({wrapperElement:e,containerWidth:b.innerWidth(),containerHeight:b.innerHeight()});var k=!1;a(e.find(c.selector).get().reverse()).each(function(){var d=a(this),f=d.text(),j=!1;if(e.innerHeight()-d.innerHeight()>b.innerHeight())d.remove();else{i(d);if(d.contents().length){k&&(h(d).get(0).nodeValue+=c.ellipsis,k=!1);while(e.innerHeight()>b.innerHeight()){j=g(d);if(!j){k=!0,d.remove();break}i(d);if(d.contents().length)h(d).get(0).nodeValue+=c.ellipsis;else{k=!0,d.remove();break}}c.setTitle=="onEllipsis"&&j||c.setTitle=="always"?d.attr("title",f):c.setTitle!="never"&&d.removeAttr("title")}}})}var b={},c,d=!1,e={ellipsis:"...",setTitle:"never",live:!1};a.fn.ellipsis=function(b,c){var d,g;d=a(this),typeof b!="string"&&(c=b,b=undefined),g=a.extend({},e,c),b||(b=">*"),g.selector=b,d.each(function(){var b=a(this);f(b,g)}),g.live?k(d.selector,g):l(d.selector);return this}})(jQuery)
jQuery(window).load(function() {
if (jQuery('#filters').next(".th_portfolio").length) {
jQuery('.th_portfolio').isotope({ layoutMode : 'fitRows' });
}
jQuery('#filters a').click(function(){
jQuery(this).closest("li").removeClass("cat-item");
if (jQuery(this).closest("li").hasClass("*")) {
var selector = "*";
} else {
var selector = "." + jQuery(this).closest("li").attr("class");
}
jQuery('.th_portfolio').isotope({ filter: selector });
return false;
});
});
jQuery(document).ready(function() {
positionFooter();
jQuery(window).scroll(positionFooter).resize(positionFooter).load(positionFooter);
function positionFooter() {
var docHeight = jQuery(document.body).height() - jQuery("#sticky-footer-push").height();
if(docHeight < jQuery(window).height()){
var diff = jQuery(window).height() - docHeight;
if (!jQuery("#sticky-footer-push").length > 0) {
jQuery("footer").before('');
}
jQuery("#sticky-footer-push").height(diff);
}
}
jQuery('ul.sf-menu').superfish({
hoverClass: 'sfHover',
delay: 'false',
animation: {opacity:'show', height:'auto'},
speed: '1',
autoArrows: false,
dropShadows: false,
disableHI: true
}).supposition();
if (jQuery("#contactform").length) {
jQuery("#contactform").validate({
submitHandler: function(form) {
jQuery("#contactform .breath_button").attr('disabled', 'disabled');
jQuery("#contactform .breath_button span").html('Sending...');
ajaxContact(form);
return false;
},
messages: {
formname: "Please specify your name.",
formcomments: "Please enter your message.",
formemail: {
required: "We need your email address to contact you.",
email: "Your email address must be in the format of name@domain.com"
}
}
});
}
if (jQuery("#commentform").length) {
jQuery("#commentform").validate({
submitHandler: function(form) {
jQuery(".comment-form-submit button").attr('disabled', 'disabled');
jQuery(".comment-form-submit button span").html('Sending...');
this.form.submit();
},
rules: {
email: "required email"
},
messages: {
author: "Please specify your name.",
comment: "Please enter your message.",
email: {
required: "We need your email address to contact you.",
email: "Your email address must be in the format of name@domain.com"
}
}
});
}
if (jQuery("#teasers").length) {
EqualColumns(jQuery(".teaser div.entry-content"));
EqualColumns(jQuery(".teaser h3.entry-title"));
vAlign(jQuery(".teaser h3.entry-title"));
}
jQuery(".port_item .descr .entry-content").css("display", "block");
jQuery(".port_item .descr").ellipsis();
jQuery(".cycle_content").ellipsis();
jQuery('.entry-content ul > li').hover(function(){
jQuery(this).animate({backgroundPosition: '+=7'}, 300);
}, function(){
jQuery(this).animate({backgroundPosition: '-=7'}, 200);
});
jQuery("a[data-pp^='lightbox']").prettyPhoto({
theme: 'light_square',
overlay_gallery: false
});
jQuery(".th_portfolio .loader a.lightbox").prepend("");
jQuery(".th_portfolio .loader a.lightbox span").stop().animate({opacity:0},0)
jQuery(".th_portfolio .loader a.lightbox").hover(function(){
jQuery(this).find("span").stop().animate({opacity:1},300)
}, function(){
jQuery(this).find("span").stop().animate({opacity:0},100)
});
jQuery("#totop a, .separator_top a").click(function() {
jQuery("html, body").animate({
scrollTop: jQuery("#top").offset().top + "px"
}, {
duration: 500,
easing: "swing"
});
return false;
});
jQuery("article.blogitem .separator_top").show();
jQuery("article.blogitem:last .separator_top").hide();
if (jQuery("#carousel").length) {
jQuery("#carousel").featureCarousel({
trackerIndividual: false,
trackerSummation: false,
largeFeatureWidth: "524",
largeFeatureHeight: "295",
smallFeatureWidth: "400",
smallFeatureHeight: "235",
sidePadding: "0"
});
}
if (jQuery("#jcycle").length) {
jQuery('#jcycle').cycle({
fx: 'fade',
timeout: 15000,
pager: '#navcycle span',
speed: 1000,
pagerEvent: 'click',
pauseOnPagerHover: true,
cleartypeNoBg: true,
pause: 1,
before: animateSlide,
after: animateSlideContent,
next: '#next2',
prev: '#prev2' });
jQuery('#jcycle').css("display", "block");
jQuery('#navcycle').css("display", "block");
jQuery('#navcycle a:only-child').closest("#carousel-placeholder").find(".nav").remove();
jQuery('#navcycle a:only-child').closest("#navcycle").remove();
}
function animateSlide(currElement, nextElement, opts, isForward) {
var slideHc = jQuery(currElement).attr('data-slidesize');
jQuery(nextElement).find(".bgimage").css({height:slideHc+"px"});
jQuery(nextElement).find(".bgimage").css('background-image', '');
}
function animateSlideContent(currElement, nextElement, opts, isForward) {
jQuery(currElement).find('.cycle_content').css({'display':'none'});
var contH = jQuery(nextElement).attr('data-contsize');
if (contH == undefined) {
jQuery(nextElement).find(".cycle_content").css({'position':'absolute','visibility':'hidden','display':'block'});
var contH = jQuery(nextElement).find(".cycle_content").height();
jQuery(nextElement).find(".cycle_content").css({'position':'static','visibility':'visible', 'display':'none'});
jQuery(nextElement).attr('data-contsize',contH);
}
var slideH = jQuery(nextElement).attr('data-slidesize');
if (contH < 100) {
contH = 100;
}
if (slideH > contH){
var newH = slideH;
} else {
var newH = contH;
}
jQuery("#next2, #prev2").animate({top:parseInt(newH)/2 - 36});
jQuery("#jcycle").animate({height:newH+"px"});
jQuery(nextElement).animate({height:newH+"px"});
jQuery(nextElement).find(".bgimage").animate({height:newH+"px"},{complete: function() {
jQuery(nextElement).find(".jcycle_content").css({'margin':(parseInt(newH)-parseInt(contH))/2+'px 0 0 0'});
jQuery(nextElement).find('.cycle_content h3, .cycle_content .entry-content, .cycle_content .cycle_btn').css({'opacity':'0'});
var slideBg = jQuery(nextElement).attr('data-background');
jQuery(nextElement).find(".bgimage").css('background-image', 'url(' + slideBg + ')');
jQuery(nextElement).find(".bgimage").hide();
jQuery(nextElement).find(".bgimage").fadeIn(300, function() { jQuery(nextElement).find('.cycle_content').css({'display':'block'});
if (jQuery(nextElement).find('.cycle_content h3').length) {
jQuery(nextElement).find('.cycle_content h3').animate({'opacity':'1'},{complete: function() {
jQuery(nextElement).find('.cycle_content .entry-content').animate({'opacity':'1'},{complete: function() {
jQuery(nextElement).find('.cycle_content .cycle_btn').animate({'opacity':'1'});
}});
}});
} else {
jQuery(nextElement).find('.cycle_content .entry-content').animate({'opacity':'1'},{complete: function() {
jQuery(nextElement).find('.cycle_content .cycle_btn').animate({'opacity':'1'});
}});
} });
}});
}
jQuery('#carousel-placeholder').hover(
function() { jQuery('#next2').fadeIn();jQuery('#prev2').fadeIn();},
function() { jQuery('#next2').fadeOut();jQuery('#prev2').fadeOut();} );
});
jQuery('#filters').find('ul a').click(function(){
if ( !jQuery(this).hasClass('selected') ) {
jQuery(this).parents('ul').find('.selected').removeClass('selected');
jQuery(this).addClass('selected');
}
});
jQuery(document).ready(function(){
$(function() {
$(".sf-menu li a").wrapInner('');
$(".sf-menu>li>a").append(' ');
// set opacity to nill on page load
$(".sf-menu li").not(".current-menu-item").find("a strong").css("opacity","0");
// on mouse over
$(".sf-menu li").not(".current-menu-item").find("a").hover(function () {
// animate opacity to full
$(this).find(".shover").stop().animate({
opacity: 1
}, 'fast');
},
// on mouse out
function () {
// animate opacity to nill
$(this).find(".shover").stop().animate({
opacity: 0
}, 'fast');
});
});
});