/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


function go(l, n){
				if (n) {
					window.open(l, '_blank');
				}
				else {
					window.location = l;
				}
			}
				function Expand(){
					if (jQuery('#zw').attr("gt") == 0) {
						jQuery('.others').fadeOut('slow', function() {
							jQuery('.others').hide();
							jQuery('#zwimg').attr("src", "http://maciejkowalczyk.pl/wp-content/themes/maciekkowalczyk/images/more.png");
						    jQuery('#zw').attr("gt", 1);
							});
					}
					else 
						if (jQuery('#zw').attr("gt") == 1) {
							jQuery('.others').fadeIn().show();
							jQuery('#zwimg').attr("src", "http://maciejkowalczyk.pl/wp-content/themes/maciekkowalczyk/images/less.png");
							jQuery('#zw').attr("gt", 0);
						}
				}
				
				 function Clear(){
                    if (jQuery('#s').val() == "szukaj na blogu...") {
                        jQuery('#s').val("");
                    }
                }
                
                function UnClear(){
                    if (jQuery('#s').val() == "") {
                        jQuery('#s').val("szukaj na blogu...");
                    }
                }
				
				var url=window.location;
					jQuery(jQuery(url).attr("hash")).css("background", "#808080");
					function goToByScroll(id){
 	     			 jQuery('html,body').animate({scrollTop: jQuery(id).offset().top-300},'slow');
					}
					if (jQuery(url).attr("hash")!=undefined) {
					if (jQuery(jQuery(url).attr("hash")).offset()!=null) {
					goToByScroll(jQuery(url).attr("hash"));		
					}
				}
				
	function hlight(elementid,orig){
		
    var hlight= "#C00000"; //set the hightlight color
    var aspeed= 3000; //set animation speed
    if (!orig) {
		cl = "#000000";
	}
	else {
		var cl = orig; // set default background color
	}
    elementid.stop().css("background-color", hlight).animate({backgroundColor: cl}, aspeed);
}


