/* ---------------------------------------------------------------------Original Author: Kelly Meath------------------------------------------------------------------------ *//* var autoHome = false; */jQuery(document).ready(function($) {		//remove title attribute of images	$('img').removeAttr('title');		//custom scroll bar padding	if($('.not_home #right_column_inner_container').height() > 535 ){		$('#right_column_inner_container').append('<div id="scroll_padding"></div>');	}	if( $('#left_column_inner_container').height() > 535 ){		$('#left_column_inner_container').append('<div id="scroll_padding"></div>');	}	if( $('#what_page_template.client_page_template #left_column_inner_container').height() > 435 ){		$('#left_column_inner_container').append('<div id="scroll_padding"></div>');	}			//not active page icon scaled smaller and gets larger on hover		// will not work in ie6	if(navigator.appVersion.indexOf('MSIE 6.0') == -1 && navigator.appVersion.indexOf('MSIE 7.0') == -1){		$('.not_active img').attr('height', '45').attr('width', '45').css({margin: '10px'});		$('.not_active img').hover( function(){			$(this).attr('height', '65').attr('width', '65').css({margin: '0'});		}, function(){			$(this).attr('height', '45').attr('width', '45').css({margin: '10px'});		});	}	// homepage subline text hover		if( autoHome == true ){		$('#subline_text').animate({height: '24px'}, 5000, function(){ hideFirst(); });	} else {		$('#subline_text').hover( function(){			$('p:last', this).removeClass('hidden');			$('p:first', this).addClass('hidden');		}, function(){			$('p:first', this).removeClass('hidden');			$('p:last', this).addClass('hidden');		});			}		//who page content slider	if( $('#who_slider').length > 0 ){		$('#who_slider').jcarousel({			scroll: 1,			/*			auto: 10,			wrap: 'circular',			*/			initCallback: who_slider_initCallback, 			// This tells jCarousel NOT to autobuild prev/next buttons			buttonNextHTML: null,			buttonPrevHTML: null		});		$('#who_slider-prev').css({'opacity' : '0.25', 'cursor' : 'default'});	}		//work page project slider	if( $('#project_slider').length > 0 ){		if(navigator.appVersion.indexOf('MSIE 6.0') == -1 && navigator.appVersion.indexOf('MSIE 7.0') == -1){			$('#project_slider').jcarousel({				scroll: 1,				/*				auto: 3,				wrap: 'circular',				*/						initCallback: project_slider_initCallback,				buttonNextHTML: null,				buttonPrevHTML: null						});						//re-position work page project slider image			$('#project_slider li a img').each( function(){				var projectImgTop = Math.ceil((70 - $(this).height()) / 2 );				$(this).css({'padding-top' : projectImgTop});			});		} else {			$('#project_slider').jcarousel({				scroll: 1,							initCallback: project_slider_initCallback,				buttonNextHTML: null,				buttonPrevHTML: null						});					}	}		//post and project image gallery	if( $('#image_gallery').length > 0 ){		//$('#image_gallery').css({'height': $('#image_gallery .item').eq(0).height()+'px'});		if( $('#image_gallery .item').length > 1 ){			var totalImages = $('#image_gallery .item').length;			var appendString = '<ul>';			for( var i=0; i < totalImages; i++ ){				appendString += '<li><a';				if(i == 0){					appendString += ' class="active"';				}				appendString += ' onclick="imageGallery('+i+')">'+i+'</a></li>';			}			appendString += '</ul>';			$('#project_footer').append(appendString);			if(animateSlideshow == true){				$('#project_footer').animate({ 'height': $('#project_footer').height() }, 7000, function(){					nextImage(1, 3);				});			}		}	}		//how diagram content positioning and animating	if( $('#how_page_diagram').length > 0 ){		var howBoxHovering = false;		$('#how_page_diagram .how_box').hover( function(){			if( howBoxHovering == false ){				howBoxHovering = true;				$('#how_page_diagram .how_box h3').css({'display' : 'block' });			}			var divTop = Math.ceil(( 170 - ($('div', this).height()) ) / 2 ) + 'px';			$('div', this).css({'padding-top' : divTop});			$('h3', this).css({'display' : 'none'});		}, function(){			$('#how_page_diagram .how_box h3').css({'display' : 'block' });		});		if( howBoxHovering == false ){			$('#strategy').animate({'height' : '170px'}, 3000, function(){				var strategyTop = Math.ceil(( 170 - ($('div', this).height()) ) / 2 ) + 'px';				$('div', this).css({'padding-top' : strategyTop});				$('h3', this).css({'display' : 'none' });				if( howBoxHovering == false ){					$('#strategy').animate({'height' : '170px'}, 4000, function(){						$('h3', this).css({'display' : 'block' });						if( howBoxHovering == false ){							$('#integration').animate({'height' : '170px'}, 1000, function(){								var integrationTop = Math.ceil(( 170 - ($('div', this).height()) ) / 2 ) + 'px';								$('div', this).css({'padding-top' : integrationTop});								$('h3', this).css({'display' : 'none' });								if( howBoxHovering == false ){									$('#integration').animate({'height' : '170px'}, 5000, function(){										$('h3', this).css({'display' : 'block' });										if( howBoxHovering == false ){											$('#activation').animate({'height' : '170px'}, 1000, function(){												var activationTop = Math.ceil(( 170 - ($('div', this).height()) ) / 2 ) + 'px';												$('div', this).css({'padding-top' : activationTop});												$('h3', this).css({'display' : 'none' });												if( howBoxHovering == false ){													$('#activation').animate({'height' : '170px'}, 5000, function(){														$('h3', this).css({'display' : 'block' });													});												}											});										}									});								}							});						}					});				}			});		}	}		//IE6 header page image positioning	if(navigator.appVersion.indexOf('MSIE 6.0') != -1 || navigator.appVersion.indexOf('MSIE 7.0') != -1 ){		var headerPageImageLeft = Math.ceil((359 - $('#header_page_image img').width()) / 2) + 'px';		var headerPageImageTop = Math.ceil((135 - $('#header_page_image img').height()) / 2) + 'px';		$('#header_page_image img').css({'top' : headerPageImageTop, 'left' : headerPageImageLeft});	}		//form input length fill	$('form div p').each( function(){		var inputWidth =  (353 - $('label', this).width());		$('span input.text', this).css({'width' : inputWidth });	});		//form input length fill	$('form p').each( function(){		var inputWidth =  ($(this).width() - 10 - $('label', this).width());		$('span input.text', this).css({'width' : inputWidth });		$('span textarea.text', this).css({'width' : inputWidth });	});			// Move contact form to left column	/*	if( $('#contact_form').length > 0 ){		$('#connect_left_column_content').append('<div id="appended_contact_form">'+$('#contact_form').html()+'</div>');		$('#contact_form').remove();		// ie6 connect form input fixes		if(navigator.appVersion.indexOf('MSIE 6.0') != -1){			$('#appended_contact_form td').each( function(){				$('input[type=text]', this).css({'width' :  ($(this).width() - 4 )+'px' });			});		}		}	*/		if( $('.post_excerpt_p').length > 0 ){		$('.post_excerpt_p .comments_num a').attr('href', $('.post_excerpt_p .read_more').attr('href') );	}		// make order list number bold	$('ol li').each( function(){		$(this).html('<div class="ol_li_inner">'+$(this).html()+'</div>');	});	$('ol').css({'font-weight' : 'bold'});		//custom scroll bar	$('.not_home #right_column').jScrollPane({showArrows:false, scrollbarWidth: 22});	$('#blog_template #left_column, #what_page_template.client_page_template #left_column').jScrollPane({showArrows:false, scrollbarWidth: 22});		//homepage blog image slideshow	if($('#latest_gallery').length > 0){		$('#lastest_gallery_images').jcarousel({			scroll: 1,			auto: 5,			wrap: 'circular',			buttonNextHTML: null,			buttonPrevHTML: null		});			}	});// who slider functionsfunction who_slider_initCallback(carousel) {	jQuery('.jcarousel-control a').bind('click', function() {		carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));		return false;	});		jQuery('.jcarousel-scroll select').bind('change', function() {		carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value);		return false;	});		jQuery('#who_slider-next').click( function() {		carousel.next();		if ( jQuery('#who_slider').css('left') == "-350px" ){			jQuery('#who_slider-next').css({'opacity' : '0.25', 'cursor' : 'default'});		} else {			jQuery('#who_slider-next').css({'opacity' : '1', 'cursor' : 'pointer'});		}		jQuery('#who_slider-prev').css({'opacity' : '1', 'cursor' : 'pointer'});		return false;	});	jQuery('#who_slider-prev').click( function() {		carousel.prev();		if ( jQuery('#who_slider').css('left') == "-350px" ){			jQuery('#who_slider-prev').css({'opacity' : '0.25', 'cursor' : 'default'});		} else {			jQuery('#who_slider-prev').css({'opacity' : '1', 'cursor' : 'pointer'});		}		jQuery('#who_slider-next').css({'opacity' : '1', 'cursor' : 'pointer'});		return false;	});}//project silder functionfunction project_slider_initCallback(carousel) {	jQuery('.jcarousel-control a').bind('click', function() {		carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));		return false;	});		jQuery('.jcarousel-scroll select').bind('change', function() {		carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value);		return false;	});		jQuery('#project_slider-next').click( function() {		carousel.next();		return false;	});	jQuery('#project_slider-prev').click( function() {		carousel.prev();		return false;	});}// subline text automation functionsfunction hideFirst(){	jQuery('#subline_text p:first').removeClass('hidden');	jQuery('#subline_text p:last').addClass('hidden');	jQuery('#subline_text').animate({height: '24px'}, 5000, function(){ hideSecond(); });}function hideSecond(){	jQuery('#subline_text p:last').removeClass('hidden');	jQuery('#subline_text p:first').addClass('hidden');	jQuery('#subline_text').animate({height: '24px'}, 5000, function(){ hideFirst(); });}//image gallery navigationfunction imageGallery(imgNum){	if( animating == false ){		animating = true;		if(navigator.appName != 'Microsoft Internet Explorer'){			jQuery('#project_footer ul li a').removeClass('active');			jQuery('#project_footer ul li a').eq(imgNum).addClass('active');						jQuery('#image_gallery').animate({'opacity' : 0 }, 250, function(){				if(jQuery( '.item', this).eq(imgNum).height() <= 380 ){					jQuery(this).animate({'height' : jQuery('.item', this).eq(imgNum).height()+'px' }, 500, function(){						animating = false;					});				} else {					jQuery(this).animate({'height' : '380px'}, 500, function(){						animating = false;					});				}				jQuery('.item', this).css({'display':'none'}).eq(imgNum).css({'display':'block'});				jQuery(this).animate({'opacity' : 1 }, 500);			});					} else {			jQuery('#project_footer ul li a').removeClass('active');			jQuery('#project_footer ul li a').eq(imgNum).addClass('active');			if(jQuery( '#image_gallery .item').eq(imgNum).height() <= 380 ){				jQuery('#image_gallery').animate({'height' : jQuery('#image_gallery .item').eq(imgNum).height() }, 500, function(){					animating = false;				});			} else {				jQuery('#image_gallery').animate({'height' : '380px'}, 500, function(){					animating = false;				});			}			jQuery('#image_gallery .item').css({'display' : 'none'});			jQuery('#image_gallery .item').eq(imgNum).css({'display' : 'block'});		}	}}//image gallery automationfunction nextImage(showImage, totalImages){	imageGallery(showImage);	wait7Seconds(showImage, totalImages);}function wait7Seconds(nextImageNum, totalImages){	if(nextImageNum == totalImages){		nextImageNum = 0;	} else {		nextImageNum++;	}	jQuery('#project_footer').animate({ 'height':  jQuery('#project_footer').height() }, 7000, function(){		nextImage(nextImageNum, totalImages);	});}
