/*
	jQuery Placeholder Plugin
	Author: Eymen Gunay
	Web: http://www.egunay.com/
*/
(function( $ ){
	$.fn.placeHolder = function(options) {
		var eo = this;
		var settings = {
			'text'		  : 'Placeholder',
			'placeholder' : '#999',
			'active' 	  : '#000'
		};
		return this.each(function() {        
			if ( options ) { 
				$.extend( settings, options );
			}			
			eo.val(settings.text);
			eo.css("color", settings.placeholder);
			eo.focus(function() {
				if(eo.val() == settings.text) {
					eo.css("color", settings.active);
					eo.val("");	
				}
			});
			eo.focusout(function() {
				$("#search_box img").css("display","none");
				if(eo.val() == "" || eo.val() == settings.text) {
					eo.val(settings.text);
					eo.css("color", settings.placeholder);
				}
			});
		});				
	
	};
})( jQuery );

/*
 * jQuery WidowFix Plugin
 * http://matthewlein.com/widowfix/
 * Copyright (c) 2011 Matthew Lein
 * Version: 1.3.1 (2/09/2011)
 * Dual licensed under the MIT and GPL licenses
 * Requires: jQuery v1.4 or later
 */

(function(a){jQuery.fn.widowFix=function(d){var c={letterLimit:null,prevLimit:null,linkFix:false};var b=a.extend(c,d);return this.each(function(){var i=a(this),m;if(b.linkFix){var h=i.find("a:last");h.wrap("<var>");var e=a("var").html();m=h.contents()[0];h.contents().unwrap();}var f=a(this).html().split(" "),k=f.pop();if(f.length<=1){return;}function j(){if(k===""){k=f.pop();j();}}j();var l=f[f.length-1];if(b.linkFix){if(b.letterLimit!==null&&m.length>=b.letterLimit){i.find("var").each(function(){a(this).contents().replaceWith(e);a(this).contents().unwrap();});return;}else{if(b.prevLimit!==null&&l.length>=b.prevLimit){i.find("var").each(function(){a(this).contents().replaceWith(e);a(this).contents().unwrap();});return;}}}else{if(b.letterLimit!==null&&k.length>=b.letterLimit){return;}else{if(b.prevLimit!==null&&l.length>=b.prevLimit){return;}}}var g=f.join(" ")+"&nbsp;"+k;i.html(g);if(b.linkFix){i.find("var").each(function(){a(this).contents().replaceWith(e);a(this).contents().unwrap();});}});};})(jQuery);
