// Initialise the Superfish Menu (http://users.tpg.com.au/j_birch/plugins/superfish/)
// Secondary Navigation
$(document).ready(function() { 
        $('#secondary-nav ul').superfish({ 
            delay: 100,
            animation: {opacity:'show'},
            speed: 'fast',
            autoArrows: false,
            dropShadows: false
        }); 
    });
    
$(document).ready(function() { 
        $('#primary-nav ul').superfish({ 
            delay: 200,
            animation: {opacity:'show', height:'show'},
            speed: 'fast',
            autoArrows: false,
            dropShadows: false
        }); 
    });

// flickr + 125 banner + 468 banner + 120x240 + video widget transitions
$(document).ready(function() { 
		$(".flickr_badge_image img, .ads-125 img, #banner-header img, .ads-120x240 img").css({
				backgroundColor: "#f8f8f8"
			});
		$(".flickr_badge_image img, .ads-125 img, #banner-header img, .ads-120x240 img").hover(function() {
			$(this).stop().animate({
				backgroundColor: "#333333"
				}, 300);
			},function() {
			$(this).stop().animate({
				backgroundColor: "#f8f8f8"
				}, 500);
		});
	});
	
// post thumbs + avatar transitions
$(document).ready(function() { 
		$(".category-block .post-thumb img, #picture-posts a.thumb, .tab-thumb img, .tab-comments .avatar, div.slideshow img, #related-posts .post-thumb img").css({
				backgroundColor: "#f8f8f8",
				borderColor: "#e8e8e8"
			});
		$(".category-block .post-thumb img, #picture-posts a.thumb, .tab-thumb img, .tab-comments .avatar, div.slideshow img, #related-posts .post-thumb img").hover(function() {
			$(this).stop().animate({
				backgroundColor: "#333",
				borderTopColor: "#222",
				borderRightColor: "#222",
				borderBottomColor: "#222",
				borderLeftColor: "#222"
				}, 300);
			},function() {
			$(this).stop().animate({
				backgroundColor: "#f8f8f8",
				borderTopColor: "#e8e8e8",
				borderRightColor: "#e8e8e8",
				borderBottomColor: "#e8e8e8",
				borderLeftColor: "#e8e8e8"
				}, 500);
		});
	});
	
// opacity changes
$(document).ready(function() { 
		$("#latest-post .post-thumb img, .attachment-thumbnail-wide").css({
				opacity: 1
			});
		$("#latest-post .post-thumb img, .attachment-thumbnail-wide").hover(function() {
			$(this).stop().animate({
				opacity: 0.8
				}, 300);
			},function() {
			$(this).stop().animate({
				opacity: 1
				}, 500);
		});
	});
	
/*
* Placeholder plugin for jQuery
* ---
* Copyright 2010, Daniel Stocks (http://webcloud.se)
* Released under the MIT, BSD, and GPL Licenses.
*/

(function(b){function d(a){this.input=a;a.attr("type")=="password"&&this.handlePassword();b(a[0].form).submit(function(){if(a.hasClass("placeholder")&&a[0].value==a.attr("placeholder"))a[0].value=""})}d.prototype={show:function(a){if(this.input[0].value===""||a&&this.valueIsPlaceholder()){if(this.isPassword)try{this.input[0].setAttribute("type","text")}catch(b){this.input.before(this.fakePassword.show()).hide()}this.input.addClass("placeholder");this.input[0].value=this.input.attr("placeholder")}},
hide:function(){if(this.valueIsPlaceholder()&&this.input.hasClass("placeholder")&&(this.input.removeClass("placeholder"),this.input[0].value="",this.isPassword)){try{this.input[0].setAttribute("type","password")}catch(a){}this.input.show();this.input[0].focus()}},valueIsPlaceholder:function(){return this.input[0].value==this.input.attr("placeholder")},handlePassword:function(){var a=this.input;a.attr("realType","password");this.isPassword=!0;if(b.browser.msie&&a[0].outerHTML){var c=b(a[0].outerHTML.replace(/type=(['"])?password\1/gi,
"type=$1text$1"));this.fakePassword=c.val(a.attr("placeholder")).addClass("placeholder").focus(function(){a.trigger("focus");b(this).hide()});b(a[0].form).submit(function(){c.remove();a.show()})}}};var e=!!("placeholder"in document.createElement("input"));b.fn.placeholder=function(){return e?this:this.each(function(){var a=b(this),c=new d(a);c.show(!0);a.focus(function(){c.hide()});a.blur(function(){c.show(!1)});b.browser.msie&&(b(window).load(function(){a.val()&&a.removeClass("placeholder");c.show(!0)}),
a.focus(function(){if(this.value==""){var a=this.createTextRange();a.collapse(!0);a.moveStart("character",0);a.select()}}))})}})(jQuery);
