timthumb

functions.php

/* ===============================================
# timthumb
=============================================== */
define('THEME_DIR', get_template_directory_uri());
/* Timthumb CropCropimg */
function thumbCrop($img='', $w=false, $h=false , $zc=1, $a=false, $cc=false ){
    if($h)
        $h = "&h=$h";
    else
        $h = "";
    if($w)
        $w = "&w=$w";
    else
        $w = "";
	if($a)
        $a = "&a=$a";
    else
        $a = "";
	if($cc)
        $cc = "&cc=$cc";
    else
        $cc = "";
    $img = str_replace(get_bloginfo('url'), '', $img);
     $image_url = str_replace("http://","http://",THEME_DIR) . "/timthumb/timthumb.php?src=" . $img . $h . $w. "&zc=".$zc .$a .$cc;
    return $image_url;
}

HTML

} ?>