$(document).ready(function(){
	var textField = $("#keywords");
	var textValue = textField.val();	
	    textField.focus(function() {
	        $(this).filter(function() {
	            return $(this).val() == "" || $(this).val() == textValue;
	        }).val("");	
	    });
	    textField.blur(function() {
	        $(this).filter(function() {
	            return $(this).val() == "";
	        }).val(textValue);
	    });		
	
	$("img").pngFix( );
	// Expand Panel
	$("#open").click(function(){
		$("div#panel").slideDown("slow");	
	});	
	
	// Collapse Panel
	$("#close").click(function(){
		$("div#panel").slideUp("slow");	
	});		
	
	// Switch buttons from "Log In | Register" to "Close Panel" on click
	$("#toggle a").click(function () {
		$("#toggle a").toggle();
	});
	
	$('a#signin').qtip({
        content: {
			text:'We support <a id="signin-link" target="blank" href="http://openid.net/what/">OpenID</a> so, it just takes 5 seconds if you have one of accounts below:<br />'+
			'<b>Google, Yahoo, Wordpress, FaceBook, Twitter, Blogger, AOL, Flickr, LiveJournal or OpenID</b>',
			title:{
				title: 'Tips',
				button: 'Close'
					}
			},
        position: {
           corner: {
              target: 'bottomMiddle', // Position the tooltip above the link
              tooltip: 'topMiddle'
           },
           adjust: {
              screen: true // Keep the tooltip on-screen at all times
           }
        },
        show: { 
            solo: true // Only show one tooltip at a time
         },
        hide: 'unfocus',
        style: {
           tip: true, // Apply a speech bubble tip to the tooltip at the designated tooltip corner
           border: {
              width: 0,
              radius: 4
           },
           name: 'light',// Use the default light style
           width: 300	
        }
  });	
});	